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>Bundle</b> Resource
282 * ()
283 *
284 * <p>
285 * <b>Definition:</b>
286 * A container for a collection of resources.
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/Bundle">http://hl7.org/fhir/profiles/Bundle</a> 
297 * </p>
298 *
299 */
300@ResourceDef(name="Bundle", profile="http://hl7.org/fhir/profiles/Bundle", id="bundle")
301public class Bundle extends ca.uhn.fhir.model.dstu2.resource.BaseResource
302    implements  IResource     , org.hl7.fhir.instance.model.api.IBaseBundle
303    {
304
305        /**
306         * Search parameter constant for <b>type</b>
307         * <p>
308         * Description: <b></b><br>
309         * Type: <b>token</b><br>
310         * Path: <b>Bundle.type</b><br>
311         * </p>
312         */
313        @SearchParamDefinition(name="type", path="Bundle.type", description="", type="token"  )
314        public static final String SP_TYPE = "type";
315
316        /**
317         * <b>Fluent Client</b> search parameter constant for <b>type</b>
318         * <p>
319         * Description: <b></b><br>
320         * Type: <b>token</b><br>
321         * Path: <b>Bundle.type</b><br>
322         * </p>
323         */
324        public static final TokenClientParam TYPE = new TokenClientParam(SP_TYPE);
325
326        /**
327         * Search parameter constant for <b>message</b>
328         * <p>
329         * Description: <b>The first resource in the bundle, if the bundle type is \&quot;message\&quot; - this is a message header, and this parameter provides access to search its contents</b><br>
330         * Type: <b>reference</b><br>
331         * Path: <b>Bundle.entry.resource(0)</b><br>
332         * </p>
333         */
334        @SearchParamDefinition(name="message", path="Bundle.entry.resource(0)", description="The first resource in the bundle, if the bundle type is \"message\" - this is a message header, and this parameter provides access to search its contents", type="reference" , target={
335 ca.uhn.fhir.model.dstu2.resource.MessageHeader.class   }
336 )
337        public static final String SP_MESSAGE = "message";
338
339        /**
340         * <b>Fluent Client</b> search parameter constant for <b>message</b>
341         * <p>
342         * Description: <b>The first resource in the bundle, if the bundle type is \&quot;message\&quot; - this is a message header, and this parameter provides access to search its contents</b><br>
343         * Type: <b>reference</b><br>
344         * Path: <b>Bundle.entry.resource(0)</b><br>
345         * </p>
346         */
347        public static final ReferenceClientParam MESSAGE = new ReferenceClientParam(SP_MESSAGE);
348
349        /**
350         * Search parameter constant for <b>composition</b>
351         * <p>
352         * Description: <b>The first resource in the bundle, if the bundle type is \&quot;document\&quot; - this is a composition, and this parameter provides access to searches its contents</b><br>
353         * Type: <b>reference</b><br>
354         * Path: <b>Bundle.entry.resource(0)</b><br>
355         * </p>
356         */
357        @SearchParamDefinition(name="composition", path="Bundle.entry.resource(0)", description="The first resource in the bundle, if the bundle type is \"document\" - this is a composition, and this parameter provides access to searches its contents", type="reference" , target={
358 ca.uhn.fhir.model.dstu2.resource.Composition.class     }
359 )
360        public static final String SP_COMPOSITION = "composition";
361
362        /**
363         * <b>Fluent Client</b> search parameter constant for <b>composition</b>
364         * <p>
365         * Description: <b>The first resource in the bundle, if the bundle type is \&quot;document\&quot; - this is a composition, and this parameter provides access to searches its contents</b><br>
366         * Type: <b>reference</b><br>
367         * Path: <b>Bundle.entry.resource(0)</b><br>
368         * </p>
369         */
370        public static final ReferenceClientParam COMPOSITION = new ReferenceClientParam(SP_COMPOSITION);
371
372
373        /**
374         * Constant for fluent queries to be used to add include statements. Specifies
375         * the path value of "<b>Bundle:composition</b>".
376         */
377        public static final Include INCLUDE_COMPOSITION = new Include("Bundle:composition");
378
379        /**
380         * Constant for fluent queries to be used to add include statements. Specifies
381         * the path value of "<b>Bundle:message</b>".
382         */
383        public static final Include INCLUDE_MESSAGE = new Include("Bundle:message");
384
385
386        @Child(name="type", type=CodeDt.class, order=0, min=1, max=1, summary=true, modifier=false)     
387        @Description(
388                shortDefinition="",
389                formalDefinition="Indicates the purpose of this bundle- how it was intended to be used"
390        )
391        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/bundle-type")
392        private BoundCodeDt<BundleTypeEnum> myType;
393        
394        @Child(name="total", type=UnsignedIntDt.class, order=1, min=0, max=1, summary=true, modifier=false)     
395        @Description(
396                shortDefinition="",
397                formalDefinition="If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)"
398        )
399        private UnsignedIntDt myTotal;
400        
401        @Child(name="link", order=2, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)      
402        @Description(
403                shortDefinition="",
404                formalDefinition="A series of links that provide context to this bundle"
405        )
406        private java.util.List<Link> myLink;
407        
408        @Child(name="entry", order=3, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)     
409        @Description(
410                shortDefinition="",
411                formalDefinition="An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)"
412        )
413        private java.util.List<Entry> myEntry;
414        
415        @Child(name="signature", type=SignatureDt.class, order=4, min=0, max=1, summary=true, modifier=false)   
416        @Description(
417                shortDefinition="",
418                formalDefinition="Digital Signature - base64 encoded. XML DigSIg or a JWT"
419        )
420        private SignatureDt mySignature;
421        
422
423        @Override
424        public boolean isEmpty() {
425                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myType,  myTotal,  myLink,  myEntry,  mySignature);
426        }
427        
428        @Override
429        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
430                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myType, myTotal, myLink, myEntry, mySignature);
431        }
432
433        /**
434         * Gets the value(s) for <b>type</b> ().
435         * creating it if it does
436         * not exist. Will not return <code>null</code>.
437         *
438     * <p>
439     * <b>Definition:</b>
440     * Indicates the purpose of this bundle- how it was intended to be used
441     * </p> 
442         */
443        public BoundCodeDt<BundleTypeEnum> getTypeElement() {  
444                if (myType == null) {
445                        myType = new BoundCodeDt<BundleTypeEnum>(BundleTypeEnum.VALUESET_BINDER);
446                }
447                return myType;
448        }
449
450        
451        /**
452         * Gets the value(s) for <b>type</b> ().
453         * creating it if it does
454         * not exist. This method may return <code>null</code>.
455         *
456     * <p>
457     * <b>Definition:</b>
458     * Indicates the purpose of this bundle- how it was intended to be used
459     * </p> 
460         */
461        public String getType() {  
462                return getTypeElement().getValue();
463        }
464
465        /**
466         * Sets the value(s) for <b>type</b> ()
467         *
468     * <p>
469     * <b>Definition:</b>
470     * Indicates the purpose of this bundle- how it was intended to be used
471     * </p> 
472         */
473        public Bundle setType(BoundCodeDt<BundleTypeEnum> theValue) {
474                myType = theValue;
475                return this;
476        }
477        
478        
479
480        /**
481         * Sets the value(s) for <b>type</b> ()
482         *
483     * <p>
484     * <b>Definition:</b>
485     * Indicates the purpose of this bundle- how it was intended to be used
486     * </p> 
487         */
488        public Bundle setType(BundleTypeEnum theValue) {
489                setType(new BoundCodeDt<BundleTypeEnum>(BundleTypeEnum.VALUESET_BINDER, theValue));
490                
491/*
492                getTypeElement().setValueAsEnum(theValue);
493*/
494                return this;
495        }
496
497  
498        /**
499         * Gets the value(s) for <b>total</b> ().
500         * creating it if it does
501         * not exist. Will not return <code>null</code>.
502         *
503     * <p>
504     * <b>Definition:</b>
505     * If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)
506     * </p> 
507         */
508        public UnsignedIntDt getTotalElement() {  
509                if (myTotal == null) {
510                        myTotal = new UnsignedIntDt();
511                }
512                return myTotal;
513        }
514
515        
516        /**
517         * Gets the value(s) for <b>total</b> ().
518         * creating it if it does
519         * not exist. This method may return <code>null</code>.
520         *
521     * <p>
522     * <b>Definition:</b>
523     * If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)
524     * </p> 
525         */
526        public Integer getTotal() {  
527                return getTotalElement().getValue();
528        }
529
530        /**
531         * Sets the value(s) for <b>total</b> ()
532         *
533     * <p>
534     * <b>Definition:</b>
535     * If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)
536     * </p> 
537         */
538        public Bundle setTotal(UnsignedIntDt theValue) {
539                myTotal = theValue;
540                return this;
541        }
542        
543        
544
545        /**
546         * Sets the value for <b>total</b> ()
547         *
548     * <p>
549     * <b>Definition:</b>
550     * If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)
551     * </p> 
552         */
553        public Bundle setTotal( int theInteger) {
554                myTotal = new UnsignedIntDt(theInteger); 
555                return this; 
556        }
557
558 
559        /**
560         * Gets the value(s) for <b>link</b> ().
561         * creating it if it does
562         * not exist. Will not return <code>null</code>.
563         *
564     * <p>
565     * <b>Definition:</b>
566     * A series of links that provide context to this bundle
567     * </p> 
568         */
569        public java.util.List<Link> getLink() {  
570                if (myLink == null) {
571                        myLink = new java.util.ArrayList<Link>();
572                }
573                return myLink;
574        }
575
576        /**
577         * Sets the value(s) for <b>link</b> ()
578         *
579     * <p>
580     * <b>Definition:</b>
581     * A series of links that provide context to this bundle
582     * </p> 
583         */
584        public Bundle setLink(java.util.List<Link> theValue) {
585                myLink = theValue;
586                return this;
587        }
588        
589        
590
591        /**
592         * Adds and returns a new value for <b>link</b> ()
593         *
594     * <p>
595     * <b>Definition:</b>
596     * A series of links that provide context to this bundle
597     * </p> 
598         */
599        public Link addLink() {
600                Link newType = new Link();
601                getLink().add(newType);
602                return newType; 
603        }
604
605        /**
606         * Adds a given new value for <b>link</b> ()
607         *
608         * <p>
609         * <b>Definition:</b>
610         * A series of links that provide context to this bundle
611         * </p>
612         * @param theValue The link to add (must not be <code>null</code>)
613         */
614        public Bundle addLink(Link theValue) {
615                if (theValue == null) {
616                        throw new NullPointerException("theValue must not be null");
617                }
618                getLink().add(theValue);
619                return this;
620        }
621
622        /**
623         * Gets the first repetition for <b>link</b> (),
624         * creating it if it does not already exist.
625         *
626     * <p>
627     * <b>Definition:</b>
628     * A series of links that provide context to this bundle
629     * </p> 
630         */
631        public Link getLinkFirstRep() {
632                if (getLink().isEmpty()) {
633                        return addLink();
634                }
635                return getLink().get(0); 
636        }
637  
638        /**
639         * Gets the value(s) for <b>entry</b> ().
640         * creating it if it does
641         * not exist. Will not return <code>null</code>.
642         *
643     * <p>
644     * <b>Definition:</b>
645     * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
646     * </p> 
647         */
648        public java.util.List<Entry> getEntry() {  
649                if (myEntry == null) {
650                        myEntry = new java.util.ArrayList<Entry>();
651                }
652                return myEntry;
653        }
654
655        /**
656         * Sets the value(s) for <b>entry</b> ()
657         *
658     * <p>
659     * <b>Definition:</b>
660     * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
661     * </p> 
662         */
663        public Bundle setEntry(java.util.List<Entry> theValue) {
664                myEntry = theValue;
665                return this;
666        }
667        
668        
669
670        /**
671         * Adds and returns a new value for <b>entry</b> ()
672         *
673     * <p>
674     * <b>Definition:</b>
675     * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
676     * </p> 
677         */
678        public Entry addEntry() {
679                Entry newType = new Entry();
680                getEntry().add(newType);
681                return newType; 
682        }
683
684        /**
685         * Adds a given new value for <b>entry</b> ()
686         *
687         * <p>
688         * <b>Definition:</b>
689         * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
690         * </p>
691         * @param theValue The entry to add (must not be <code>null</code>)
692         */
693        public Bundle addEntry(Entry theValue) {
694                if (theValue == null) {
695                        throw new NullPointerException("theValue must not be null");
696                }
697                getEntry().add(theValue);
698                return this;
699        }
700
701        /**
702         * Gets the first repetition for <b>entry</b> (),
703         * creating it if it does not already exist.
704         *
705     * <p>
706     * <b>Definition:</b>
707     * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
708     * </p> 
709         */
710        public Entry getEntryFirstRep() {
711                if (getEntry().isEmpty()) {
712                        return addEntry();
713                }
714                return getEntry().get(0); 
715        }
716  
717        /**
718         * Gets the value(s) for <b>signature</b> ().
719         * creating it if it does
720         * not exist. Will not return <code>null</code>.
721         *
722     * <p>
723     * <b>Definition:</b>
724     * Digital Signature - base64 encoded. XML DigSIg or a JWT
725     * </p> 
726         */
727        public SignatureDt getSignature() {  
728                if (mySignature == null) {
729                        mySignature = new SignatureDt();
730                }
731                return mySignature;
732        }
733
734        /**
735         * Sets the value(s) for <b>signature</b> ()
736         *
737     * <p>
738     * <b>Definition:</b>
739     * Digital Signature - base64 encoded. XML DigSIg or a JWT
740     * </p> 
741         */
742        public Bundle setSignature(SignatureDt theValue) {
743                mySignature = theValue;
744                return this;
745        }
746        
747        
748
749  
750        /**
751         * Block class for child element: <b>Bundle.link</b> ()
752         *
753     * <p>
754     * <b>Definition:</b>
755     * A series of links that provide context to this bundle
756     * </p> 
757         */
758        @Block()        
759        public static class Link 
760            extends  BaseIdentifiableElement        implements IResourceBlock {
761        
762        @Child(name="relation", type=StringDt.class, order=0, min=1, max=1, summary=true, modifier=false)       
763        @Description(
764                shortDefinition="",
765                formalDefinition="A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]"
766        )
767        private StringDt myRelation;
768        
769        @Child(name="url", type=UriDt.class, order=1, min=1, max=1, summary=true, modifier=false)       
770        @Description(
771                shortDefinition="",
772                formalDefinition="The reference details for the link"
773        )
774        private UriDt myUrl;
775        
776
777        @Override
778        public boolean isEmpty() {
779                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myRelation,  myUrl);
780        }
781        
782        @Override
783        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
784                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myRelation, myUrl);
785        }
786
787        /**
788         * Gets the value(s) for <b>relation</b> ().
789         * creating it if it does
790         * not exist. Will not return <code>null</code>.
791         *
792     * <p>
793     * <b>Definition:</b>
794     * A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]
795     * </p> 
796         */
797        public StringDt getRelationElement() {  
798                if (myRelation == null) {
799                        myRelation = new StringDt();
800                }
801                return myRelation;
802        }
803
804        
805        /**
806         * Gets the value(s) for <b>relation</b> ().
807         * creating it if it does
808         * not exist. This method may return <code>null</code>.
809         *
810     * <p>
811     * <b>Definition:</b>
812     * A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]
813     * </p> 
814         */
815        public String getRelation() {  
816                return getRelationElement().getValue();
817        }
818
819        /**
820         * Sets the value(s) for <b>relation</b> ()
821         *
822     * <p>
823     * <b>Definition:</b>
824     * A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]
825     * </p> 
826         */
827        public Link setRelation(StringDt theValue) {
828                myRelation = theValue;
829                return this;
830        }
831        
832        
833
834        /**
835         * Sets the value for <b>relation</b> ()
836         *
837     * <p>
838     * <b>Definition:</b>
839     * A name which details the functional use for this link - see [[http://www.iana.org/assignments/link-relations/link-relations.xhtml]]
840     * </p> 
841         */
842        public Link setRelation( String theString) {
843                myRelation = new StringDt(theString); 
844                return this; 
845        }
846
847 
848        /**
849         * Gets the value(s) for <b>url</b> ().
850         * creating it if it does
851         * not exist. Will not return <code>null</code>.
852         *
853     * <p>
854     * <b>Definition:</b>
855     * The reference details for the link
856     * </p> 
857         */
858        public UriDt getUrlElement() {  
859                if (myUrl == null) {
860                        myUrl = new UriDt();
861                }
862                return myUrl;
863        }
864
865        
866        /**
867         * Gets the value(s) for <b>url</b> ().
868         * creating it if it does
869         * not exist. This method may return <code>null</code>.
870         *
871     * <p>
872     * <b>Definition:</b>
873     * The reference details for the link
874     * </p> 
875         */
876        public String getUrl() {  
877                return getUrlElement().getValue();
878        }
879
880        /**
881         * Sets the value(s) for <b>url</b> ()
882         *
883     * <p>
884     * <b>Definition:</b>
885     * The reference details for the link
886     * </p> 
887         */
888        public Link setUrl(UriDt theValue) {
889                myUrl = theValue;
890                return this;
891        }
892        
893        
894
895        /**
896         * Sets the value for <b>url</b> ()
897         *
898     * <p>
899     * <b>Definition:</b>
900     * The reference details for the link
901     * </p> 
902         */
903        public Link setUrl( String theUri) {
904                myUrl = new UriDt(theUri); 
905                return this; 
906        }
907
908 
909
910
911        }
912
913
914        /**
915         * Block class for child element: <b>Bundle.entry</b> ()
916         *
917     * <p>
918     * <b>Definition:</b>
919     * An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
920     * </p> 
921         */
922        @Block()        
923        public static class Entry 
924            extends  BaseIdentifiableElement        implements IResourceBlock {
925        
926        @Child(name="link", type=Link.class, order=0, min=0, max=Child.MAX_UNLIMITED, summary=true, modifier=false)     
927        @Description(
928                shortDefinition="",
929                formalDefinition="A series of links that provide context to this entry"
930        )
931        private java.util.List<Link> myLink;
932        
933        @Child(name="fullUrl", type=UriDt.class, order=1, min=0, max=1, summary=true, modifier=false)   
934        @Description(
935                shortDefinition="",
936                formalDefinition="The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource"
937        )
938        private UriDt myFullUrl;
939        
940        @Child(name="resource", type=IResource.class, order=2, min=0, max=1, summary=true, modifier=false)      
941        @Description(
942                shortDefinition="",
943                formalDefinition="The Resources for the entry"
944        )
945        private IResource myResource;
946        
947        @Child(name="search", order=3, min=0, max=1, summary=true, modifier=false)      
948        @Description(
949                shortDefinition="",
950                formalDefinition="Information about the search process that lead to the creation of this entry"
951        )
952        private EntrySearch mySearch;
953        
954        @Child(name="request", order=4, min=0, max=1, summary=true, modifier=false)     
955        @Description(
956                shortDefinition="",
957                formalDefinition="Additional information about how this entry should be processed as part of a transaction"
958        )
959        private EntryRequest myRequest;
960        
961        @Child(name="response", order=5, min=0, max=1, summary=true, modifier=false)    
962        @Description(
963                shortDefinition="",
964                formalDefinition="Additional information about how this entry should be processed as part of a transaction"
965        )
966        private EntryResponse myResponse;
967        
968
969        @Override
970        public boolean isEmpty() {
971                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myLink,  myFullUrl,  myResource,  mySearch,  myRequest,  myResponse);
972        }
973        
974        @Override
975        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
976                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myLink, myFullUrl, myResource, mySearch, myRequest, myResponse);
977        }
978
979        /**
980         * Gets the value(s) for <b>link</b> ().
981         * creating it if it does
982         * not exist. Will not return <code>null</code>.
983         *
984     * <p>
985     * <b>Definition:</b>
986     * A series of links that provide context to this entry
987     * </p> 
988         */
989        public java.util.List<Link> getLink() {  
990                if (myLink == null) {
991                        myLink = new java.util.ArrayList<Link>();
992                }
993                return myLink;
994        }
995
996        /**
997         * Sets the value(s) for <b>link</b> ()
998         *
999     * <p>
1000     * <b>Definition:</b>
1001     * A series of links that provide context to this entry
1002     * </p> 
1003         */
1004        public Entry setLink(java.util.List<Link> theValue) {
1005                myLink = theValue;
1006                return this;
1007        }
1008        
1009        
1010
1011        /**
1012         * Adds and returns a new value for <b>link</b> ()
1013         *
1014     * <p>
1015     * <b>Definition:</b>
1016     * A series of links that provide context to this entry
1017     * </p> 
1018         */
1019        public Link addLink() {
1020                Link newType = new Link();
1021                getLink().add(newType);
1022                return newType; 
1023        }
1024
1025        /**
1026         * Adds a given new value for <b>link</b> ()
1027         *
1028         * <p>
1029         * <b>Definition:</b>
1030         * A series of links that provide context to this entry
1031         * </p>
1032         * @param theValue The link to add (must not be <code>null</code>)
1033         */
1034        public Entry addLink(Link theValue) {
1035                if (theValue == null) {
1036                        throw new NullPointerException("theValue must not be null");
1037                }
1038                getLink().add(theValue);
1039                return this;
1040        }
1041
1042        /**
1043         * Gets the first repetition for <b>link</b> (),
1044         * creating it if it does not already exist.
1045         *
1046     * <p>
1047     * <b>Definition:</b>
1048     * A series of links that provide context to this entry
1049     * </p> 
1050         */
1051        public Link getLinkFirstRep() {
1052                if (getLink().isEmpty()) {
1053                        return addLink();
1054                }
1055                return getLink().get(0); 
1056        }
1057  
1058        /**
1059         * Gets the value(s) for <b>fullUrl</b> ().
1060         * creating it if it does
1061         * not exist. Will not return <code>null</code>.
1062         *
1063     * <p>
1064     * <b>Definition:</b>
1065     * The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource
1066     * </p> 
1067         */
1068        public UriDt getFullUrlElement() {  
1069                if (myFullUrl == null) {
1070                        myFullUrl = new UriDt();
1071                }
1072                return myFullUrl;
1073        }
1074
1075        
1076        /**
1077         * Gets the value(s) for <b>fullUrl</b> ().
1078         * creating it if it does
1079         * not exist. This method may return <code>null</code>.
1080         *
1081     * <p>
1082     * <b>Definition:</b>
1083     * The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource
1084     * </p> 
1085         */
1086        public String getFullUrl() {  
1087                return getFullUrlElement().getValue();
1088        }
1089
1090        /**
1091         * Sets the value(s) for <b>fullUrl</b> ()
1092         *
1093     * <p>
1094     * <b>Definition:</b>
1095     * The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource
1096     * </p> 
1097         */
1098        public Entry setFullUrl(UriDt theValue) {
1099                myFullUrl = theValue;
1100                return this;
1101        }
1102        
1103        
1104
1105        /**
1106         * Sets the value for <b>fullUrl</b> ()
1107         *
1108     * <p>
1109     * <b>Definition:</b>
1110     * The Absolute URL for the resource. This must be provided for all resources. The fullUrl SHALL not disagree with the id in the resource. The fullUrl is a version independent reference to the resource
1111     * </p> 
1112         */
1113        public Entry setFullUrl( String theUri) {
1114                myFullUrl = new UriDt(theUri); 
1115                return this; 
1116        }
1117
1118 
1119        /**
1120         * Gets the value(s) for <b>resource</b> ().
1121         *
1122     * <p>
1123     * <b>Definition:</b>
1124     * The Resources for the entry
1125     * </p> 
1126         */
1127        public IResource getResource() {  
1128                return myResource;
1129        }
1130
1131
1132        /**
1133         * Sets the value(s) for <b>resource</b> ()
1134         *
1135     * <p>
1136     * <b>Definition:</b>
1137     * The Resources for the entry
1138     * </p> 
1139         */
1140        public Entry setResource(IResource theValue) {
1141                myResource = theValue;
1142                return this;
1143        }
1144        
1145        
1146
1147  
1148        /**
1149         * Gets the value(s) for <b>search</b> ().
1150         * creating it if it does
1151         * not exist. Will not return <code>null</code>.
1152         *
1153     * <p>
1154     * <b>Definition:</b>
1155     * Information about the search process that lead to the creation of this entry
1156     * </p> 
1157         */
1158        public EntrySearch getSearch() {  
1159                if (mySearch == null) {
1160                        mySearch = new EntrySearch();
1161                }
1162                return mySearch;
1163        }
1164
1165        /**
1166         * Sets the value(s) for <b>search</b> ()
1167         *
1168     * <p>
1169     * <b>Definition:</b>
1170     * Information about the search process that lead to the creation of this entry
1171     * </p> 
1172         */
1173        public Entry setSearch(EntrySearch theValue) {
1174                mySearch = theValue;
1175                return this;
1176        }
1177        
1178        
1179
1180  
1181        /**
1182         * Gets the value(s) for <b>request</b> ().
1183         * creating it if it does
1184         * not exist. Will not return <code>null</code>.
1185         *
1186     * <p>
1187     * <b>Definition:</b>
1188     * Additional information about how this entry should be processed as part of a transaction
1189     * </p> 
1190         */
1191        public EntryRequest getRequest() {  
1192                if (myRequest == null) {
1193                        myRequest = new EntryRequest();
1194                }
1195                return myRequest;
1196        }
1197
1198        /**
1199         * Sets the value(s) for <b>request</b> ()
1200         *
1201     * <p>
1202     * <b>Definition:</b>
1203     * Additional information about how this entry should be processed as part of a transaction
1204     * </p> 
1205         */
1206        public Entry setRequest(EntryRequest theValue) {
1207                myRequest = theValue;
1208                return this;
1209        }
1210        
1211        
1212
1213  
1214        /**
1215         * Gets the value(s) for <b>response</b> ().
1216         * creating it if it does
1217         * not exist. Will not return <code>null</code>.
1218         *
1219     * <p>
1220     * <b>Definition:</b>
1221     * Additional information about how this entry should be processed as part of a transaction
1222     * </p> 
1223         */
1224        public EntryResponse getResponse() {  
1225                if (myResponse == null) {
1226                        myResponse = new EntryResponse();
1227                }
1228                return myResponse;
1229        }
1230
1231        /**
1232         * Sets the value(s) for <b>response</b> ()
1233         *
1234     * <p>
1235     * <b>Definition:</b>
1236     * Additional information about how this entry should be processed as part of a transaction
1237     * </p> 
1238         */
1239        public Entry setResponse(EntryResponse theValue) {
1240                myResponse = theValue;
1241                return this;
1242        }
1243        
1244        
1245
1246  
1247
1248
1249        }
1250
1251        /**
1252         * Block class for child element: <b>Bundle.entry.search</b> ()
1253         *
1254     * <p>
1255     * <b>Definition:</b>
1256     * Information about the search process that lead to the creation of this entry
1257     * </p> 
1258         */
1259        @Block()        
1260        public static class EntrySearch 
1261            extends  BaseIdentifiableElement        implements IResourceBlock {
1262        
1263        @Child(name="mode", type=CodeDt.class, order=0, min=0, max=1, summary=true, modifier=false)     
1264        @Description(
1265                shortDefinition="",
1266                formalDefinition="Why this entry is in the result set - whether it's included as a match or because of an _include requirement"
1267        )
1268        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/search-entry-mode")
1269        private BoundCodeDt<SearchEntryModeEnum> myMode;
1270        
1271        @Child(name="score", type=DecimalDt.class, order=1, min=0, max=1, summary=true, modifier=false) 
1272        @Description(
1273                shortDefinition="",
1274                formalDefinition="When searching, the server's search ranking score for the entry"
1275        )
1276        private DecimalDt myScore;
1277        
1278
1279        @Override
1280        public boolean isEmpty() {
1281                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myMode,  myScore);
1282        }
1283        
1284        @Override
1285        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1286                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myMode, myScore);
1287        }
1288
1289        /**
1290         * Gets the value(s) for <b>mode</b> ().
1291         * creating it if it does
1292         * not exist. Will not return <code>null</code>.
1293         *
1294     * <p>
1295     * <b>Definition:</b>
1296     * Why this entry is in the result set - whether it's included as a match or because of an _include requirement
1297     * </p> 
1298         */
1299        public BoundCodeDt<SearchEntryModeEnum> getModeElement() {  
1300                if (myMode == null) {
1301                        myMode = new BoundCodeDt<SearchEntryModeEnum>(SearchEntryModeEnum.VALUESET_BINDER);
1302                }
1303                return myMode;
1304        }
1305
1306        
1307        /**
1308         * Gets the value(s) for <b>mode</b> ().
1309         * creating it if it does
1310         * not exist. This method may return <code>null</code>.
1311         *
1312     * <p>
1313     * <b>Definition:</b>
1314     * Why this entry is in the result set - whether it's included as a match or because of an _include requirement
1315     * </p> 
1316         */
1317        public String getMode() {  
1318                return getModeElement().getValue();
1319        }
1320
1321        /**
1322         * Sets the value(s) for <b>mode</b> ()
1323         *
1324     * <p>
1325     * <b>Definition:</b>
1326     * Why this entry is in the result set - whether it's included as a match or because of an _include requirement
1327     * </p> 
1328         */
1329        public EntrySearch setMode(BoundCodeDt<SearchEntryModeEnum> theValue) {
1330                myMode = theValue;
1331                return this;
1332        }
1333        
1334        
1335
1336        /**
1337         * Sets the value(s) for <b>mode</b> ()
1338         *
1339     * <p>
1340     * <b>Definition:</b>
1341     * Why this entry is in the result set - whether it's included as a match or because of an _include requirement
1342     * </p> 
1343         */
1344        public EntrySearch setMode(SearchEntryModeEnum theValue) {
1345                setMode(new BoundCodeDt<SearchEntryModeEnum>(SearchEntryModeEnum.VALUESET_BINDER, theValue));
1346                
1347/*
1348                getModeElement().setValueAsEnum(theValue);
1349*/
1350                return this;
1351        }
1352
1353  
1354        /**
1355         * Gets the value(s) for <b>score</b> ().
1356         * creating it if it does
1357         * not exist. Will not return <code>null</code>.
1358         *
1359     * <p>
1360     * <b>Definition:</b>
1361     * When searching, the server's search ranking score for the entry
1362     * </p> 
1363         */
1364        public DecimalDt getScoreElement() {  
1365                if (myScore == null) {
1366                        myScore = new DecimalDt();
1367                }
1368                return myScore;
1369        }
1370
1371        
1372        /**
1373         * Gets the value(s) for <b>score</b> ().
1374         * creating it if it does
1375         * not exist. This method may return <code>null</code>.
1376         *
1377     * <p>
1378     * <b>Definition:</b>
1379     * When searching, the server's search ranking score for the entry
1380     * </p> 
1381         */
1382        public BigDecimal getScore() {  
1383                return getScoreElement().getValue();
1384        }
1385
1386        /**
1387         * Sets the value(s) for <b>score</b> ()
1388         *
1389     * <p>
1390     * <b>Definition:</b>
1391     * When searching, the server's search ranking score for the entry
1392     * </p> 
1393         */
1394        public EntrySearch setScore(DecimalDt theValue) {
1395                myScore = theValue;
1396                return this;
1397        }
1398        
1399        
1400
1401        /**
1402         * Sets the value for <b>score</b> ()
1403         *
1404     * <p>
1405     * <b>Definition:</b>
1406     * When searching, the server's search ranking score for the entry
1407     * </p> 
1408         */
1409        public EntrySearch setScore( double theValue) {
1410                myScore = new DecimalDt(theValue); 
1411                return this; 
1412        }
1413
1414        /**
1415         * Sets the value for <b>score</b> ()
1416         *
1417     * <p>
1418     * <b>Definition:</b>
1419     * When searching, the server's search ranking score for the entry
1420     * </p> 
1421         */
1422        public EntrySearch setScore( long theValue) {
1423                myScore = new DecimalDt(theValue); 
1424                return this; 
1425        }
1426
1427        /**
1428         * Sets the value for <b>score</b> ()
1429         *
1430     * <p>
1431     * <b>Definition:</b>
1432     * When searching, the server's search ranking score for the entry
1433     * </p> 
1434         */
1435        public EntrySearch setScore( java.math.BigDecimal theValue) {
1436                myScore = new DecimalDt(theValue); 
1437                return this; 
1438        }
1439
1440 
1441
1442
1443        }
1444
1445
1446        /**
1447         * Block class for child element: <b>Bundle.entry.request</b> ()
1448         *
1449     * <p>
1450     * <b>Definition:</b>
1451     * Additional information about how this entry should be processed as part of a transaction
1452     * </p> 
1453         */
1454        @Block()        
1455        public static class EntryRequest 
1456            extends  BaseIdentifiableElement        implements IResourceBlock {
1457        
1458        @Child(name="method", type=CodeDt.class, order=0, min=1, max=1, summary=true, modifier=false)   
1459        @Description(
1460                shortDefinition="",
1461                formalDefinition="The HTTP verb for this entry in either a update history, or a transaction/ transaction response"
1462        )
1463        @ca.uhn.fhir.model.api.annotation.Binding(valueSet = "http://hl7.org/fhir/ValueSet/http-verb")
1464        private BoundCodeDt<HTTPVerbEnum> myMethod;
1465        
1466        @Child(name="url", type=UriDt.class, order=1, min=1, max=1, summary=true, modifier=false)       
1467        @Description(
1468                shortDefinition="",
1469                formalDefinition="The URL for this entry, relative to the root (the address to which the request is posted)"
1470        )
1471        private UriDt myUrl;
1472        
1473        @Child(name="ifNoneMatch", type=StringDt.class, order=2, min=0, max=1, summary=true, modifier=false)    
1474        @Description(
1475                shortDefinition="",
1476                formalDefinition="If the ETag values match, return a 304 Not modified status. See the API documentation for [\"Conditional Read\"](http.html#cread)"
1477        )
1478        private StringDt myIfNoneMatch;
1479        
1480        @Child(name="ifModifiedSince", type=InstantDt.class, order=3, min=0, max=1, summary=true, modifier=false)       
1481        @Description(
1482                shortDefinition="",
1483                formalDefinition="Only perform the operation if the last updated date matches. See the API documentation for [\"Conditional Read\"](http.html#cread)"
1484        )
1485        private InstantDt myIfModifiedSince;
1486        
1487        @Child(name="ifMatch", type=StringDt.class, order=4, min=0, max=1, summary=true, modifier=false)        
1488        @Description(
1489                shortDefinition="",
1490                formalDefinition="Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency)"
1491        )
1492        private StringDt myIfMatch;
1493        
1494        @Child(name="ifNoneExist", type=StringDt.class, order=5, min=0, max=1, summary=true, modifier=false)    
1495        @Description(
1496                shortDefinition="",
1497                formalDefinition="Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\")"
1498        )
1499        private StringDt myIfNoneExist;
1500        
1501
1502        @Override
1503        public boolean isEmpty() {
1504                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myMethod,  myUrl,  myIfNoneMatch,  myIfModifiedSince,  myIfMatch,  myIfNoneExist);
1505        }
1506        
1507        @Override
1508        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1509                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myMethod, myUrl, myIfNoneMatch, myIfModifiedSince, myIfMatch, myIfNoneExist);
1510        }
1511
1512        /**
1513         * Gets the value(s) for <b>method</b> ().
1514         * creating it if it does
1515         * not exist. Will not return <code>null</code>.
1516         *
1517     * <p>
1518     * <b>Definition:</b>
1519     * The HTTP verb for this entry in either a update history, or a transaction/ transaction response
1520     * </p> 
1521         */
1522        public BoundCodeDt<HTTPVerbEnum> getMethodElement() {  
1523                if (myMethod == null) {
1524                        myMethod = new BoundCodeDt<HTTPVerbEnum>(HTTPVerbEnum.VALUESET_BINDER);
1525                }
1526                return myMethod;
1527        }
1528
1529        
1530        /**
1531         * Gets the value(s) for <b>method</b> ().
1532         * creating it if it does
1533         * not exist. This method may return <code>null</code>.
1534         *
1535     * <p>
1536     * <b>Definition:</b>
1537     * The HTTP verb for this entry in either a update history, or a transaction/ transaction response
1538     * </p> 
1539         */
1540        public String getMethod() {  
1541                return getMethodElement().getValue();
1542        }
1543
1544        /**
1545         * Sets the value(s) for <b>method</b> ()
1546         *
1547     * <p>
1548     * <b>Definition:</b>
1549     * The HTTP verb for this entry in either a update history, or a transaction/ transaction response
1550     * </p> 
1551         */
1552        public EntryRequest setMethod(BoundCodeDt<HTTPVerbEnum> theValue) {
1553                myMethod = theValue;
1554                return this;
1555        }
1556        
1557        
1558
1559        /**
1560         * Sets the value(s) for <b>method</b> ()
1561         *
1562     * <p>
1563     * <b>Definition:</b>
1564     * The HTTP verb for this entry in either a update history, or a transaction/ transaction response
1565     * </p> 
1566         */
1567        public EntryRequest setMethod(HTTPVerbEnum theValue) {
1568                setMethod(new BoundCodeDt<HTTPVerbEnum>(HTTPVerbEnum.VALUESET_BINDER, theValue));
1569                
1570/*
1571                getMethodElement().setValueAsEnum(theValue);
1572*/
1573                return this;
1574        }
1575
1576  
1577        /**
1578         * Gets the value(s) for <b>url</b> ().
1579         * creating it if it does
1580         * not exist. Will not return <code>null</code>.
1581         *
1582     * <p>
1583     * <b>Definition:</b>
1584     * The URL for this entry, relative to the root (the address to which the request is posted)
1585     * </p> 
1586         */
1587        public UriDt getUrlElement() {  
1588                if (myUrl == null) {
1589                        myUrl = new UriDt();
1590                }
1591                return myUrl;
1592        }
1593
1594        
1595        /**
1596         * Gets the value(s) for <b>url</b> ().
1597         * creating it if it does
1598         * not exist. This method may return <code>null</code>.
1599         *
1600     * <p>
1601     * <b>Definition:</b>
1602     * The URL for this entry, relative to the root (the address to which the request is posted)
1603     * </p> 
1604         */
1605        public String getUrl() {  
1606                return getUrlElement().getValue();
1607        }
1608
1609        /**
1610         * Sets the value(s) for <b>url</b> ()
1611         *
1612     * <p>
1613     * <b>Definition:</b>
1614     * The URL for this entry, relative to the root (the address to which the request is posted)
1615     * </p> 
1616         */
1617        public EntryRequest setUrl(UriDt theValue) {
1618                myUrl = theValue;
1619                return this;
1620        }
1621        
1622        
1623
1624        /**
1625         * Sets the value for <b>url</b> ()
1626         *
1627     * <p>
1628     * <b>Definition:</b>
1629     * The URL for this entry, relative to the root (the address to which the request is posted)
1630     * </p> 
1631         */
1632        public EntryRequest setUrl( String theUri) {
1633                myUrl = new UriDt(theUri); 
1634                return this; 
1635        }
1636
1637 
1638        /**
1639         * Gets the value(s) for <b>ifNoneMatch</b> ().
1640         * creating it if it does
1641         * not exist. Will not return <code>null</code>.
1642         *
1643     * <p>
1644     * <b>Definition:</b>
1645     * If the ETag values match, return a 304 Not modified status. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1646     * </p> 
1647         */
1648        public StringDt getIfNoneMatchElement() {  
1649                if (myIfNoneMatch == null) {
1650                        myIfNoneMatch = new StringDt();
1651                }
1652                return myIfNoneMatch;
1653        }
1654
1655        
1656        /**
1657         * Gets the value(s) for <b>ifNoneMatch</b> ().
1658         * creating it if it does
1659         * not exist. This method may return <code>null</code>.
1660         *
1661     * <p>
1662     * <b>Definition:</b>
1663     * If the ETag values match, return a 304 Not modified status. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1664     * </p> 
1665         */
1666        public String getIfNoneMatch() {  
1667                return getIfNoneMatchElement().getValue();
1668        }
1669
1670        /**
1671         * Sets the value(s) for <b>ifNoneMatch</b> ()
1672         *
1673     * <p>
1674     * <b>Definition:</b>
1675     * If the ETag values match, return a 304 Not modified status. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1676     * </p> 
1677         */
1678        public EntryRequest setIfNoneMatch(StringDt theValue) {
1679                myIfNoneMatch = theValue;
1680                return this;
1681        }
1682        
1683        
1684
1685        /**
1686         * Sets the value for <b>ifNoneMatch</b> ()
1687         *
1688     * <p>
1689     * <b>Definition:</b>
1690     * If the ETag values match, return a 304 Not modified status. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1691     * </p> 
1692         */
1693        public EntryRequest setIfNoneMatch( String theString) {
1694                myIfNoneMatch = new StringDt(theString); 
1695                return this; 
1696        }
1697
1698 
1699        /**
1700         * Gets the value(s) for <b>ifModifiedSince</b> ().
1701         * creating it if it does
1702         * not exist. Will not return <code>null</code>.
1703         *
1704     * <p>
1705     * <b>Definition:</b>
1706     * Only perform the operation if the last updated date matches. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1707     * </p> 
1708         */
1709        public InstantDt getIfModifiedSinceElement() {  
1710                if (myIfModifiedSince == null) {
1711                        myIfModifiedSince = new InstantDt();
1712                }
1713                return myIfModifiedSince;
1714        }
1715
1716        
1717        /**
1718         * Gets the value(s) for <b>ifModifiedSince</b> ().
1719         * creating it if it does
1720         * not exist. This method may return <code>null</code>.
1721         *
1722     * <p>
1723     * <b>Definition:</b>
1724     * Only perform the operation if the last updated date matches. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1725     * </p> 
1726         */
1727        public Date getIfModifiedSince() {  
1728                return getIfModifiedSinceElement().getValue();
1729        }
1730
1731        /**
1732         * Sets the value(s) for <b>ifModifiedSince</b> ()
1733         *
1734     * <p>
1735     * <b>Definition:</b>
1736     * Only perform the operation if the last updated date matches. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1737     * </p> 
1738         */
1739        public EntryRequest setIfModifiedSince(InstantDt theValue) {
1740                myIfModifiedSince = theValue;
1741                return this;
1742        }
1743        
1744        
1745
1746        /**
1747         * Sets the value for <b>ifModifiedSince</b> ()
1748         *
1749     * <p>
1750     * <b>Definition:</b>
1751     * Only perform the operation if the last updated date matches. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1752     * </p> 
1753         */
1754        public EntryRequest setIfModifiedSince( Date theDate,  TemporalPrecisionEnum thePrecision) {
1755                myIfModifiedSince = new InstantDt(theDate, thePrecision); 
1756                return this; 
1757        }
1758
1759        /**
1760         * Sets the value for <b>ifModifiedSince</b> ()
1761         *
1762     * <p>
1763     * <b>Definition:</b>
1764     * Only perform the operation if the last updated date matches. See the API documentation for [\&quot;Conditional Read\&quot;](http.html#cread)
1765     * </p> 
1766         */
1767        public EntryRequest setIfModifiedSinceWithMillisPrecision( Date theDate) {
1768                myIfModifiedSince = new InstantDt(theDate); 
1769                return this; 
1770        }
1771
1772 
1773        /**
1774         * Gets the value(s) for <b>ifMatch</b> ().
1775         * creating it if it does
1776         * not exist. Will not return <code>null</code>.
1777         *
1778     * <p>
1779     * <b>Definition:</b>
1780     * Only perform the operation if the Etag value matches. For more information, see the API section [\&quot;Managing Resource Contention\&quot;](http.html#concurrency)
1781     * </p> 
1782         */
1783        public StringDt getIfMatchElement() {  
1784                if (myIfMatch == null) {
1785                        myIfMatch = new StringDt();
1786                }
1787                return myIfMatch;
1788        }
1789
1790        
1791        /**
1792         * Gets the value(s) for <b>ifMatch</b> ().
1793         * creating it if it does
1794         * not exist. This method may return <code>null</code>.
1795         *
1796     * <p>
1797     * <b>Definition:</b>
1798     * Only perform the operation if the Etag value matches. For more information, see the API section [\&quot;Managing Resource Contention\&quot;](http.html#concurrency)
1799     * </p> 
1800         */
1801        public String getIfMatch() {  
1802                return getIfMatchElement().getValue();
1803        }
1804
1805        /**
1806         * Sets the value(s) for <b>ifMatch</b> ()
1807         *
1808     * <p>
1809     * <b>Definition:</b>
1810     * Only perform the operation if the Etag value matches. For more information, see the API section [\&quot;Managing Resource Contention\&quot;](http.html#concurrency)
1811     * </p> 
1812         */
1813        public EntryRequest setIfMatch(StringDt theValue) {
1814                myIfMatch = theValue;
1815                return this;
1816        }
1817        
1818        
1819
1820        /**
1821         * Sets the value for <b>ifMatch</b> ()
1822         *
1823     * <p>
1824     * <b>Definition:</b>
1825     * Only perform the operation if the Etag value matches. For more information, see the API section [\&quot;Managing Resource Contention\&quot;](http.html#concurrency)
1826     * </p> 
1827         */
1828        public EntryRequest setIfMatch( String theString) {
1829                myIfMatch = new StringDt(theString); 
1830                return this; 
1831        }
1832
1833 
1834        /**
1835         * Gets the value(s) for <b>ifNoneExist</b> ().
1836         * creating it if it does
1837         * not exist. Will not return <code>null</code>.
1838         *
1839     * <p>
1840     * <b>Definition:</b>
1841     * Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\&quot;Conditional Create\&quot;](http.html#ccreate). This is just the query portion of the URL - what follows the \&quot;?\&quot; (not including the \&quot;?\&quot;)
1842     * </p> 
1843         */
1844        public StringDt getIfNoneExistElement() {  
1845                if (myIfNoneExist == null) {
1846                        myIfNoneExist = new StringDt();
1847                }
1848                return myIfNoneExist;
1849        }
1850
1851        
1852        /**
1853         * Gets the value(s) for <b>ifNoneExist</b> ().
1854         * creating it if it does
1855         * not exist. This method may return <code>null</code>.
1856         *
1857     * <p>
1858     * <b>Definition:</b>
1859     * Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\&quot;Conditional Create\&quot;](http.html#ccreate). This is just the query portion of the URL - what follows the \&quot;?\&quot; (not including the \&quot;?\&quot;)
1860     * </p> 
1861         */
1862        public String getIfNoneExist() {  
1863                return getIfNoneExistElement().getValue();
1864        }
1865
1866        /**
1867         * Sets the value(s) for <b>ifNoneExist</b> ()
1868         *
1869     * <p>
1870     * <b>Definition:</b>
1871     * Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\&quot;Conditional Create\&quot;](http.html#ccreate). This is just the query portion of the URL - what follows the \&quot;?\&quot; (not including the \&quot;?\&quot;)
1872     * </p> 
1873         */
1874        public EntryRequest setIfNoneExist(StringDt theValue) {
1875                myIfNoneExist = theValue;
1876                return this;
1877        }
1878        
1879        
1880
1881        /**
1882         * Sets the value for <b>ifNoneExist</b> ()
1883         *
1884     * <p>
1885     * <b>Definition:</b>
1886     * Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\&quot;Conditional Create\&quot;](http.html#ccreate). This is just the query portion of the URL - what follows the \&quot;?\&quot; (not including the \&quot;?\&quot;)
1887     * </p> 
1888         */
1889        public EntryRequest setIfNoneExist( String theString) {
1890                myIfNoneExist = new StringDt(theString); 
1891                return this; 
1892        }
1893
1894 
1895
1896
1897        }
1898
1899
1900        /**
1901         * Block class for child element: <b>Bundle.entry.response</b> ()
1902         *
1903     * <p>
1904     * <b>Definition:</b>
1905     * Additional information about how this entry should be processed as part of a transaction
1906     * </p> 
1907         */
1908        @Block()        
1909        public static class EntryResponse 
1910            extends  BaseIdentifiableElement        implements IResourceBlock {
1911        
1912        @Child(name="status", type=StringDt.class, order=0, min=1, max=1, summary=true, modifier=false) 
1913        @Description(
1914                shortDefinition="",
1915                formalDefinition="The status code returned by processing this entry"
1916        )
1917        private StringDt myStatus;
1918        
1919        @Child(name="location", type=UriDt.class, order=1, min=0, max=1, summary=true, modifier=false)  
1920        @Description(
1921                shortDefinition="",
1922                formalDefinition="The location header created by processing this operation"
1923        )
1924        private UriDt myLocation;
1925        
1926        @Child(name="etag", type=StringDt.class, order=2, min=0, max=1, summary=true, modifier=false)   
1927        @Description(
1928                shortDefinition="",
1929                formalDefinition="The etag for the resource, it the operation for the entry produced a versioned resource"
1930        )
1931        private StringDt myEtag;
1932        
1933        @Child(name="lastModified", type=InstantDt.class, order=3, min=0, max=1, summary=true, modifier=false)  
1934        @Description(
1935                shortDefinition="",
1936                formalDefinition="The date/time that the resource was modified on the server"
1937        )
1938        private InstantDt myLastModified;
1939        
1940
1941        @Override
1942        public boolean isEmpty() {
1943                return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(  myStatus,  myLocation,  myEtag,  myLastModified);
1944        }
1945        
1946        @Override
1947        public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) {
1948                return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myStatus, myLocation, myEtag, myLastModified);
1949        }
1950
1951        /**
1952         * Gets the value(s) for <b>status</b> ().
1953         * creating it if it does
1954         * not exist. Will not return <code>null</code>.
1955         *
1956     * <p>
1957     * <b>Definition:</b>
1958     * The status code returned by processing this entry
1959     * </p> 
1960         */
1961        public StringDt getStatusElement() {  
1962                if (myStatus == null) {
1963                        myStatus = new StringDt();
1964                }
1965                return myStatus;
1966        }
1967
1968        
1969        /**
1970         * Gets the value(s) for <b>status</b> ().
1971         * creating it if it does
1972         * not exist. This method may return <code>null</code>.
1973         *
1974     * <p>
1975     * <b>Definition:</b>
1976     * The status code returned by processing this entry
1977     * </p> 
1978         */
1979        public String getStatus() {  
1980                return getStatusElement().getValue();
1981        }
1982
1983        /**
1984         * Sets the value(s) for <b>status</b> ()
1985         *
1986     * <p>
1987     * <b>Definition:</b>
1988     * The status code returned by processing this entry
1989     * </p> 
1990         */
1991        public EntryResponse setStatus(StringDt theValue) {
1992                myStatus = theValue;
1993                return this;
1994        }
1995        
1996        
1997
1998        /**
1999         * Sets the value for <b>status</b> ()
2000         *
2001     * <p>
2002     * <b>Definition:</b>
2003     * The status code returned by processing this entry
2004     * </p> 
2005         */
2006        public EntryResponse setStatus( String theString) {
2007                myStatus = new StringDt(theString); 
2008                return this; 
2009        }
2010
2011 
2012        /**
2013         * Gets the value(s) for <b>location</b> ().
2014         * creating it if it does
2015         * not exist. Will not return <code>null</code>.
2016         *
2017     * <p>
2018     * <b>Definition:</b>
2019     * The location header created by processing this operation
2020     * </p> 
2021         */
2022        public UriDt getLocationElement() {  
2023                if (myLocation == null) {
2024                        myLocation = new UriDt();
2025                }
2026                return myLocation;
2027        }
2028
2029        
2030        /**
2031         * Gets the value(s) for <b>location</b> ().
2032         * creating it if it does
2033         * not exist. This method may return <code>null</code>.
2034         *
2035     * <p>
2036     * <b>Definition:</b>
2037     * The location header created by processing this operation
2038     * </p> 
2039         */
2040        public String getLocation() {  
2041                return getLocationElement().getValue();
2042        }
2043
2044        /**
2045         * Sets the value(s) for <b>location</b> ()
2046         *
2047     * <p>
2048     * <b>Definition:</b>
2049     * The location header created by processing this operation
2050     * </p> 
2051         */
2052        public EntryResponse setLocation(UriDt theValue) {
2053                myLocation = theValue;
2054                return this;
2055        }
2056        
2057        
2058
2059        /**
2060         * Sets the value for <b>location</b> ()
2061         *
2062     * <p>
2063     * <b>Definition:</b>
2064     * The location header created by processing this operation
2065     * </p> 
2066         */
2067        public EntryResponse setLocation( String theUri) {
2068                myLocation = new UriDt(theUri); 
2069                return this; 
2070        }
2071
2072 
2073        /**
2074         * Gets the value(s) for <b>etag</b> ().
2075         * creating it if it does
2076         * not exist. Will not return <code>null</code>.
2077         *
2078     * <p>
2079     * <b>Definition:</b>
2080     * The etag for the resource, it the operation for the entry produced a versioned resource
2081     * </p> 
2082         */
2083        public StringDt getEtagElement() {  
2084                if (myEtag == null) {
2085                        myEtag = new StringDt();
2086                }
2087                return myEtag;
2088        }
2089
2090        
2091        /**
2092         * Gets the value(s) for <b>etag</b> ().
2093         * creating it if it does
2094         * not exist. This method may return <code>null</code>.
2095         *
2096     * <p>
2097     * <b>Definition:</b>
2098     * The etag for the resource, it the operation for the entry produced a versioned resource
2099     * </p> 
2100         */
2101        public String getEtag() {  
2102                return getEtagElement().getValue();
2103        }
2104
2105        /**
2106         * Sets the value(s) for <b>etag</b> ()
2107         *
2108     * <p>
2109     * <b>Definition:</b>
2110     * The etag for the resource, it the operation for the entry produced a versioned resource
2111     * </p> 
2112         */
2113        public EntryResponse setEtag(StringDt theValue) {
2114                myEtag = theValue;
2115                return this;
2116        }
2117        
2118        
2119
2120        /**
2121         * Sets the value for <b>etag</b> ()
2122         *
2123     * <p>
2124     * <b>Definition:</b>
2125     * The etag for the resource, it the operation for the entry produced a versioned resource
2126     * </p> 
2127         */
2128        public EntryResponse setEtag( String theString) {
2129                myEtag = new StringDt(theString); 
2130                return this; 
2131        }
2132
2133 
2134        /**
2135         * Gets the value(s) for <b>lastModified</b> ().
2136         * creating it if it does
2137         * not exist. Will not return <code>null</code>.
2138         *
2139     * <p>
2140     * <b>Definition:</b>
2141     * The date/time that the resource was modified on the server
2142     * </p> 
2143         */
2144        public InstantDt getLastModifiedElement() {  
2145                if (myLastModified == null) {
2146                        myLastModified = new InstantDt();
2147                }
2148                return myLastModified;
2149        }
2150
2151        
2152        /**
2153         * Gets the value(s) for <b>lastModified</b> ().
2154         * creating it if it does
2155         * not exist. This method may return <code>null</code>.
2156         *
2157     * <p>
2158     * <b>Definition:</b>
2159     * The date/time that the resource was modified on the server
2160     * </p> 
2161         */
2162        public Date getLastModified() {  
2163                return getLastModifiedElement().getValue();
2164        }
2165
2166        /**
2167         * Sets the value(s) for <b>lastModified</b> ()
2168         *
2169     * <p>
2170     * <b>Definition:</b>
2171     * The date/time that the resource was modified on the server
2172     * </p> 
2173         */
2174        public EntryResponse setLastModified(InstantDt theValue) {
2175                myLastModified = theValue;
2176                return this;
2177        }
2178        
2179        
2180
2181        /**
2182         * Sets the value for <b>lastModified</b> ()
2183         *
2184     * <p>
2185     * <b>Definition:</b>
2186     * The date/time that the resource was modified on the server
2187     * </p> 
2188         */
2189        public EntryResponse setLastModified( Date theDate,  TemporalPrecisionEnum thePrecision) {
2190                myLastModified = new InstantDt(theDate, thePrecision); 
2191                return this; 
2192        }
2193
2194        /**
2195         * Sets the value for <b>lastModified</b> ()
2196         *
2197     * <p>
2198     * <b>Definition:</b>
2199     * The date/time that the resource was modified on the server
2200     * </p> 
2201         */
2202        public EntryResponse setLastModifiedWithMillisPrecision( Date theDate) {
2203                myLastModified = new InstantDt(theDate); 
2204                return this; 
2205        }
2206
2207 
2208
2209
2210        }
2211
2212
2213
2214
2215
2216    @Override
2217    public String getResourceName() {
2218        return "Bundle";
2219    }
2220    
2221    public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum() {
2222        return ca.uhn.fhir.context.FhirVersionEnum.DSTU2;
2223    }
2224
2225        /**
2226         * Returns the {@link #getLink() link} which matches a given {@link Link#getRelation() relation}. 
2227         * If no link is found which matches the given relation, returns <code>null</code>. If more than one
2228         * link is found which matches the given relation, returns the first matching Link.
2229         * 
2230         * @param theRelation
2231         *            The relation, such as "next", or "self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}.
2232         * @return Returns a matching Link, or <code>null</code>
2233         * @see IBaseBundle#LINK_NEXT
2234         * @see IBaseBundle#LINK_PREV
2235         * @see IBaseBundle#LINK_SELF
2236         */
2237        public Link getLink(String theRelation) {
2238                org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty");
2239                for (Link next : getLink()) {
2240                        if (theRelation.equals(next.getRelation())) {
2241                                return next;
2242                        }
2243                }
2244                return null;
2245        }
2246
2247        /**
2248         * Returns the {@link #getLink() link} which matches a given {@link Link#getRelation() relation}. 
2249         * If no link is found which matches the given relation, creates a new Link with the
2250         * given relation and adds it to this Bundle. If more than one
2251         * link is found which matches the given relation, returns the first matching Link.
2252         * 
2253         * @param theRelation
2254         *            The relation, such as "next", or "self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}.
2255         * @return Returns a matching Link, or <code>null</code>
2256         * @see IBaseBundle#LINK_NEXT
2257         * @see IBaseBundle#LINK_PREV
2258         * @see IBaseBundle#LINK_SELF
2259         */
2260        public Link getLinkOrCreate(String theRelation) {
2261                org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty");
2262                for (Link next : getLink()) {
2263                        if (theRelation.equals(next.getRelation())) {
2264                                return next;
2265                        }
2266                }
2267                Link retVal = new Link();
2268                retVal.setRelation(theRelation);
2269                getLink().add(retVal);
2270                return retVal;
2271        }
2272
2273}