001package org.hl7.fhir.r5.model;
002
003
004/*
005 * #%L
006 * org.hl7.fhir.r5
007 * %%
008 * Copyright (C) 2014 - 2019 Health Level 7
009 * %%
010 * Licensed under the Apache License, Version 2.0 (the \"License\");
011 * you may not use this file except in compliance with the License.
012 * You may obtain a copy of the License at
013 * 
014 *      http://www.apache.org/licenses/LICENSE-2.0
015 * 
016 * Unless required by applicable law or agreed to in writing, software
017 * distributed under the License is distributed on an \"AS IS\" BASIS,
018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
019 * See the License for the specific language governing permissions and
020 * limitations under the License.
021 * #L%
022 */
023
024/*
025  Copyright (c) 2011+, HL7, Inc.
026  All rights reserved.
027  
028  Redistribution and use in source and binary forms, with or without modification, \
029  are permitted provided that the following conditions are met:
030  
031   * Redistributions of source code must retain the above copyright notice, this \
032     list of conditions and the following disclaimer.
033   * Redistributions in binary form must reproduce the above copyright notice, \
034     this list of conditions and the following disclaimer in the documentation \
035     and/or other materials provided with the distribution.
036   * Neither the name of HL7 nor the names of its contributors may be used to 
037     endorse or promote products derived from this software without specific 
038     prior written permission.
039  
040  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
041  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
042  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
043  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
044  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
045  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
046  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
047  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
048  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
049  POSSIBILITY OF SUCH DAMAGE.
050  */
051
052// Generated on Tue, Dec 31, 2019 12:12+1100 for FHIR vcurrent
053
054import java.util.ArrayList;
055import java.util.Date;
056import java.util.List;
057import org.hl7.fhir.utilities.Utilities;
058import org.hl7.fhir.r5.model.Enumerations.*;
059import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
060import org.hl7.fhir.exceptions.FHIRException;
061import org.hl7.fhir.instance.model.api.ICompositeType;
062import ca.uhn.fhir.model.api.annotation.ResourceDef;
063import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
064import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
065import ca.uhn.fhir.model.api.annotation.Child;
066import ca.uhn.fhir.model.api.annotation.ChildOrder;
067import ca.uhn.fhir.model.api.annotation.Description;
068import ca.uhn.fhir.model.api.annotation.Block;
069
070/**
071 * Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic.
072 */
073@ResourceDef(name="Topic", profile="http://hl7.org/fhir/StructureDefinition/Topic")
074public class Topic extends DomainResource {
075
076    public enum InteractionTrigger {
077        /**
078         * Create a new resource with a server assigned id.
079         */
080        CREATE, 
081        /**
082         * Update an existing resource by its id (or create it if it is new).
083         */
084        UPDATE, 
085        /**
086         * Delete a resource.
087         */
088        DELETE, 
089        /**
090         * added to help the parsers with the generic types
091         */
092        NULL;
093        public static InteractionTrigger fromCode(String codeString) throws FHIRException {
094            if (codeString == null || "".equals(codeString))
095                return null;
096        if ("create".equals(codeString))
097          return CREATE;
098        if ("update".equals(codeString))
099          return UPDATE;
100        if ("delete".equals(codeString))
101          return DELETE;
102        if (Configuration.isAcceptInvalidEnums())
103          return null;
104        else
105          throw new FHIRException("Unknown InteractionTrigger code '"+codeString+"'");
106        }
107        public String toCode() {
108          switch (this) {
109            case CREATE: return "create";
110            case UPDATE: return "update";
111            case DELETE: return "delete";
112            default: return "?";
113          }
114        }
115        public String getSystem() {
116          switch (this) {
117            case CREATE: return "http://hl7.org/fhir/restful-interaction";
118            case UPDATE: return "http://hl7.org/fhir/restful-interaction";
119            case DELETE: return "http://hl7.org/fhir/restful-interaction";
120            default: return "?";
121          }
122        }
123        public String getDefinition() {
124          switch (this) {
125            case CREATE: return "Create a new resource with a server assigned id.";
126            case UPDATE: return "Update an existing resource by its id (or create it if it is new).";
127            case DELETE: return "Delete a resource.";
128            default: return "?";
129          }
130        }
131        public String getDisplay() {
132          switch (this) {
133            case CREATE: return "create";
134            case UPDATE: return "update";
135            case DELETE: return "delete";
136            default: return "?";
137          }
138        }
139    }
140
141  public static class InteractionTriggerEnumFactory implements EnumFactory<InteractionTrigger> {
142    public InteractionTrigger fromCode(String codeString) throws IllegalArgumentException {
143      if (codeString == null || "".equals(codeString))
144            if (codeString == null || "".equals(codeString))
145                return null;
146        if ("create".equals(codeString))
147          return InteractionTrigger.CREATE;
148        if ("update".equals(codeString))
149          return InteractionTrigger.UPDATE;
150        if ("delete".equals(codeString))
151          return InteractionTrigger.DELETE;
152        throw new IllegalArgumentException("Unknown InteractionTrigger code '"+codeString+"'");
153        }
154        public Enumeration<InteractionTrigger> fromType(Base code) throws FHIRException {
155          if (code == null)
156            return null;
157          if (code.isEmpty())
158            return new Enumeration<InteractionTrigger>(this);
159          String codeString = ((PrimitiveType) code).asStringValue();
160          if (codeString == null || "".equals(codeString))
161            return null;
162        if ("create".equals(codeString))
163          return new Enumeration<InteractionTrigger>(this, InteractionTrigger.CREATE);
164        if ("update".equals(codeString))
165          return new Enumeration<InteractionTrigger>(this, InteractionTrigger.UPDATE);
166        if ("delete".equals(codeString))
167          return new Enumeration<InteractionTrigger>(this, InteractionTrigger.DELETE);
168        throw new FHIRException("Unknown InteractionTrigger code '"+codeString+"'");
169        }
170    public String toCode(InteractionTrigger code) {
171      if (code == InteractionTrigger.CREATE)
172        return "create";
173      if (code == InteractionTrigger.UPDATE)
174        return "update";
175      if (code == InteractionTrigger.DELETE)
176        return "delete";
177      return "?";
178      }
179    public String toSystem(InteractionTrigger code) {
180      return code.getSystem();
181      }
182    }
183
184    public enum TopicFilterByMatchType {
185        /**
186         * Used to match a value according to FHIR Search rules (e.g., Patient/123, Encounter/2002).
187         */
188        EQUAL, 
189        /**
190         * The key value in the topic stream is an active members of the reference set identified by the concept provided as the filter value.
191         */
192        IN, 
193        /**
194         * The key value in the topic stream is NOT an active members of the reference set identified by the concept provided as the filter value.
195         */
196        NOTIN, 
197        /**
198         * The key value is subsumes the value in the filter value.
199         */
200        ABOVE, 
201        /**
202         * The key value is subsumed by the value in the filter value.
203         */
204        BELOW, 
205        /**
206         * added to help the parsers with the generic types
207         */
208        NULL;
209        public static TopicFilterByMatchType fromCode(String codeString) throws FHIRException {
210            if (codeString == null || "".equals(codeString))
211                return null;
212        if ("=".equals(codeString))
213          return EQUAL;
214        if ("in".equals(codeString))
215          return IN;
216        if ("not-in".equals(codeString))
217          return NOTIN;
218        if ("above".equals(codeString))
219          return ABOVE;
220        if ("below".equals(codeString))
221          return BELOW;
222        if (Configuration.isAcceptInvalidEnums())
223          return null;
224        else
225          throw new FHIRException("Unknown TopicFilterByMatchType code '"+codeString+"'");
226        }
227        public String toCode() {
228          switch (this) {
229            case EQUAL: return "=";
230            case IN: return "in";
231            case NOTIN: return "not-in";
232            case ABOVE: return "above";
233            case BELOW: return "below";
234            default: return "?";
235          }
236        }
237        public String getSystem() {
238          switch (this) {
239            case EQUAL: return "http://hl7.org/fhir/topic-match-operator";
240            case IN: return "http://hl7.org/fhir/topic-match-operator";
241            case NOTIN: return "http://hl7.org/fhir/topic-match-operator";
242            case ABOVE: return "http://hl7.org/fhir/topic-match-operator";
243            case BELOW: return "http://hl7.org/fhir/topic-match-operator";
244            default: return "?";
245          }
246        }
247        public String getDefinition() {
248          switch (this) {
249            case EQUAL: return "Used to match a value according to FHIR Search rules (e.g., Patient/123, Encounter/2002).";
250            case IN: return "The key value in the topic stream is an active members of the reference set identified by the concept provided as the filter value.";
251            case NOTIN: return "The key value in the topic stream is NOT an active members of the reference set identified by the concept provided as the filter value.";
252            case ABOVE: return "The key value is subsumes the value in the filter value.";
253            case BELOW: return "The key value is subsumed by the value in the filter value.";
254            default: return "?";
255          }
256        }
257        public String getDisplay() {
258          switch (this) {
259            case EQUAL: return "=";
260            case IN: return "in";
261            case NOTIN: return "not-in";
262            case ABOVE: return "above";
263            case BELOW: return "below";
264            default: return "?";
265          }
266        }
267    }
268
269  public static class TopicFilterByMatchTypeEnumFactory implements EnumFactory<TopicFilterByMatchType> {
270    public TopicFilterByMatchType fromCode(String codeString) throws IllegalArgumentException {
271      if (codeString == null || "".equals(codeString))
272            if (codeString == null || "".equals(codeString))
273                return null;
274        if ("=".equals(codeString))
275          return TopicFilterByMatchType.EQUAL;
276        if ("in".equals(codeString))
277          return TopicFilterByMatchType.IN;
278        if ("not-in".equals(codeString))
279          return TopicFilterByMatchType.NOTIN;
280        if ("above".equals(codeString))
281          return TopicFilterByMatchType.ABOVE;
282        if ("below".equals(codeString))
283          return TopicFilterByMatchType.BELOW;
284        throw new IllegalArgumentException("Unknown TopicFilterByMatchType code '"+codeString+"'");
285        }
286        public Enumeration<TopicFilterByMatchType> fromType(Base code) throws FHIRException {
287          if (code == null)
288            return null;
289          if (code.isEmpty())
290            return new Enumeration<TopicFilterByMatchType>(this);
291          String codeString = ((PrimitiveType) code).asStringValue();
292          if (codeString == null || "".equals(codeString))
293            return null;
294        if ("=".equals(codeString))
295          return new Enumeration<TopicFilterByMatchType>(this, TopicFilterByMatchType.EQUAL);
296        if ("in".equals(codeString))
297          return new Enumeration<TopicFilterByMatchType>(this, TopicFilterByMatchType.IN);
298        if ("not-in".equals(codeString))
299          return new Enumeration<TopicFilterByMatchType>(this, TopicFilterByMatchType.NOTIN);
300        if ("above".equals(codeString))
301          return new Enumeration<TopicFilterByMatchType>(this, TopicFilterByMatchType.ABOVE);
302        if ("below".equals(codeString))
303          return new Enumeration<TopicFilterByMatchType>(this, TopicFilterByMatchType.BELOW);
304        throw new FHIRException("Unknown TopicFilterByMatchType code '"+codeString+"'");
305        }
306    public String toCode(TopicFilterByMatchType code) {
307      if (code == TopicFilterByMatchType.EQUAL)
308        return "=";
309      if (code == TopicFilterByMatchType.IN)
310        return "in";
311      if (code == TopicFilterByMatchType.NOTIN)
312        return "not-in";
313      if (code == TopicFilterByMatchType.ABOVE)
314        return "above";
315      if (code == TopicFilterByMatchType.BELOW)
316        return "below";
317      return "?";
318      }
319    public String toSystem(TopicFilterByMatchType code) {
320      return code.getSystem();
321      }
322    }
323
324    @Block()
325    public static class TopicResourceTriggerComponent extends BackboneElement implements IBaseBackboneElement {
326        /**
327         * The human readable description of what triggers inclusion into this topic -  for example, "Beginning of a clinical encounter".
328         */
329        @Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
330        @Description(shortDefinition="Text representation of the trigger", formalDefinition="The human readable description of what triggers inclusion into this topic -  for example, \"Beginning of a clinical encounter\"." )
331        protected StringType description;
332
333        /**
334         * The list of resource types that are candidates for this topic.  For example, the Encounter resource is updated in an 'admission' topic.
335         */
336        @Child(name = "resourceType", type = {CodeType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
337        @Description(shortDefinition="Candidate types for this topic", formalDefinition="The list of resource types that are candidates for this topic.  For example, the Encounter resource is updated in an 'admission' topic." )
338        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
339        protected List<CodeType> resourceType;
340
341        /**
342         * The REST interaction based rules that the server should use to determine when to trigger a notification for this topic.
343         */
344        @Child(name = "methodCriteria", type = {CodeType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
345        @Description(shortDefinition="create | update | delete", formalDefinition="The REST interaction based rules that the server should use to determine when to trigger a notification for this topic." )
346        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/interaction-trigger")
347        protected List<Enumeration<InteractionTrigger>> methodCriteria;
348
349        /**
350         * The FHIR query based rules that the server should use to determine when to trigger a notification for this topic.
351         */
352        @Child(name = "queryCriteria", type = {}, order=4, min=0, max=1, modifier=false, summary=true)
353        @Description(shortDefinition="Query based trigger rule", formalDefinition="The FHIR query based rules that the server should use to determine when to trigger a notification for this topic." )
354        protected TopicResourceTriggerQueryCriteriaComponent queryCriteria;
355
356        /**
357         * The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.
358         */
359        @Child(name = "fhirPathCriteria", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true)
360        @Description(shortDefinition="FHIRPath based trigger rule", formalDefinition="The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic." )
361        protected StringType fhirPathCriteria;
362
363        private static final long serialVersionUID = 1020326735L;
364
365    /**
366     * Constructor
367     */
368      public TopicResourceTriggerComponent() {
369        super();
370      }
371
372        /**
373         * @return {@link #description} (The human readable description of what triggers inclusion into this topic -  for example, "Beginning of a clinical encounter".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
374         */
375        public StringType getDescriptionElement() { 
376          if (this.description == null)
377            if (Configuration.errorOnAutoCreate())
378              throw new Error("Attempt to auto-create TopicResourceTriggerComponent.description");
379            else if (Configuration.doAutoCreate())
380              this.description = new StringType(); // bb
381          return this.description;
382        }
383
384        public boolean hasDescriptionElement() { 
385          return this.description != null && !this.description.isEmpty();
386        }
387
388        public boolean hasDescription() { 
389          return this.description != null && !this.description.isEmpty();
390        }
391
392        /**
393         * @param value {@link #description} (The human readable description of what triggers inclusion into this topic -  for example, "Beginning of a clinical encounter".). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
394         */
395        public TopicResourceTriggerComponent setDescriptionElement(StringType value) { 
396          this.description = value;
397          return this;
398        }
399
400        /**
401         * @return The human readable description of what triggers inclusion into this topic -  for example, "Beginning of a clinical encounter".
402         */
403        public String getDescription() { 
404          return this.description == null ? null : this.description.getValue();
405        }
406
407        /**
408         * @param value The human readable description of what triggers inclusion into this topic -  for example, "Beginning of a clinical encounter".
409         */
410        public TopicResourceTriggerComponent setDescription(String value) { 
411          if (Utilities.noString(value))
412            this.description = null;
413          else {
414            if (this.description == null)
415              this.description = new StringType();
416            this.description.setValue(value);
417          }
418          return this;
419        }
420
421        /**
422         * @return {@link #resourceType} (The list of resource types that are candidates for this topic.  For example, the Encounter resource is updated in an 'admission' topic.)
423         */
424        public List<CodeType> getResourceType() { 
425          if (this.resourceType == null)
426            this.resourceType = new ArrayList<CodeType>();
427          return this.resourceType;
428        }
429
430        /**
431         * @return Returns a reference to <code>this</code> for easy method chaining
432         */
433        public TopicResourceTriggerComponent setResourceType(List<CodeType> theResourceType) { 
434          this.resourceType = theResourceType;
435          return this;
436        }
437
438        public boolean hasResourceType() { 
439          if (this.resourceType == null)
440            return false;
441          for (CodeType item : this.resourceType)
442            if (!item.isEmpty())
443              return true;
444          return false;
445        }
446
447        /**
448         * @return {@link #resourceType} (The list of resource types that are candidates for this topic.  For example, the Encounter resource is updated in an 'admission' topic.)
449         */
450        public CodeType addResourceTypeElement() {//2 
451          CodeType t = new CodeType();
452          if (this.resourceType == null)
453            this.resourceType = new ArrayList<CodeType>();
454          this.resourceType.add(t);
455          return t;
456        }
457
458        /**
459         * @param value {@link #resourceType} (The list of resource types that are candidates for this topic.  For example, the Encounter resource is updated in an 'admission' topic.)
460         */
461        public TopicResourceTriggerComponent addResourceType(String value) { //1
462          CodeType t = new CodeType();
463          t.setValue(value);
464          if (this.resourceType == null)
465            this.resourceType = new ArrayList<CodeType>();
466          this.resourceType.add(t);
467          return this;
468        }
469
470        /**
471         * @param value {@link #resourceType} (The list of resource types that are candidates for this topic.  For example, the Encounter resource is updated in an 'admission' topic.)
472         */
473        public boolean hasResourceType(String value) { 
474          if (this.resourceType == null)
475            return false;
476          for (CodeType v : this.resourceType)
477            if (v.getValue().equals(value)) // code
478              return true;
479          return false;
480        }
481
482        /**
483         * @return {@link #methodCriteria} (The REST interaction based rules that the server should use to determine when to trigger a notification for this topic.)
484         */
485        public List<Enumeration<InteractionTrigger>> getMethodCriteria() { 
486          if (this.methodCriteria == null)
487            this.methodCriteria = new ArrayList<Enumeration<InteractionTrigger>>();
488          return this.methodCriteria;
489        }
490
491        /**
492         * @return Returns a reference to <code>this</code> for easy method chaining
493         */
494        public TopicResourceTriggerComponent setMethodCriteria(List<Enumeration<InteractionTrigger>> theMethodCriteria) { 
495          this.methodCriteria = theMethodCriteria;
496          return this;
497        }
498
499        public boolean hasMethodCriteria() { 
500          if (this.methodCriteria == null)
501            return false;
502          for (Enumeration<InteractionTrigger> item : this.methodCriteria)
503            if (!item.isEmpty())
504              return true;
505          return false;
506        }
507
508        /**
509         * @return {@link #methodCriteria} (The REST interaction based rules that the server should use to determine when to trigger a notification for this topic.)
510         */
511        public Enumeration<InteractionTrigger> addMethodCriteriaElement() {//2 
512          Enumeration<InteractionTrigger> t = new Enumeration<InteractionTrigger>(new InteractionTriggerEnumFactory());
513          if (this.methodCriteria == null)
514            this.methodCriteria = new ArrayList<Enumeration<InteractionTrigger>>();
515          this.methodCriteria.add(t);
516          return t;
517        }
518
519        /**
520         * @param value {@link #methodCriteria} (The REST interaction based rules that the server should use to determine when to trigger a notification for this topic.)
521         */
522        public TopicResourceTriggerComponent addMethodCriteria(InteractionTrigger value) { //1
523          Enumeration<InteractionTrigger> t = new Enumeration<InteractionTrigger>(new InteractionTriggerEnumFactory());
524          t.setValue(value);
525          if (this.methodCriteria == null)
526            this.methodCriteria = new ArrayList<Enumeration<InteractionTrigger>>();
527          this.methodCriteria.add(t);
528          return this;
529        }
530
531        /**
532         * @param value {@link #methodCriteria} (The REST interaction based rules that the server should use to determine when to trigger a notification for this topic.)
533         */
534        public boolean hasMethodCriteria(InteractionTrigger value) { 
535          if (this.methodCriteria == null)
536            return false;
537          for (Enumeration<InteractionTrigger> v : this.methodCriteria)
538            if (v.getValue().equals(value)) // code
539              return true;
540          return false;
541        }
542
543        /**
544         * @return {@link #queryCriteria} (The FHIR query based rules that the server should use to determine when to trigger a notification for this topic.)
545         */
546        public TopicResourceTriggerQueryCriteriaComponent getQueryCriteria() { 
547          if (this.queryCriteria == null)
548            if (Configuration.errorOnAutoCreate())
549              throw new Error("Attempt to auto-create TopicResourceTriggerComponent.queryCriteria");
550            else if (Configuration.doAutoCreate())
551              this.queryCriteria = new TopicResourceTriggerQueryCriteriaComponent(); // cc
552          return this.queryCriteria;
553        }
554
555        public boolean hasQueryCriteria() { 
556          return this.queryCriteria != null && !this.queryCriteria.isEmpty();
557        }
558
559        /**
560         * @param value {@link #queryCriteria} (The FHIR query based rules that the server should use to determine when to trigger a notification for this topic.)
561         */
562        public TopicResourceTriggerComponent setQueryCriteria(TopicResourceTriggerQueryCriteriaComponent value) { 
563          this.queryCriteria = value;
564          return this;
565        }
566
567        /**
568         * @return {@link #fhirPathCriteria} (The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.). This is the underlying object with id, value and extensions. The accessor "getFhirPathCriteria" gives direct access to the value
569         */
570        public StringType getFhirPathCriteriaElement() { 
571          if (this.fhirPathCriteria == null)
572            if (Configuration.errorOnAutoCreate())
573              throw new Error("Attempt to auto-create TopicResourceTriggerComponent.fhirPathCriteria");
574            else if (Configuration.doAutoCreate())
575              this.fhirPathCriteria = new StringType(); // bb
576          return this.fhirPathCriteria;
577        }
578
579        public boolean hasFhirPathCriteriaElement() { 
580          return this.fhirPathCriteria != null && !this.fhirPathCriteria.isEmpty();
581        }
582
583        public boolean hasFhirPathCriteria() { 
584          return this.fhirPathCriteria != null && !this.fhirPathCriteria.isEmpty();
585        }
586
587        /**
588         * @param value {@link #fhirPathCriteria} (The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.). This is the underlying object with id, value and extensions. The accessor "getFhirPathCriteria" gives direct access to the value
589         */
590        public TopicResourceTriggerComponent setFhirPathCriteriaElement(StringType value) { 
591          this.fhirPathCriteria = value;
592          return this;
593        }
594
595        /**
596         * @return The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.
597         */
598        public String getFhirPathCriteria() { 
599          return this.fhirPathCriteria == null ? null : this.fhirPathCriteria.getValue();
600        }
601
602        /**
603         * @param value The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.
604         */
605        public TopicResourceTriggerComponent setFhirPathCriteria(String value) { 
606          if (Utilities.noString(value))
607            this.fhirPathCriteria = null;
608          else {
609            if (this.fhirPathCriteria == null)
610              this.fhirPathCriteria = new StringType();
611            this.fhirPathCriteria.setValue(value);
612          }
613          return this;
614        }
615
616        protected void listChildren(List<Property> children) {
617          super.listChildren(children);
618          children.add(new Property("description", "string", "The human readable description of what triggers inclusion into this topic -  for example, \"Beginning of a clinical encounter\".", 0, 1, description));
619          children.add(new Property("resourceType", "code", "The list of resource types that are candidates for this topic.  For example, the Encounter resource is updated in an 'admission' topic.", 0, java.lang.Integer.MAX_VALUE, resourceType));
620          children.add(new Property("methodCriteria", "code", "The REST interaction based rules that the server should use to determine when to trigger a notification for this topic.", 0, java.lang.Integer.MAX_VALUE, methodCriteria));
621          children.add(new Property("queryCriteria", "", "The FHIR query based rules that the server should use to determine when to trigger a notification for this topic.", 0, 1, queryCriteria));
622          children.add(new Property("fhirPathCriteria", "string", "The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.", 0, 1, fhirPathCriteria));
623        }
624
625        @Override
626        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
627          switch (_hash) {
628          case -1724546052: /*description*/  return new Property("description", "string", "The human readable description of what triggers inclusion into this topic -  for example, \"Beginning of a clinical encounter\".", 0, 1, description);
629          case -384364440: /*resourceType*/  return new Property("resourceType", "code", "The list of resource types that are candidates for this topic.  For example, the Encounter resource is updated in an 'admission' topic.", 0, java.lang.Integer.MAX_VALUE, resourceType);
630          case -1924160672: /*methodCriteria*/  return new Property("methodCriteria", "code", "The REST interaction based rules that the server should use to determine when to trigger a notification for this topic.", 0, java.lang.Integer.MAX_VALUE, methodCriteria);
631          case -545123257: /*queryCriteria*/  return new Property("queryCriteria", "", "The FHIR query based rules that the server should use to determine when to trigger a notification for this topic.", 0, 1, queryCriteria);
632          case 1929785263: /*fhirPathCriteria*/  return new Property("fhirPathCriteria", "string", "The FHIRPath based rules that the server should use to determine when to trigger a notification for this topic.", 0, 1, fhirPathCriteria);
633          default: return super.getNamedProperty(_hash, _name, _checkValid);
634          }
635
636        }
637
638      @Override
639      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
640        switch (hash) {
641        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
642        case -384364440: /*resourceType*/ return this.resourceType == null ? new Base[0] : this.resourceType.toArray(new Base[this.resourceType.size()]); // CodeType
643        case -1924160672: /*methodCriteria*/ return this.methodCriteria == null ? new Base[0] : this.methodCriteria.toArray(new Base[this.methodCriteria.size()]); // Enumeration<InteractionTrigger>
644        case -545123257: /*queryCriteria*/ return this.queryCriteria == null ? new Base[0] : new Base[] {this.queryCriteria}; // TopicResourceTriggerQueryCriteriaComponent
645        case 1929785263: /*fhirPathCriteria*/ return this.fhirPathCriteria == null ? new Base[0] : new Base[] {this.fhirPathCriteria}; // StringType
646        default: return super.getProperty(hash, name, checkValid);
647        }
648
649      }
650
651      @Override
652      public Base setProperty(int hash, String name, Base value) throws FHIRException {
653        switch (hash) {
654        case -1724546052: // description
655          this.description = TypeConvertor.castToString(value); // StringType
656          return value;
657        case -384364440: // resourceType
658          this.getResourceType().add(TypeConvertor.castToCode(value)); // CodeType
659          return value;
660        case -1924160672: // methodCriteria
661          value = new InteractionTriggerEnumFactory().fromType(TypeConvertor.castToCode(value));
662          this.getMethodCriteria().add((Enumeration) value); // Enumeration<InteractionTrigger>
663          return value;
664        case -545123257: // queryCriteria
665          this.queryCriteria = (TopicResourceTriggerQueryCriteriaComponent) value; // TopicResourceTriggerQueryCriteriaComponent
666          return value;
667        case 1929785263: // fhirPathCriteria
668          this.fhirPathCriteria = TypeConvertor.castToString(value); // StringType
669          return value;
670        default: return super.setProperty(hash, name, value);
671        }
672
673      }
674
675      @Override
676      public Base setProperty(String name, Base value) throws FHIRException {
677        if (name.equals("description")) {
678          this.description = TypeConvertor.castToString(value); // StringType
679        } else if (name.equals("resourceType")) {
680          this.getResourceType().add(TypeConvertor.castToCode(value));
681        } else if (name.equals("methodCriteria")) {
682          value = new InteractionTriggerEnumFactory().fromType(TypeConvertor.castToCode(value));
683          this.getMethodCriteria().add((Enumeration) value);
684        } else if (name.equals("queryCriteria")) {
685          this.queryCriteria = (TopicResourceTriggerQueryCriteriaComponent) value; // TopicResourceTriggerQueryCriteriaComponent
686        } else if (name.equals("fhirPathCriteria")) {
687          this.fhirPathCriteria = TypeConvertor.castToString(value); // StringType
688        } else
689          return super.setProperty(name, value);
690        return value;
691      }
692
693      @Override
694      public Base makeProperty(int hash, String name) throws FHIRException {
695        switch (hash) {
696        case -1724546052:  return getDescriptionElement();
697        case -384364440:  return addResourceTypeElement();
698        case -1924160672:  return addMethodCriteriaElement();
699        case -545123257:  return getQueryCriteria();
700        case 1929785263:  return getFhirPathCriteriaElement();
701        default: return super.makeProperty(hash, name);
702        }
703
704      }
705
706      @Override
707      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
708        switch (hash) {
709        case -1724546052: /*description*/ return new String[] {"string"};
710        case -384364440: /*resourceType*/ return new String[] {"code"};
711        case -1924160672: /*methodCriteria*/ return new String[] {"code"};
712        case -545123257: /*queryCriteria*/ return new String[] {};
713        case 1929785263: /*fhirPathCriteria*/ return new String[] {"string"};
714        default: return super.getTypesForProperty(hash, name);
715        }
716
717      }
718
719      @Override
720      public Base addChild(String name) throws FHIRException {
721        if (name.equals("description")) {
722          throw new FHIRException("Cannot call addChild on a primitive type Topic.resourceTrigger.description");
723        }
724        else if (name.equals("resourceType")) {
725          throw new FHIRException("Cannot call addChild on a primitive type Topic.resourceTrigger.resourceType");
726        }
727        else if (name.equals("methodCriteria")) {
728          throw new FHIRException("Cannot call addChild on a primitive type Topic.resourceTrigger.methodCriteria");
729        }
730        else if (name.equals("queryCriteria")) {
731          this.queryCriteria = new TopicResourceTriggerQueryCriteriaComponent();
732          return this.queryCriteria;
733        }
734        else if (name.equals("fhirPathCriteria")) {
735          throw new FHIRException("Cannot call addChild on a primitive type Topic.resourceTrigger.fhirPathCriteria");
736        }
737        else
738          return super.addChild(name);
739      }
740
741      public TopicResourceTriggerComponent copy() {
742        TopicResourceTriggerComponent dst = new TopicResourceTriggerComponent();
743        copyValues(dst);
744        return dst;
745      }
746
747      public void copyValues(TopicResourceTriggerComponent dst) {
748        super.copyValues(dst);
749        dst.description = description == null ? null : description.copy();
750        if (resourceType != null) {
751          dst.resourceType = new ArrayList<CodeType>();
752          for (CodeType i : resourceType)
753            dst.resourceType.add(i.copy());
754        };
755        if (methodCriteria != null) {
756          dst.methodCriteria = new ArrayList<Enumeration<InteractionTrigger>>();
757          for (Enumeration<InteractionTrigger> i : methodCriteria)
758            dst.methodCriteria.add(i.copy());
759        };
760        dst.queryCriteria = queryCriteria == null ? null : queryCriteria.copy();
761        dst.fhirPathCriteria = fhirPathCriteria == null ? null : fhirPathCriteria.copy();
762      }
763
764      @Override
765      public boolean equalsDeep(Base other_) {
766        if (!super.equalsDeep(other_))
767          return false;
768        if (!(other_ instanceof TopicResourceTriggerComponent))
769          return false;
770        TopicResourceTriggerComponent o = (TopicResourceTriggerComponent) other_;
771        return compareDeep(description, o.description, true) && compareDeep(resourceType, o.resourceType, true)
772           && compareDeep(methodCriteria, o.methodCriteria, true) && compareDeep(queryCriteria, o.queryCriteria, true)
773           && compareDeep(fhirPathCriteria, o.fhirPathCriteria, true);
774      }
775
776      @Override
777      public boolean equalsShallow(Base other_) {
778        if (!super.equalsShallow(other_))
779          return false;
780        if (!(other_ instanceof TopicResourceTriggerComponent))
781          return false;
782        TopicResourceTriggerComponent o = (TopicResourceTriggerComponent) other_;
783        return compareValues(description, o.description, true) && compareValues(resourceType, o.resourceType, true)
784           && compareValues(methodCriteria, o.methodCriteria, true) && compareValues(fhirPathCriteria, o.fhirPathCriteria, true)
785          ;
786      }
787
788      public boolean isEmpty() {
789        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, resourceType
790          , methodCriteria, queryCriteria, fhirPathCriteria);
791      }
792
793  public String fhirType() {
794    return "Topic.resourceTrigger";
795
796  }
797
798  }
799
800    @Block()
801    public static class TopicResourceTriggerQueryCriteriaComponent extends BackboneElement implements IBaseBackboneElement {
802        /**
803         * The FHIR query based rules are applied to the previous resource state.
804         */
805        @Child(name = "previous", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
806        @Description(shortDefinition="Rule applied to previous resource state", formalDefinition="The FHIR query based rules are applied to the previous resource state." )
807        protected StringType previous;
808
809        /**
810         * The FHIR query based rules are applied to the current resource state.
811         */
812        @Child(name = "current", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
813        @Description(shortDefinition="Rule applied to current resource state", formalDefinition="The FHIR query based rules are applied to the current resource state." )
814        protected StringType current;
815
816        /**
817         * If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true.
818         */
819        @Child(name = "requireBoth", type = {BooleanType.class}, order=3, min=0, max=1, modifier=false, summary=true)
820        @Description(shortDefinition="Both must be true flag", formalDefinition="If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true." )
821        protected BooleanType requireBoth;
822
823        private static final long serialVersionUID = -1611265114L;
824
825    /**
826     * Constructor
827     */
828      public TopicResourceTriggerQueryCriteriaComponent() {
829        super();
830      }
831
832        /**
833         * @return {@link #previous} (The FHIR query based rules are applied to the previous resource state.). This is the underlying object with id, value and extensions. The accessor "getPrevious" gives direct access to the value
834         */
835        public StringType getPreviousElement() { 
836          if (this.previous == null)
837            if (Configuration.errorOnAutoCreate())
838              throw new Error("Attempt to auto-create TopicResourceTriggerQueryCriteriaComponent.previous");
839            else if (Configuration.doAutoCreate())
840              this.previous = new StringType(); // bb
841          return this.previous;
842        }
843
844        public boolean hasPreviousElement() { 
845          return this.previous != null && !this.previous.isEmpty();
846        }
847
848        public boolean hasPrevious() { 
849          return this.previous != null && !this.previous.isEmpty();
850        }
851
852        /**
853         * @param value {@link #previous} (The FHIR query based rules are applied to the previous resource state.). This is the underlying object with id, value and extensions. The accessor "getPrevious" gives direct access to the value
854         */
855        public TopicResourceTriggerQueryCriteriaComponent setPreviousElement(StringType value) { 
856          this.previous = value;
857          return this;
858        }
859
860        /**
861         * @return The FHIR query based rules are applied to the previous resource state.
862         */
863        public String getPrevious() { 
864          return this.previous == null ? null : this.previous.getValue();
865        }
866
867        /**
868         * @param value The FHIR query based rules are applied to the previous resource state.
869         */
870        public TopicResourceTriggerQueryCriteriaComponent setPrevious(String value) { 
871          if (Utilities.noString(value))
872            this.previous = null;
873          else {
874            if (this.previous == null)
875              this.previous = new StringType();
876            this.previous.setValue(value);
877          }
878          return this;
879        }
880
881        /**
882         * @return {@link #current} (The FHIR query based rules are applied to the current resource state.). This is the underlying object with id, value and extensions. The accessor "getCurrent" gives direct access to the value
883         */
884        public StringType getCurrentElement() { 
885          if (this.current == null)
886            if (Configuration.errorOnAutoCreate())
887              throw new Error("Attempt to auto-create TopicResourceTriggerQueryCriteriaComponent.current");
888            else if (Configuration.doAutoCreate())
889              this.current = new StringType(); // bb
890          return this.current;
891        }
892
893        public boolean hasCurrentElement() { 
894          return this.current != null && !this.current.isEmpty();
895        }
896
897        public boolean hasCurrent() { 
898          return this.current != null && !this.current.isEmpty();
899        }
900
901        /**
902         * @param value {@link #current} (The FHIR query based rules are applied to the current resource state.). This is the underlying object with id, value and extensions. The accessor "getCurrent" gives direct access to the value
903         */
904        public TopicResourceTriggerQueryCriteriaComponent setCurrentElement(StringType value) { 
905          this.current = value;
906          return this;
907        }
908
909        /**
910         * @return The FHIR query based rules are applied to the current resource state.
911         */
912        public String getCurrent() { 
913          return this.current == null ? null : this.current.getValue();
914        }
915
916        /**
917         * @param value The FHIR query based rules are applied to the current resource state.
918         */
919        public TopicResourceTriggerQueryCriteriaComponent setCurrent(String value) { 
920          if (Utilities.noString(value))
921            this.current = null;
922          else {
923            if (this.current == null)
924              this.current = new StringType();
925            this.current.setValue(value);
926          }
927          return this;
928        }
929
930        /**
931         * @return {@link #requireBoth} (If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true.). This is the underlying object with id, value and extensions. The accessor "getRequireBoth" gives direct access to the value
932         */
933        public BooleanType getRequireBothElement() { 
934          if (this.requireBoth == null)
935            if (Configuration.errorOnAutoCreate())
936              throw new Error("Attempt to auto-create TopicResourceTriggerQueryCriteriaComponent.requireBoth");
937            else if (Configuration.doAutoCreate())
938              this.requireBoth = new BooleanType(); // bb
939          return this.requireBoth;
940        }
941
942        public boolean hasRequireBothElement() { 
943          return this.requireBoth != null && !this.requireBoth.isEmpty();
944        }
945
946        public boolean hasRequireBoth() { 
947          return this.requireBoth != null && !this.requireBoth.isEmpty();
948        }
949
950        /**
951         * @param value {@link #requireBoth} (If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true.). This is the underlying object with id, value and extensions. The accessor "getRequireBoth" gives direct access to the value
952         */
953        public TopicResourceTriggerQueryCriteriaComponent setRequireBothElement(BooleanType value) { 
954          this.requireBoth = value;
955          return this;
956        }
957
958        /**
959         * @return If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true.
960         */
961        public boolean getRequireBoth() { 
962          return this.requireBoth == null || this.requireBoth.isEmpty() ? false : this.requireBoth.getValue();
963        }
964
965        /**
966         * @param value If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true.
967         */
968        public TopicResourceTriggerQueryCriteriaComponent setRequireBoth(boolean value) { 
969            if (this.requireBoth == null)
970              this.requireBoth = new BooleanType();
971            this.requireBoth.setValue(value);
972          return this;
973        }
974
975        protected void listChildren(List<Property> children) {
976          super.listChildren(children);
977          children.add(new Property("previous", "string", "The FHIR query based rules are applied to the previous resource state.", 0, 1, previous));
978          children.add(new Property("current", "string", "The FHIR query based rules are applied to the current resource state.", 0, 1, current));
979          children.add(new Property("requireBoth", "boolean", "If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true.", 0, 1, requireBoth));
980        }
981
982        @Override
983        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
984          switch (_hash) {
985          case -1273775369: /*previous*/  return new Property("previous", "string", "The FHIR query based rules are applied to the previous resource state.", 0, 1, previous);
986          case 1126940025: /*current*/  return new Property("current", "string", "The FHIR query based rules are applied to the current resource state.", 0, 1, current);
987          case 362116742: /*requireBoth*/  return new Property("requireBoth", "boolean", "If set to true, both current and previous criteria must evaluate true to  trigger a notification for this topic.  Otherwise a notification for this topic will be triggered if either one evaluates to true.", 0, 1, requireBoth);
988          default: return super.getNamedProperty(_hash, _name, _checkValid);
989          }
990
991        }
992
993      @Override
994      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
995        switch (hash) {
996        case -1273775369: /*previous*/ return this.previous == null ? new Base[0] : new Base[] {this.previous}; // StringType
997        case 1126940025: /*current*/ return this.current == null ? new Base[0] : new Base[] {this.current}; // StringType
998        case 362116742: /*requireBoth*/ return this.requireBoth == null ? new Base[0] : new Base[] {this.requireBoth}; // BooleanType
999        default: return super.getProperty(hash, name, checkValid);
1000        }
1001
1002      }
1003
1004      @Override
1005      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1006        switch (hash) {
1007        case -1273775369: // previous
1008          this.previous = TypeConvertor.castToString(value); // StringType
1009          return value;
1010        case 1126940025: // current
1011          this.current = TypeConvertor.castToString(value); // StringType
1012          return value;
1013        case 362116742: // requireBoth
1014          this.requireBoth = TypeConvertor.castToBoolean(value); // BooleanType
1015          return value;
1016        default: return super.setProperty(hash, name, value);
1017        }
1018
1019      }
1020
1021      @Override
1022      public Base setProperty(String name, Base value) throws FHIRException {
1023        if (name.equals("previous")) {
1024          this.previous = TypeConvertor.castToString(value); // StringType
1025        } else if (name.equals("current")) {
1026          this.current = TypeConvertor.castToString(value); // StringType
1027        } else if (name.equals("requireBoth")) {
1028          this.requireBoth = TypeConvertor.castToBoolean(value); // BooleanType
1029        } else
1030          return super.setProperty(name, value);
1031        return value;
1032      }
1033
1034      @Override
1035      public Base makeProperty(int hash, String name) throws FHIRException {
1036        switch (hash) {
1037        case -1273775369:  return getPreviousElement();
1038        case 1126940025:  return getCurrentElement();
1039        case 362116742:  return getRequireBothElement();
1040        default: return super.makeProperty(hash, name);
1041        }
1042
1043      }
1044
1045      @Override
1046      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1047        switch (hash) {
1048        case -1273775369: /*previous*/ return new String[] {"string"};
1049        case 1126940025: /*current*/ return new String[] {"string"};
1050        case 362116742: /*requireBoth*/ return new String[] {"boolean"};
1051        default: return super.getTypesForProperty(hash, name);
1052        }
1053
1054      }
1055
1056      @Override
1057      public Base addChild(String name) throws FHIRException {
1058        if (name.equals("previous")) {
1059          throw new FHIRException("Cannot call addChild on a primitive type Topic.resourceTrigger.queryCriteria.previous");
1060        }
1061        else if (name.equals("current")) {
1062          throw new FHIRException("Cannot call addChild on a primitive type Topic.resourceTrigger.queryCriteria.current");
1063        }
1064        else if (name.equals("requireBoth")) {
1065          throw new FHIRException("Cannot call addChild on a primitive type Topic.resourceTrigger.queryCriteria.requireBoth");
1066        }
1067        else
1068          return super.addChild(name);
1069      }
1070
1071      public TopicResourceTriggerQueryCriteriaComponent copy() {
1072        TopicResourceTriggerQueryCriteriaComponent dst = new TopicResourceTriggerQueryCriteriaComponent();
1073        copyValues(dst);
1074        return dst;
1075      }
1076
1077      public void copyValues(TopicResourceTriggerQueryCriteriaComponent dst) {
1078        super.copyValues(dst);
1079        dst.previous = previous == null ? null : previous.copy();
1080        dst.current = current == null ? null : current.copy();
1081        dst.requireBoth = requireBoth == null ? null : requireBoth.copy();
1082      }
1083
1084      @Override
1085      public boolean equalsDeep(Base other_) {
1086        if (!super.equalsDeep(other_))
1087          return false;
1088        if (!(other_ instanceof TopicResourceTriggerQueryCriteriaComponent))
1089          return false;
1090        TopicResourceTriggerQueryCriteriaComponent o = (TopicResourceTriggerQueryCriteriaComponent) other_;
1091        return compareDeep(previous, o.previous, true) && compareDeep(current, o.current, true) && compareDeep(requireBoth, o.requireBoth, true)
1092          ;
1093      }
1094
1095      @Override
1096      public boolean equalsShallow(Base other_) {
1097        if (!super.equalsShallow(other_))
1098          return false;
1099        if (!(other_ instanceof TopicResourceTriggerQueryCriteriaComponent))
1100          return false;
1101        TopicResourceTriggerQueryCriteriaComponent o = (TopicResourceTriggerQueryCriteriaComponent) other_;
1102        return compareValues(previous, o.previous, true) && compareValues(current, o.current, true) && compareValues(requireBoth, o.requireBoth, true)
1103          ;
1104      }
1105
1106      public boolean isEmpty() {
1107        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(previous, current, requireBoth
1108          );
1109      }
1110
1111  public String fhirType() {
1112    return "Topic.resourceTrigger.queryCriteria";
1113
1114  }
1115
1116  }
1117
1118    @Block()
1119    public static class TopicCanFilterByComponent extends BackboneElement implements IBaseBackboneElement {
1120        /**
1121         * A search parameter (like "patient") which is a label for the filter.
1122         */
1123        @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
1124        @Description(shortDefinition="Search parameter that serves as filter key", formalDefinition="A search parameter (like \"patient\") which is a label for the filter." )
1125        protected StringType name;
1126
1127        /**
1128         * Allowable operators to apply when determining matches (Search Modifiers).
1129         */
1130        @Child(name = "matchType", type = {CodeType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1131        @Description(shortDefinition="= | in | not-in | above | below", formalDefinition="Allowable operators to apply when determining matches (Search Modifiers)." )
1132        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/topic-match-operator")
1133        protected List<Enumeration<TopicFilterByMatchType>> matchType;
1134
1135        /**
1136         * Description of how this filter parameter is intended to be used.
1137         */
1138        @Child(name = "documentation", type = {MarkdownType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1139        @Description(shortDefinition="Description of this filter parameter", formalDefinition="Description of how this filter parameter is intended to be used." )
1140        protected MarkdownType documentation;
1141
1142        private static final long serialVersionUID = -9356414L;
1143
1144    /**
1145     * Constructor
1146     */
1147      public TopicCanFilterByComponent() {
1148        super();
1149      }
1150
1151        /**
1152         * @return {@link #name} (A search parameter (like "patient") which is a label for the filter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1153         */
1154        public StringType getNameElement() { 
1155          if (this.name == null)
1156            if (Configuration.errorOnAutoCreate())
1157              throw new Error("Attempt to auto-create TopicCanFilterByComponent.name");
1158            else if (Configuration.doAutoCreate())
1159              this.name = new StringType(); // bb
1160          return this.name;
1161        }
1162
1163        public boolean hasNameElement() { 
1164          return this.name != null && !this.name.isEmpty();
1165        }
1166
1167        public boolean hasName() { 
1168          return this.name != null && !this.name.isEmpty();
1169        }
1170
1171        /**
1172         * @param value {@link #name} (A search parameter (like "patient") which is a label for the filter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1173         */
1174        public TopicCanFilterByComponent setNameElement(StringType value) { 
1175          this.name = value;
1176          return this;
1177        }
1178
1179        /**
1180         * @return A search parameter (like "patient") which is a label for the filter.
1181         */
1182        public String getName() { 
1183          return this.name == null ? null : this.name.getValue();
1184        }
1185
1186        /**
1187         * @param value A search parameter (like "patient") which is a label for the filter.
1188         */
1189        public TopicCanFilterByComponent setName(String value) { 
1190          if (Utilities.noString(value))
1191            this.name = null;
1192          else {
1193            if (this.name == null)
1194              this.name = new StringType();
1195            this.name.setValue(value);
1196          }
1197          return this;
1198        }
1199
1200        /**
1201         * @return {@link #matchType} (Allowable operators to apply when determining matches (Search Modifiers).)
1202         */
1203        public List<Enumeration<TopicFilterByMatchType>> getMatchType() { 
1204          if (this.matchType == null)
1205            this.matchType = new ArrayList<Enumeration<TopicFilterByMatchType>>();
1206          return this.matchType;
1207        }
1208
1209        /**
1210         * @return Returns a reference to <code>this</code> for easy method chaining
1211         */
1212        public TopicCanFilterByComponent setMatchType(List<Enumeration<TopicFilterByMatchType>> theMatchType) { 
1213          this.matchType = theMatchType;
1214          return this;
1215        }
1216
1217        public boolean hasMatchType() { 
1218          if (this.matchType == null)
1219            return false;
1220          for (Enumeration<TopicFilterByMatchType> item : this.matchType)
1221            if (!item.isEmpty())
1222              return true;
1223          return false;
1224        }
1225
1226        /**
1227         * @return {@link #matchType} (Allowable operators to apply when determining matches (Search Modifiers).)
1228         */
1229        public Enumeration<TopicFilterByMatchType> addMatchTypeElement() {//2 
1230          Enumeration<TopicFilterByMatchType> t = new Enumeration<TopicFilterByMatchType>(new TopicFilterByMatchTypeEnumFactory());
1231          if (this.matchType == null)
1232            this.matchType = new ArrayList<Enumeration<TopicFilterByMatchType>>();
1233          this.matchType.add(t);
1234          return t;
1235        }
1236
1237        /**
1238         * @param value {@link #matchType} (Allowable operators to apply when determining matches (Search Modifiers).)
1239         */
1240        public TopicCanFilterByComponent addMatchType(TopicFilterByMatchType value) { //1
1241          Enumeration<TopicFilterByMatchType> t = new Enumeration<TopicFilterByMatchType>(new TopicFilterByMatchTypeEnumFactory());
1242          t.setValue(value);
1243          if (this.matchType == null)
1244            this.matchType = new ArrayList<Enumeration<TopicFilterByMatchType>>();
1245          this.matchType.add(t);
1246          return this;
1247        }
1248
1249        /**
1250         * @param value {@link #matchType} (Allowable operators to apply when determining matches (Search Modifiers).)
1251         */
1252        public boolean hasMatchType(TopicFilterByMatchType value) { 
1253          if (this.matchType == null)
1254            return false;
1255          for (Enumeration<TopicFilterByMatchType> v : this.matchType)
1256            if (v.getValue().equals(value)) // code
1257              return true;
1258          return false;
1259        }
1260
1261        /**
1262         * @return {@link #documentation} (Description of how this filter parameter is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
1263         */
1264        public MarkdownType getDocumentationElement() { 
1265          if (this.documentation == null)
1266            if (Configuration.errorOnAutoCreate())
1267              throw new Error("Attempt to auto-create TopicCanFilterByComponent.documentation");
1268            else if (Configuration.doAutoCreate())
1269              this.documentation = new MarkdownType(); // bb
1270          return this.documentation;
1271        }
1272
1273        public boolean hasDocumentationElement() { 
1274          return this.documentation != null && !this.documentation.isEmpty();
1275        }
1276
1277        public boolean hasDocumentation() { 
1278          return this.documentation != null && !this.documentation.isEmpty();
1279        }
1280
1281        /**
1282         * @param value {@link #documentation} (Description of how this filter parameter is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
1283         */
1284        public TopicCanFilterByComponent setDocumentationElement(MarkdownType value) { 
1285          this.documentation = value;
1286          return this;
1287        }
1288
1289        /**
1290         * @return Description of how this filter parameter is intended to be used.
1291         */
1292        public String getDocumentation() { 
1293          return this.documentation == null ? null : this.documentation.getValue();
1294        }
1295
1296        /**
1297         * @param value Description of how this filter parameter is intended to be used.
1298         */
1299        public TopicCanFilterByComponent setDocumentation(String value) { 
1300          if (value == null)
1301            this.documentation = null;
1302          else {
1303            if (this.documentation == null)
1304              this.documentation = new MarkdownType();
1305            this.documentation.setValue(value);
1306          }
1307          return this;
1308        }
1309
1310        protected void listChildren(List<Property> children) {
1311          super.listChildren(children);
1312          children.add(new Property("name", "string", "A search parameter (like \"patient\") which is a label for the filter.", 0, 1, name));
1313          children.add(new Property("matchType", "code", "Allowable operators to apply when determining matches (Search Modifiers).", 0, java.lang.Integer.MAX_VALUE, matchType));
1314          children.add(new Property("documentation", "markdown", "Description of how this filter parameter is intended to be used.", 0, 1, documentation));
1315        }
1316
1317        @Override
1318        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1319          switch (_hash) {
1320          case 3373707: /*name*/  return new Property("name", "string", "A search parameter (like \"patient\") which is a label for the filter.", 0, 1, name);
1321          case 614036127: /*matchType*/  return new Property("matchType", "code", "Allowable operators to apply when determining matches (Search Modifiers).", 0, java.lang.Integer.MAX_VALUE, matchType);
1322          case 1587405498: /*documentation*/  return new Property("documentation", "markdown", "Description of how this filter parameter is intended to be used.", 0, 1, documentation);
1323          default: return super.getNamedProperty(_hash, _name, _checkValid);
1324          }
1325
1326        }
1327
1328      @Override
1329      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1330        switch (hash) {
1331        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1332        case 614036127: /*matchType*/ return this.matchType == null ? new Base[0] : this.matchType.toArray(new Base[this.matchType.size()]); // Enumeration<TopicFilterByMatchType>
1333        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // MarkdownType
1334        default: return super.getProperty(hash, name, checkValid);
1335        }
1336
1337      }
1338
1339      @Override
1340      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1341        switch (hash) {
1342        case 3373707: // name
1343          this.name = TypeConvertor.castToString(value); // StringType
1344          return value;
1345        case 614036127: // matchType
1346          value = new TopicFilterByMatchTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1347          this.getMatchType().add((Enumeration) value); // Enumeration<TopicFilterByMatchType>
1348          return value;
1349        case 1587405498: // documentation
1350          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
1351          return value;
1352        default: return super.setProperty(hash, name, value);
1353        }
1354
1355      }
1356
1357      @Override
1358      public Base setProperty(String name, Base value) throws FHIRException {
1359        if (name.equals("name")) {
1360          this.name = TypeConvertor.castToString(value); // StringType
1361        } else if (name.equals("matchType")) {
1362          value = new TopicFilterByMatchTypeEnumFactory().fromType(TypeConvertor.castToCode(value));
1363          this.getMatchType().add((Enumeration) value);
1364        } else if (name.equals("documentation")) {
1365          this.documentation = TypeConvertor.castToMarkdown(value); // MarkdownType
1366        } else
1367          return super.setProperty(name, value);
1368        return value;
1369      }
1370
1371      @Override
1372      public Base makeProperty(int hash, String name) throws FHIRException {
1373        switch (hash) {
1374        case 3373707:  return getNameElement();
1375        case 614036127:  return addMatchTypeElement();
1376        case 1587405498:  return getDocumentationElement();
1377        default: return super.makeProperty(hash, name);
1378        }
1379
1380      }
1381
1382      @Override
1383      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1384        switch (hash) {
1385        case 3373707: /*name*/ return new String[] {"string"};
1386        case 614036127: /*matchType*/ return new String[] {"code"};
1387        case 1587405498: /*documentation*/ return new String[] {"markdown"};
1388        default: return super.getTypesForProperty(hash, name);
1389        }
1390
1391      }
1392
1393      @Override
1394      public Base addChild(String name) throws FHIRException {
1395        if (name.equals("name")) {
1396          throw new FHIRException("Cannot call addChild on a primitive type Topic.canFilterBy.name");
1397        }
1398        else if (name.equals("matchType")) {
1399          throw new FHIRException("Cannot call addChild on a primitive type Topic.canFilterBy.matchType");
1400        }
1401        else if (name.equals("documentation")) {
1402          throw new FHIRException("Cannot call addChild on a primitive type Topic.canFilterBy.documentation");
1403        }
1404        else
1405          return super.addChild(name);
1406      }
1407
1408      public TopicCanFilterByComponent copy() {
1409        TopicCanFilterByComponent dst = new TopicCanFilterByComponent();
1410        copyValues(dst);
1411        return dst;
1412      }
1413
1414      public void copyValues(TopicCanFilterByComponent dst) {
1415        super.copyValues(dst);
1416        dst.name = name == null ? null : name.copy();
1417        if (matchType != null) {
1418          dst.matchType = new ArrayList<Enumeration<TopicFilterByMatchType>>();
1419          for (Enumeration<TopicFilterByMatchType> i : matchType)
1420            dst.matchType.add(i.copy());
1421        };
1422        dst.documentation = documentation == null ? null : documentation.copy();
1423      }
1424
1425      @Override
1426      public boolean equalsDeep(Base other_) {
1427        if (!super.equalsDeep(other_))
1428          return false;
1429        if (!(other_ instanceof TopicCanFilterByComponent))
1430          return false;
1431        TopicCanFilterByComponent o = (TopicCanFilterByComponent) other_;
1432        return compareDeep(name, o.name, true) && compareDeep(matchType, o.matchType, true) && compareDeep(documentation, o.documentation, true)
1433          ;
1434      }
1435
1436      @Override
1437      public boolean equalsShallow(Base other_) {
1438        if (!super.equalsShallow(other_))
1439          return false;
1440        if (!(other_ instanceof TopicCanFilterByComponent))
1441          return false;
1442        TopicCanFilterByComponent o = (TopicCanFilterByComponent) other_;
1443        return compareValues(name, o.name, true) && compareValues(matchType, o.matchType, true) && compareValues(documentation, o.documentation, true)
1444          ;
1445      }
1446
1447      public boolean isEmpty() {
1448        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, matchType, documentation
1449          );
1450      }
1451
1452  public String fhirType() {
1453    return "Topic.canFilterBy";
1454
1455  }
1456
1457  }
1458
1459    /**
1460     * An absolute URL that is used to identify this Topic when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Topic is (or will be) published. The URL SHOULD include the major version of the Topic. For more information see [Technical and Business Versions](resource.html#versions).
1461     */
1462    @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=true)
1463    @Description(shortDefinition="Logical canonical URL to reference this Topic (globally unique)", formalDefinition="An absolute URL that is used to identify this Topic when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Topic is (or will be) published. The URL SHOULD include the major version of the Topic. For more information see [Technical and Business Versions](resource.html#versions)." )
1464    protected UriType url;
1465
1466    /**
1467     * Business identifiers assigned to this Topic by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.
1468     */
1469    @Child(name = "identifier", type = {Identifier.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1470    @Description(shortDefinition="Business Identifier for Topic", formalDefinition="Business identifiers assigned to this Topic by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server." )
1471    protected List<Identifier> identifier;
1472
1473    /**
1474     * The identifier that is used to identify this version of the Topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.
1475     */
1476    @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1477    @Description(shortDefinition="Business version of the Topic", formalDefinition="The identifier that is used to identify this version of the Topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable." )
1478    protected StringType version;
1479
1480    /**
1481     * A short, descriptive, user-friendly title for the Topic, for example, "admission".
1482     */
1483    @Child(name = "title", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true)
1484    @Description(shortDefinition="Name for this Topic (Human friendly)", formalDefinition="A short, descriptive, user-friendly title for the Topic, for example, \"admission\"." )
1485    protected StringType title;
1486
1487    /**
1488     * The canonical URL pointing to another FHIR-defined Topic that is adhered to in whole or in part by this Topic.
1489     */
1490    @Child(name = "derivedFromCanonical", type = {CanonicalType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1491    @Description(shortDefinition="Based on FHIR protocol or definition", formalDefinition="The canonical URL pointing to another FHIR-defined Topic that is adhered to in whole or in part by this Topic." )
1492    protected List<CanonicalType> derivedFromCanonical;
1493
1494    /**
1495     * The URL pointing to an externally-defined subscription topic or other definition that is adhered to in whole or in part by this definition.
1496     */
1497    @Child(name = "derivedFromUri", type = {UriType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1498    @Description(shortDefinition="Based on external protocol or definition", formalDefinition="The URL pointing to an externally-defined subscription topic or other definition that is adhered to in whole or in part by this definition." )
1499    protected List<UriType> derivedFromUri;
1500
1501    /**
1502     * The current state of the Topic.
1503     */
1504    @Child(name = "status", type = {CodeType.class}, order=6, min=1, max=1, modifier=true, summary=true)
1505    @Description(shortDefinition="draft | active | retired | unknown", formalDefinition="The current state of the Topic." )
1506    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/publication-status")
1507    protected Enumeration<PublicationStatus> status;
1508
1509    /**
1510     * A flag to indicate that this Topic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
1511     */
1512    @Child(name = "experimental", type = {BooleanType.class}, order=7, min=0, max=1, modifier=true, summary=true)
1513    @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this Topic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." )
1514    protected BooleanType experimental;
1515
1516    /**
1517     * For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal.
1518     */
1519    @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true)
1520    @Description(shortDefinition="Date status first applied", formalDefinition="For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal." )
1521    protected DateTimeType date;
1522
1523    /**
1524     * Helps establish the "authority/credibility" of the Topic.  May also allow for contact.
1525     */
1526    @Child(name = "publisher", type = {Practitioner.class, PractitionerRole.class, Organization.class}, order=9, min=0, max=1, modifier=false, summary=true)
1527    @Description(shortDefinition="The name of the individual or organization that published the Topic", formalDefinition="Helps establish the \"authority/credibility\" of the Topic.  May also allow for contact." )
1528    protected Reference publisher;
1529
1530    /**
1531     * Contact details to assist a user in finding and communicating with the publisher.
1532     */
1533    @Child(name = "contact", type = {ContactDetail.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1534    @Description(shortDefinition="Contact details for the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
1535    protected List<ContactDetail> contact;
1536
1537    /**
1538     * A free text natural language description of the Topic from the consumer's perspective.
1539     */
1540    @Child(name = "description", type = {MarkdownType.class}, order=11, min=0, max=1, modifier=false, summary=false)
1541    @Description(shortDefinition="Natural language description of the Topic", formalDefinition="A free text natural language description of the Topic from the consumer's perspective." )
1542    protected MarkdownType description;
1543
1544    /**
1545     * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions.
1546     */
1547    @Child(name = "useContext", type = {UsageContext.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1548    @Description(shortDefinition="Content intends to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions." )
1549    protected List<UsageContext> useContext;
1550
1551    /**
1552     * A jurisdiction in which the Topic is intended to be used.
1553     */
1554    @Child(name = "jurisdiction", type = {CodeableConcept.class}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1555    @Description(shortDefinition="Intended jurisdiction for Topic (if applicable)", formalDefinition="A jurisdiction in which the Topic is intended to be used." )
1556    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/jurisdiction")
1557    protected List<CodeableConcept> jurisdiction;
1558
1559    /**
1560     * Explains why this Topic is needed and why it has been designed as it has.
1561     */
1562    @Child(name = "purpose", type = {MarkdownType.class}, order=14, min=0, max=1, modifier=false, summary=false)
1563    @Description(shortDefinition="Why this Topic is defined", formalDefinition="Explains why this Topic is needed and why it has been designed as it has." )
1564    protected MarkdownType purpose;
1565
1566    /**
1567     * A copyright statement relating to the Topic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Topic.
1568     */
1569    @Child(name = "copyright", type = {MarkdownType.class}, order=15, min=0, max=1, modifier=false, summary=false)
1570    @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the Topic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Topic." )
1571    protected MarkdownType copyright;
1572
1573    /**
1574     * The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.
1575     */
1576    @Child(name = "approvalDate", type = {DateType.class}, order=16, min=0, max=1, modifier=false, summary=false)
1577    @Description(shortDefinition="When Topic approved by publisher", formalDefinition="The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage." )
1578    protected DateType approvalDate;
1579
1580    /**
1581     * The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.
1582     */
1583    @Child(name = "lastReviewDate", type = {DateType.class}, order=17, min=0, max=1, modifier=false, summary=false)
1584    @Description(shortDefinition="Last review date for the Topic", formalDefinition="The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date." )
1585    protected DateType lastReviewDate;
1586
1587    /**
1588     * The period during which the Topic content was or is planned to be effective.
1589     */
1590    @Child(name = "effectivePeriod", type = {Period.class}, order=18, min=0, max=1, modifier=false, summary=true)
1591    @Description(shortDefinition="The effective date range for the Topic", formalDefinition="The period during which the Topic content was or is planned to be effective." )
1592    protected Period effectivePeriod;
1593
1594    /**
1595     * The criteria for including updates to a nominated resource in the topic.  Thie criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression.
1596     */
1597    @Child(name = "resourceTrigger", type = {}, order=19, min=0, max=1, modifier=false, summary=true)
1598    @Description(shortDefinition="Criteria for including a resource update in the topic", formalDefinition="The criteria for including updates to a nominated resource in the topic.  Thie criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression." )
1599    protected TopicResourceTriggerComponent resourceTrigger;
1600
1601    /**
1602     * List of properties by which Subscriptions on the topic can be filtered.
1603     */
1604    @Child(name = "canFilterBy", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1605    @Description(shortDefinition="Properties by which a Subscription can further filter a Topic", formalDefinition="List of properties by which Subscriptions on the topic can be filtered." )
1606    protected List<TopicCanFilterByComponent> canFilterBy;
1607
1608    private static final long serialVersionUID = -1683916811L;
1609
1610  /**
1611   * Constructor
1612   */
1613    public Topic() {
1614      super();
1615    }
1616
1617  /**
1618   * Constructor
1619   */
1620    public Topic(PublicationStatus status) {
1621      super();
1622      this.setStatus(status);
1623    }
1624
1625    /**
1626     * @return {@link #url} (An absolute URL that is used to identify this Topic when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Topic is (or will be) published. The URL SHOULD include the major version of the Topic. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1627     */
1628    public UriType getUrlElement() { 
1629      if (this.url == null)
1630        if (Configuration.errorOnAutoCreate())
1631          throw new Error("Attempt to auto-create Topic.url");
1632        else if (Configuration.doAutoCreate())
1633          this.url = new UriType(); // bb
1634      return this.url;
1635    }
1636
1637    public boolean hasUrlElement() { 
1638      return this.url != null && !this.url.isEmpty();
1639    }
1640
1641    public boolean hasUrl() { 
1642      return this.url != null && !this.url.isEmpty();
1643    }
1644
1645    /**
1646     * @param value {@link #url} (An absolute URL that is used to identify this Topic when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Topic is (or will be) published. The URL SHOULD include the major version of the Topic. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1647     */
1648    public Topic setUrlElement(UriType value) { 
1649      this.url = value;
1650      return this;
1651    }
1652
1653    /**
1654     * @return An absolute URL that is used to identify this Topic when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Topic is (or will be) published. The URL SHOULD include the major version of the Topic. For more information see [Technical and Business Versions](resource.html#versions).
1655     */
1656    public String getUrl() { 
1657      return this.url == null ? null : this.url.getValue();
1658    }
1659
1660    /**
1661     * @param value An absolute URL that is used to identify this Topic when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Topic is (or will be) published. The URL SHOULD include the major version of the Topic. For more information see [Technical and Business Versions](resource.html#versions).
1662     */
1663    public Topic setUrl(String value) { 
1664      if (Utilities.noString(value))
1665        this.url = null;
1666      else {
1667        if (this.url == null)
1668          this.url = new UriType();
1669        this.url.setValue(value);
1670      }
1671      return this;
1672    }
1673
1674    /**
1675     * @return {@link #identifier} (Business identifiers assigned to this Topic by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.)
1676     */
1677    public List<Identifier> getIdentifier() { 
1678      if (this.identifier == null)
1679        this.identifier = new ArrayList<Identifier>();
1680      return this.identifier;
1681    }
1682
1683    /**
1684     * @return Returns a reference to <code>this</code> for easy method chaining
1685     */
1686    public Topic setIdentifier(List<Identifier> theIdentifier) { 
1687      this.identifier = theIdentifier;
1688      return this;
1689    }
1690
1691    public boolean hasIdentifier() { 
1692      if (this.identifier == null)
1693        return false;
1694      for (Identifier item : this.identifier)
1695        if (!item.isEmpty())
1696          return true;
1697      return false;
1698    }
1699
1700    public Identifier addIdentifier() { //3
1701      Identifier t = new Identifier();
1702      if (this.identifier == null)
1703        this.identifier = new ArrayList<Identifier>();
1704      this.identifier.add(t);
1705      return t;
1706    }
1707
1708    public Topic addIdentifier(Identifier t) { //3
1709      if (t == null)
1710        return this;
1711      if (this.identifier == null)
1712        this.identifier = new ArrayList<Identifier>();
1713      this.identifier.add(t);
1714      return this;
1715    }
1716
1717    /**
1718     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
1719     */
1720    public Identifier getIdentifierFirstRep() { 
1721      if (getIdentifier().isEmpty()) {
1722        addIdentifier();
1723      }
1724      return getIdentifier().get(0);
1725    }
1726
1727    /**
1728     * @return {@link #version} (The identifier that is used to identify this version of the Topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1729     */
1730    public StringType getVersionElement() { 
1731      if (this.version == null)
1732        if (Configuration.errorOnAutoCreate())
1733          throw new Error("Attempt to auto-create Topic.version");
1734        else if (Configuration.doAutoCreate())
1735          this.version = new StringType(); // bb
1736      return this.version;
1737    }
1738
1739    public boolean hasVersionElement() { 
1740      return this.version != null && !this.version.isEmpty();
1741    }
1742
1743    public boolean hasVersion() { 
1744      return this.version != null && !this.version.isEmpty();
1745    }
1746
1747    /**
1748     * @param value {@link #version} (The identifier that is used to identify this version of the Topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1749     */
1750    public Topic setVersionElement(StringType value) { 
1751      this.version = value;
1752      return this;
1753    }
1754
1755    /**
1756     * @return The identifier that is used to identify this version of the Topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.
1757     */
1758    public String getVersion() { 
1759      return this.version == null ? null : this.version.getValue();
1760    }
1761
1762    /**
1763     * @param value The identifier that is used to identify this version of the Topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.
1764     */
1765    public Topic setVersion(String value) { 
1766      if (Utilities.noString(value))
1767        this.version = null;
1768      else {
1769        if (this.version == null)
1770          this.version = new StringType();
1771        this.version.setValue(value);
1772      }
1773      return this;
1774    }
1775
1776    /**
1777     * @return {@link #title} (A short, descriptive, user-friendly title for the Topic, for example, "admission".). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1778     */
1779    public StringType getTitleElement() { 
1780      if (this.title == null)
1781        if (Configuration.errorOnAutoCreate())
1782          throw new Error("Attempt to auto-create Topic.title");
1783        else if (Configuration.doAutoCreate())
1784          this.title = new StringType(); // bb
1785      return this.title;
1786    }
1787
1788    public boolean hasTitleElement() { 
1789      return this.title != null && !this.title.isEmpty();
1790    }
1791
1792    public boolean hasTitle() { 
1793      return this.title != null && !this.title.isEmpty();
1794    }
1795
1796    /**
1797     * @param value {@link #title} (A short, descriptive, user-friendly title for the Topic, for example, "admission".). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
1798     */
1799    public Topic setTitleElement(StringType value) { 
1800      this.title = value;
1801      return this;
1802    }
1803
1804    /**
1805     * @return A short, descriptive, user-friendly title for the Topic, for example, "admission".
1806     */
1807    public String getTitle() { 
1808      return this.title == null ? null : this.title.getValue();
1809    }
1810
1811    /**
1812     * @param value A short, descriptive, user-friendly title for the Topic, for example, "admission".
1813     */
1814    public Topic setTitle(String value) { 
1815      if (Utilities.noString(value))
1816        this.title = null;
1817      else {
1818        if (this.title == null)
1819          this.title = new StringType();
1820        this.title.setValue(value);
1821      }
1822      return this;
1823    }
1824
1825    /**
1826     * @return {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined Topic that is adhered to in whole or in part by this Topic.)
1827     */
1828    public List<CanonicalType> getDerivedFromCanonical() { 
1829      if (this.derivedFromCanonical == null)
1830        this.derivedFromCanonical = new ArrayList<CanonicalType>();
1831      return this.derivedFromCanonical;
1832    }
1833
1834    /**
1835     * @return Returns a reference to <code>this</code> for easy method chaining
1836     */
1837    public Topic setDerivedFromCanonical(List<CanonicalType> theDerivedFromCanonical) { 
1838      this.derivedFromCanonical = theDerivedFromCanonical;
1839      return this;
1840    }
1841
1842    public boolean hasDerivedFromCanonical() { 
1843      if (this.derivedFromCanonical == null)
1844        return false;
1845      for (CanonicalType item : this.derivedFromCanonical)
1846        if (!item.isEmpty())
1847          return true;
1848      return false;
1849    }
1850
1851    /**
1852     * @return {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined Topic that is adhered to in whole or in part by this Topic.)
1853     */
1854    public CanonicalType addDerivedFromCanonicalElement() {//2 
1855      CanonicalType t = new CanonicalType();
1856      if (this.derivedFromCanonical == null)
1857        this.derivedFromCanonical = new ArrayList<CanonicalType>();
1858      this.derivedFromCanonical.add(t);
1859      return t;
1860    }
1861
1862    /**
1863     * @param value {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined Topic that is adhered to in whole or in part by this Topic.)
1864     */
1865    public Topic addDerivedFromCanonical(String value) { //1
1866      CanonicalType t = new CanonicalType();
1867      t.setValue(value);
1868      if (this.derivedFromCanonical == null)
1869        this.derivedFromCanonical = new ArrayList<CanonicalType>();
1870      this.derivedFromCanonical.add(t);
1871      return this;
1872    }
1873
1874    /**
1875     * @param value {@link #derivedFromCanonical} (The canonical URL pointing to another FHIR-defined Topic that is adhered to in whole or in part by this Topic.)
1876     */
1877    public boolean hasDerivedFromCanonical(String value) { 
1878      if (this.derivedFromCanonical == null)
1879        return false;
1880      for (CanonicalType v : this.derivedFromCanonical)
1881        if (v.getValue().equals(value)) // canonical
1882          return true;
1883      return false;
1884    }
1885
1886    /**
1887     * @return {@link #derivedFromUri} (The URL pointing to an externally-defined subscription topic or other definition that is adhered to in whole or in part by this definition.)
1888     */
1889    public List<UriType> getDerivedFromUri() { 
1890      if (this.derivedFromUri == null)
1891        this.derivedFromUri = new ArrayList<UriType>();
1892      return this.derivedFromUri;
1893    }
1894
1895    /**
1896     * @return Returns a reference to <code>this</code> for easy method chaining
1897     */
1898    public Topic setDerivedFromUri(List<UriType> theDerivedFromUri) { 
1899      this.derivedFromUri = theDerivedFromUri;
1900      return this;
1901    }
1902
1903    public boolean hasDerivedFromUri() { 
1904      if (this.derivedFromUri == null)
1905        return false;
1906      for (UriType item : this.derivedFromUri)
1907        if (!item.isEmpty())
1908          return true;
1909      return false;
1910    }
1911
1912    /**
1913     * @return {@link #derivedFromUri} (The URL pointing to an externally-defined subscription topic or other definition that is adhered to in whole or in part by this definition.)
1914     */
1915    public UriType addDerivedFromUriElement() {//2 
1916      UriType t = new UriType();
1917      if (this.derivedFromUri == null)
1918        this.derivedFromUri = new ArrayList<UriType>();
1919      this.derivedFromUri.add(t);
1920      return t;
1921    }
1922
1923    /**
1924     * @param value {@link #derivedFromUri} (The URL pointing to an externally-defined subscription topic or other definition that is adhered to in whole or in part by this definition.)
1925     */
1926    public Topic addDerivedFromUri(String value) { //1
1927      UriType t = new UriType();
1928      t.setValue(value);
1929      if (this.derivedFromUri == null)
1930        this.derivedFromUri = new ArrayList<UriType>();
1931      this.derivedFromUri.add(t);
1932      return this;
1933    }
1934
1935    /**
1936     * @param value {@link #derivedFromUri} (The URL pointing to an externally-defined subscription topic or other definition that is adhered to in whole or in part by this definition.)
1937     */
1938    public boolean hasDerivedFromUri(String value) { 
1939      if (this.derivedFromUri == null)
1940        return false;
1941      for (UriType v : this.derivedFromUri)
1942        if (v.getValue().equals(value)) // uri
1943          return true;
1944      return false;
1945    }
1946
1947    /**
1948     * @return {@link #status} (The current state of the Topic.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1949     */
1950    public Enumeration<PublicationStatus> getStatusElement() { 
1951      if (this.status == null)
1952        if (Configuration.errorOnAutoCreate())
1953          throw new Error("Attempt to auto-create Topic.status");
1954        else if (Configuration.doAutoCreate())
1955          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
1956      return this.status;
1957    }
1958
1959    public boolean hasStatusElement() { 
1960      return this.status != null && !this.status.isEmpty();
1961    }
1962
1963    public boolean hasStatus() { 
1964      return this.status != null && !this.status.isEmpty();
1965    }
1966
1967    /**
1968     * @param value {@link #status} (The current state of the Topic.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1969     */
1970    public Topic setStatusElement(Enumeration<PublicationStatus> value) { 
1971      this.status = value;
1972      return this;
1973    }
1974
1975    /**
1976     * @return The current state of the Topic.
1977     */
1978    public PublicationStatus getStatus() { 
1979      return this.status == null ? null : this.status.getValue();
1980    }
1981
1982    /**
1983     * @param value The current state of the Topic.
1984     */
1985    public Topic setStatus(PublicationStatus value) { 
1986        if (this.status == null)
1987          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
1988        this.status.setValue(value);
1989      return this;
1990    }
1991
1992    /**
1993     * @return {@link #experimental} (A flag to indicate that this Topic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
1994     */
1995    public BooleanType getExperimentalElement() { 
1996      if (this.experimental == null)
1997        if (Configuration.errorOnAutoCreate())
1998          throw new Error("Attempt to auto-create Topic.experimental");
1999        else if (Configuration.doAutoCreate())
2000          this.experimental = new BooleanType(); // bb
2001      return this.experimental;
2002    }
2003
2004    public boolean hasExperimentalElement() { 
2005      return this.experimental != null && !this.experimental.isEmpty();
2006    }
2007
2008    public boolean hasExperimental() { 
2009      return this.experimental != null && !this.experimental.isEmpty();
2010    }
2011
2012    /**
2013     * @param value {@link #experimental} (A flag to indicate that this Topic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
2014     */
2015    public Topic setExperimentalElement(BooleanType value) { 
2016      this.experimental = value;
2017      return this;
2018    }
2019
2020    /**
2021     * @return A flag to indicate that this Topic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
2022     */
2023    public boolean getExperimental() { 
2024      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2025    }
2026
2027    /**
2028     * @param value A flag to indicate that this Topic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
2029     */
2030    public Topic setExperimental(boolean value) { 
2031        if (this.experimental == null)
2032          this.experimental = new BooleanType();
2033        this.experimental.setValue(value);
2034      return this;
2035    }
2036
2037    /**
2038     * @return {@link #date} (For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2039     */
2040    public DateTimeType getDateElement() { 
2041      if (this.date == null)
2042        if (Configuration.errorOnAutoCreate())
2043          throw new Error("Attempt to auto-create Topic.date");
2044        else if (Configuration.doAutoCreate())
2045          this.date = new DateTimeType(); // bb
2046      return this.date;
2047    }
2048
2049    public boolean hasDateElement() { 
2050      return this.date != null && !this.date.isEmpty();
2051    }
2052
2053    public boolean hasDate() { 
2054      return this.date != null && !this.date.isEmpty();
2055    }
2056
2057    /**
2058     * @param value {@link #date} (For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
2059     */
2060    public Topic setDateElement(DateTimeType value) { 
2061      this.date = value;
2062      return this;
2063    }
2064
2065    /**
2066     * @return For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal.
2067     */
2068    public Date getDate() { 
2069      return this.date == null ? null : this.date.getValue();
2070    }
2071
2072    /**
2073     * @param value For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal.
2074     */
2075    public Topic setDate(Date value) { 
2076      if (value == null)
2077        this.date = null;
2078      else {
2079        if (this.date == null)
2080          this.date = new DateTimeType();
2081        this.date.setValue(value);
2082      }
2083      return this;
2084    }
2085
2086    /**
2087     * @return {@link #publisher} (Helps establish the "authority/credibility" of the Topic.  May also allow for contact.)
2088     */
2089    public Reference getPublisher() { 
2090      if (this.publisher == null)
2091        if (Configuration.errorOnAutoCreate())
2092          throw new Error("Attempt to auto-create Topic.publisher");
2093        else if (Configuration.doAutoCreate())
2094          this.publisher = new Reference(); // cc
2095      return this.publisher;
2096    }
2097
2098    public boolean hasPublisher() { 
2099      return this.publisher != null && !this.publisher.isEmpty();
2100    }
2101
2102    /**
2103     * @param value {@link #publisher} (Helps establish the "authority/credibility" of the Topic.  May also allow for contact.)
2104     */
2105    public Topic setPublisher(Reference value) { 
2106      this.publisher = value;
2107      return this;
2108    }
2109
2110    /**
2111     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2112     */
2113    public List<ContactDetail> getContact() { 
2114      if (this.contact == null)
2115        this.contact = new ArrayList<ContactDetail>();
2116      return this.contact;
2117    }
2118
2119    /**
2120     * @return Returns a reference to <code>this</code> for easy method chaining
2121     */
2122    public Topic setContact(List<ContactDetail> theContact) { 
2123      this.contact = theContact;
2124      return this;
2125    }
2126
2127    public boolean hasContact() { 
2128      if (this.contact == null)
2129        return false;
2130      for (ContactDetail item : this.contact)
2131        if (!item.isEmpty())
2132          return true;
2133      return false;
2134    }
2135
2136    public ContactDetail addContact() { //3
2137      ContactDetail t = new ContactDetail();
2138      if (this.contact == null)
2139        this.contact = new ArrayList<ContactDetail>();
2140      this.contact.add(t);
2141      return t;
2142    }
2143
2144    public Topic addContact(ContactDetail t) { //3
2145      if (t == null)
2146        return this;
2147      if (this.contact == null)
2148        this.contact = new ArrayList<ContactDetail>();
2149      this.contact.add(t);
2150      return this;
2151    }
2152
2153    /**
2154     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
2155     */
2156    public ContactDetail getContactFirstRep() { 
2157      if (getContact().isEmpty()) {
2158        addContact();
2159      }
2160      return getContact().get(0);
2161    }
2162
2163    /**
2164     * @return {@link #description} (A free text natural language description of the Topic from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2165     */
2166    public MarkdownType getDescriptionElement() { 
2167      if (this.description == null)
2168        if (Configuration.errorOnAutoCreate())
2169          throw new Error("Attempt to auto-create Topic.description");
2170        else if (Configuration.doAutoCreate())
2171          this.description = new MarkdownType(); // bb
2172      return this.description;
2173    }
2174
2175    public boolean hasDescriptionElement() { 
2176      return this.description != null && !this.description.isEmpty();
2177    }
2178
2179    public boolean hasDescription() { 
2180      return this.description != null && !this.description.isEmpty();
2181    }
2182
2183    /**
2184     * @param value {@link #description} (A free text natural language description of the Topic from the consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2185     */
2186    public Topic setDescriptionElement(MarkdownType value) { 
2187      this.description = value;
2188      return this;
2189    }
2190
2191    /**
2192     * @return A free text natural language description of the Topic from the consumer's perspective.
2193     */
2194    public String getDescription() { 
2195      return this.description == null ? null : this.description.getValue();
2196    }
2197
2198    /**
2199     * @param value A free text natural language description of the Topic from the consumer's perspective.
2200     */
2201    public Topic setDescription(String value) { 
2202      if (value == null)
2203        this.description = null;
2204      else {
2205        if (this.description == null)
2206          this.description = new MarkdownType();
2207        this.description.setValue(value);
2208      }
2209      return this;
2210    }
2211
2212    /**
2213     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions.)
2214     */
2215    public List<UsageContext> getUseContext() { 
2216      if (this.useContext == null)
2217        this.useContext = new ArrayList<UsageContext>();
2218      return this.useContext;
2219    }
2220
2221    /**
2222     * @return Returns a reference to <code>this</code> for easy method chaining
2223     */
2224    public Topic setUseContext(List<UsageContext> theUseContext) { 
2225      this.useContext = theUseContext;
2226      return this;
2227    }
2228
2229    public boolean hasUseContext() { 
2230      if (this.useContext == null)
2231        return false;
2232      for (UsageContext item : this.useContext)
2233        if (!item.isEmpty())
2234          return true;
2235      return false;
2236    }
2237
2238    public UsageContext addUseContext() { //3
2239      UsageContext t = new UsageContext();
2240      if (this.useContext == null)
2241        this.useContext = new ArrayList<UsageContext>();
2242      this.useContext.add(t);
2243      return t;
2244    }
2245
2246    public Topic addUseContext(UsageContext t) { //3
2247      if (t == null)
2248        return this;
2249      if (this.useContext == null)
2250        this.useContext = new ArrayList<UsageContext>();
2251      this.useContext.add(t);
2252      return this;
2253    }
2254
2255    /**
2256     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {3}
2257     */
2258    public UsageContext getUseContextFirstRep() { 
2259      if (getUseContext().isEmpty()) {
2260        addUseContext();
2261      }
2262      return getUseContext().get(0);
2263    }
2264
2265    /**
2266     * @return {@link #jurisdiction} (A jurisdiction in which the Topic is intended to be used.)
2267     */
2268    public List<CodeableConcept> getJurisdiction() { 
2269      if (this.jurisdiction == null)
2270        this.jurisdiction = new ArrayList<CodeableConcept>();
2271      return this.jurisdiction;
2272    }
2273
2274    /**
2275     * @return Returns a reference to <code>this</code> for easy method chaining
2276     */
2277    public Topic setJurisdiction(List<CodeableConcept> theJurisdiction) { 
2278      this.jurisdiction = theJurisdiction;
2279      return this;
2280    }
2281
2282    public boolean hasJurisdiction() { 
2283      if (this.jurisdiction == null)
2284        return false;
2285      for (CodeableConcept item : this.jurisdiction)
2286        if (!item.isEmpty())
2287          return true;
2288      return false;
2289    }
2290
2291    public CodeableConcept addJurisdiction() { //3
2292      CodeableConcept t = new CodeableConcept();
2293      if (this.jurisdiction == null)
2294        this.jurisdiction = new ArrayList<CodeableConcept>();
2295      this.jurisdiction.add(t);
2296      return t;
2297    }
2298
2299    public Topic addJurisdiction(CodeableConcept t) { //3
2300      if (t == null)
2301        return this;
2302      if (this.jurisdiction == null)
2303        this.jurisdiction = new ArrayList<CodeableConcept>();
2304      this.jurisdiction.add(t);
2305      return this;
2306    }
2307
2308    /**
2309     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {3}
2310     */
2311    public CodeableConcept getJurisdictionFirstRep() { 
2312      if (getJurisdiction().isEmpty()) {
2313        addJurisdiction();
2314      }
2315      return getJurisdiction().get(0);
2316    }
2317
2318    /**
2319     * @return {@link #purpose} (Explains why this Topic is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2320     */
2321    public MarkdownType getPurposeElement() { 
2322      if (this.purpose == null)
2323        if (Configuration.errorOnAutoCreate())
2324          throw new Error("Attempt to auto-create Topic.purpose");
2325        else if (Configuration.doAutoCreate())
2326          this.purpose = new MarkdownType(); // bb
2327      return this.purpose;
2328    }
2329
2330    public boolean hasPurposeElement() { 
2331      return this.purpose != null && !this.purpose.isEmpty();
2332    }
2333
2334    public boolean hasPurpose() { 
2335      return this.purpose != null && !this.purpose.isEmpty();
2336    }
2337
2338    /**
2339     * @param value {@link #purpose} (Explains why this Topic is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2340     */
2341    public Topic setPurposeElement(MarkdownType value) { 
2342      this.purpose = value;
2343      return this;
2344    }
2345
2346    /**
2347     * @return Explains why this Topic is needed and why it has been designed as it has.
2348     */
2349    public String getPurpose() { 
2350      return this.purpose == null ? null : this.purpose.getValue();
2351    }
2352
2353    /**
2354     * @param value Explains why this Topic is needed and why it has been designed as it has.
2355     */
2356    public Topic setPurpose(String value) { 
2357      if (value == null)
2358        this.purpose = null;
2359      else {
2360        if (this.purpose == null)
2361          this.purpose = new MarkdownType();
2362        this.purpose.setValue(value);
2363      }
2364      return this;
2365    }
2366
2367    /**
2368     * @return {@link #copyright} (A copyright statement relating to the Topic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Topic.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2369     */
2370    public MarkdownType getCopyrightElement() { 
2371      if (this.copyright == null)
2372        if (Configuration.errorOnAutoCreate())
2373          throw new Error("Attempt to auto-create Topic.copyright");
2374        else if (Configuration.doAutoCreate())
2375          this.copyright = new MarkdownType(); // bb
2376      return this.copyright;
2377    }
2378
2379    public boolean hasCopyrightElement() { 
2380      return this.copyright != null && !this.copyright.isEmpty();
2381    }
2382
2383    public boolean hasCopyright() { 
2384      return this.copyright != null && !this.copyright.isEmpty();
2385    }
2386
2387    /**
2388     * @param value {@link #copyright} (A copyright statement relating to the Topic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Topic.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value
2389     */
2390    public Topic setCopyrightElement(MarkdownType value) { 
2391      this.copyright = value;
2392      return this;
2393    }
2394
2395    /**
2396     * @return A copyright statement relating to the Topic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Topic.
2397     */
2398    public String getCopyright() { 
2399      return this.copyright == null ? null : this.copyright.getValue();
2400    }
2401
2402    /**
2403     * @param value A copyright statement relating to the Topic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Topic.
2404     */
2405    public Topic setCopyright(String value) { 
2406      if (value == null)
2407        this.copyright = null;
2408      else {
2409        if (this.copyright == null)
2410          this.copyright = new MarkdownType();
2411        this.copyright.setValue(value);
2412      }
2413      return this;
2414    }
2415
2416    /**
2417     * @return {@link #approvalDate} (The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
2418     */
2419    public DateType getApprovalDateElement() { 
2420      if (this.approvalDate == null)
2421        if (Configuration.errorOnAutoCreate())
2422          throw new Error("Attempt to auto-create Topic.approvalDate");
2423        else if (Configuration.doAutoCreate())
2424          this.approvalDate = new DateType(); // bb
2425      return this.approvalDate;
2426    }
2427
2428    public boolean hasApprovalDateElement() { 
2429      return this.approvalDate != null && !this.approvalDate.isEmpty();
2430    }
2431
2432    public boolean hasApprovalDate() { 
2433      return this.approvalDate != null && !this.approvalDate.isEmpty();
2434    }
2435
2436    /**
2437     * @param value {@link #approvalDate} (The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.). This is the underlying object with id, value and extensions. The accessor "getApprovalDate" gives direct access to the value
2438     */
2439    public Topic setApprovalDateElement(DateType value) { 
2440      this.approvalDate = value;
2441      return this;
2442    }
2443
2444    /**
2445     * @return The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2446     */
2447    public Date getApprovalDate() { 
2448      return this.approvalDate == null ? null : this.approvalDate.getValue();
2449    }
2450
2451    /**
2452     * @param value The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.
2453     */
2454    public Topic setApprovalDate(Date value) { 
2455      if (value == null)
2456        this.approvalDate = null;
2457      else {
2458        if (this.approvalDate == null)
2459          this.approvalDate = new DateType();
2460        this.approvalDate.setValue(value);
2461      }
2462      return this;
2463    }
2464
2465    /**
2466     * @return {@link #lastReviewDate} (The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
2467     */
2468    public DateType getLastReviewDateElement() { 
2469      if (this.lastReviewDate == null)
2470        if (Configuration.errorOnAutoCreate())
2471          throw new Error("Attempt to auto-create Topic.lastReviewDate");
2472        else if (Configuration.doAutoCreate())
2473          this.lastReviewDate = new DateType(); // bb
2474      return this.lastReviewDate;
2475    }
2476
2477    public boolean hasLastReviewDateElement() { 
2478      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2479    }
2480
2481    public boolean hasLastReviewDate() { 
2482      return this.lastReviewDate != null && !this.lastReviewDate.isEmpty();
2483    }
2484
2485    /**
2486     * @param value {@link #lastReviewDate} (The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.). This is the underlying object with id, value and extensions. The accessor "getLastReviewDate" gives direct access to the value
2487     */
2488    public Topic setLastReviewDateElement(DateType value) { 
2489      this.lastReviewDate = value;
2490      return this;
2491    }
2492
2493    /**
2494     * @return The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.
2495     */
2496    public Date getLastReviewDate() { 
2497      return this.lastReviewDate == null ? null : this.lastReviewDate.getValue();
2498    }
2499
2500    /**
2501     * @param value The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.
2502     */
2503    public Topic setLastReviewDate(Date value) { 
2504      if (value == null)
2505        this.lastReviewDate = null;
2506      else {
2507        if (this.lastReviewDate == null)
2508          this.lastReviewDate = new DateType();
2509        this.lastReviewDate.setValue(value);
2510      }
2511      return this;
2512    }
2513
2514    /**
2515     * @return {@link #effectivePeriod} (The period during which the Topic content was or is planned to be effective.)
2516     */
2517    public Period getEffectivePeriod() { 
2518      if (this.effectivePeriod == null)
2519        if (Configuration.errorOnAutoCreate())
2520          throw new Error("Attempt to auto-create Topic.effectivePeriod");
2521        else if (Configuration.doAutoCreate())
2522          this.effectivePeriod = new Period(); // cc
2523      return this.effectivePeriod;
2524    }
2525
2526    public boolean hasEffectivePeriod() { 
2527      return this.effectivePeriod != null && !this.effectivePeriod.isEmpty();
2528    }
2529
2530    /**
2531     * @param value {@link #effectivePeriod} (The period during which the Topic content was or is planned to be effective.)
2532     */
2533    public Topic setEffectivePeriod(Period value) { 
2534      this.effectivePeriod = value;
2535      return this;
2536    }
2537
2538    /**
2539     * @return {@link #resourceTrigger} (The criteria for including updates to a nominated resource in the topic.  Thie criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression.)
2540     */
2541    public TopicResourceTriggerComponent getResourceTrigger() { 
2542      if (this.resourceTrigger == null)
2543        if (Configuration.errorOnAutoCreate())
2544          throw new Error("Attempt to auto-create Topic.resourceTrigger");
2545        else if (Configuration.doAutoCreate())
2546          this.resourceTrigger = new TopicResourceTriggerComponent(); // cc
2547      return this.resourceTrigger;
2548    }
2549
2550    public boolean hasResourceTrigger() { 
2551      return this.resourceTrigger != null && !this.resourceTrigger.isEmpty();
2552    }
2553
2554    /**
2555     * @param value {@link #resourceTrigger} (The criteria for including updates to a nominated resource in the topic.  Thie criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression.)
2556     */
2557    public Topic setResourceTrigger(TopicResourceTriggerComponent value) { 
2558      this.resourceTrigger = value;
2559      return this;
2560    }
2561
2562    /**
2563     * @return {@link #canFilterBy} (List of properties by which Subscriptions on the topic can be filtered.)
2564     */
2565    public List<TopicCanFilterByComponent> getCanFilterBy() { 
2566      if (this.canFilterBy == null)
2567        this.canFilterBy = new ArrayList<TopicCanFilterByComponent>();
2568      return this.canFilterBy;
2569    }
2570
2571    /**
2572     * @return Returns a reference to <code>this</code> for easy method chaining
2573     */
2574    public Topic setCanFilterBy(List<TopicCanFilterByComponent> theCanFilterBy) { 
2575      this.canFilterBy = theCanFilterBy;
2576      return this;
2577    }
2578
2579    public boolean hasCanFilterBy() { 
2580      if (this.canFilterBy == null)
2581        return false;
2582      for (TopicCanFilterByComponent item : this.canFilterBy)
2583        if (!item.isEmpty())
2584          return true;
2585      return false;
2586    }
2587
2588    public TopicCanFilterByComponent addCanFilterBy() { //3
2589      TopicCanFilterByComponent t = new TopicCanFilterByComponent();
2590      if (this.canFilterBy == null)
2591        this.canFilterBy = new ArrayList<TopicCanFilterByComponent>();
2592      this.canFilterBy.add(t);
2593      return t;
2594    }
2595
2596    public Topic addCanFilterBy(TopicCanFilterByComponent t) { //3
2597      if (t == null)
2598        return this;
2599      if (this.canFilterBy == null)
2600        this.canFilterBy = new ArrayList<TopicCanFilterByComponent>();
2601      this.canFilterBy.add(t);
2602      return this;
2603    }
2604
2605    /**
2606     * @return The first repetition of repeating field {@link #canFilterBy}, creating it if it does not already exist {3}
2607     */
2608    public TopicCanFilterByComponent getCanFilterByFirstRep() { 
2609      if (getCanFilterBy().isEmpty()) {
2610        addCanFilterBy();
2611      }
2612      return getCanFilterBy().get(0);
2613    }
2614
2615      protected void listChildren(List<Property> children) {
2616        super.listChildren(children);
2617        children.add(new Property("url", "uri", "An absolute URL that is used to identify this Topic when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Topic is (or will be) published. The URL SHOULD include the major version of the Topic. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url));
2618        children.add(new Property("identifier", "Identifier", "Business identifiers assigned to this Topic by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier));
2619        children.add(new Property("version", "string", "The identifier that is used to identify this version of the Topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.", 0, 1, version));
2620        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the Topic, for example, \"admission\".", 0, 1, title));
2621        children.add(new Property("derivedFromCanonical", "canonical(Topic)", "The canonical URL pointing to another FHIR-defined Topic that is adhered to in whole or in part by this Topic.", 0, java.lang.Integer.MAX_VALUE, derivedFromCanonical));
2622        children.add(new Property("derivedFromUri", "uri", "The URL pointing to an externally-defined subscription topic or other definition that is adhered to in whole or in part by this definition.", 0, java.lang.Integer.MAX_VALUE, derivedFromUri));
2623        children.add(new Property("status", "code", "The current state of the Topic.", 0, 1, status));
2624        children.add(new Property("experimental", "boolean", "A flag to indicate that this Topic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental));
2625        children.add(new Property("date", "dateTime", "For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal.", 0, 1, date));
2626        children.add(new Property("publisher", "Reference(Practitioner|PractitionerRole|Organization)", "Helps establish the \"authority/credibility\" of the Topic.  May also allow for contact.", 0, 1, publisher));
2627        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
2628        children.add(new Property("description", "markdown", "A free text natural language description of the Topic from the consumer's perspective.", 0, 1, description));
2629        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions.", 0, java.lang.Integer.MAX_VALUE, useContext));
2630        children.add(new Property("jurisdiction", "CodeableConcept", "A jurisdiction in which the Topic is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
2631        children.add(new Property("purpose", "markdown", "Explains why this Topic is needed and why it has been designed as it has.", 0, 1, purpose));
2632        children.add(new Property("copyright", "markdown", "A copyright statement relating to the Topic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Topic.", 0, 1, copyright));
2633        children.add(new Property("approvalDate", "date", "The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate));
2634        children.add(new Property("lastReviewDate", "date", "The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.", 0, 1, lastReviewDate));
2635        children.add(new Property("effectivePeriod", "Period", "The period during which the Topic content was or is planned to be effective.", 0, 1, effectivePeriod));
2636        children.add(new Property("resourceTrigger", "", "The criteria for including updates to a nominated resource in the topic.  Thie criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression.", 0, 1, resourceTrigger));
2637        children.add(new Property("canFilterBy", "", "List of properties by which Subscriptions on the topic can be filtered.", 0, java.lang.Integer.MAX_VALUE, canFilterBy));
2638      }
2639
2640      @Override
2641      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2642        switch (_hash) {
2643        case 116079: /*url*/  return new Property("url", "uri", "An absolute URL that is used to identify this Topic when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Topic is (or will be) published. The URL SHOULD include the major version of the Topic. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url);
2644        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "Business identifiers assigned to this Topic by the performer and/or other systems.  These identifiers remain constant as the resource is updated and propagates from server to server.", 0, java.lang.Integer.MAX_VALUE, identifier);
2645        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the Topic when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Topic author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions are orderable.", 0, 1, version);
2646        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the Topic, for example, \"admission\".", 0, 1, title);
2647        case -978133683: /*derivedFromCanonical*/  return new Property("derivedFromCanonical", "canonical(Topic)", "The canonical URL pointing to another FHIR-defined Topic that is adhered to in whole or in part by this Topic.", 0, java.lang.Integer.MAX_VALUE, derivedFromCanonical);
2648        case -1076333435: /*derivedFromUri*/  return new Property("derivedFromUri", "uri", "The URL pointing to an externally-defined subscription topic or other definition that is adhered to in whole or in part by this definition.", 0, java.lang.Integer.MAX_VALUE, derivedFromUri);
2649        case -892481550: /*status*/  return new Property("status", "code", "The current state of the Topic.", 0, 1, status);
2650        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A flag to indicate that this Topic is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental);
2651        case 3076014: /*date*/  return new Property("date", "dateTime", "For draft definitions, indicates the date of initial creation.  For active definitions, represents the date of activation.  For withdrawn definitions, indicates the date of withdrawal.", 0, 1, date);
2652        case 1447404028: /*publisher*/  return new Property("publisher", "Reference(Practitioner|PractitionerRole|Organization)", "Helps establish the \"authority/credibility\" of the Topic.  May also allow for contact.", 0, 1, publisher);
2653        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
2654        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the Topic from the consumer's perspective.", 0, 1, description);
2655        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of code system definitions.", 0, java.lang.Integer.MAX_VALUE, useContext);
2656        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A jurisdiction in which the Topic is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
2657        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explains why this Topic is needed and why it has been designed as it has.", 0, 1, purpose);
2658        case 1522889671: /*copyright*/  return new Property("copyright", "markdown", "A copyright statement relating to the Topic and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the Topic.", 0, 1, copyright);
2659        case 223539345: /*approvalDate*/  return new Property("approvalDate", "date", "The date on which the asset content was approved by the publisher. Approval happens once when the content is officially approved for usage.", 0, 1, approvalDate);
2660        case -1687512484: /*lastReviewDate*/  return new Property("lastReviewDate", "date", "The date on which the asset content was last reviewed. Review happens periodically after that, but doesn't change the original approval date.", 0, 1, lastReviewDate);
2661        case -403934648: /*effectivePeriod*/  return new Property("effectivePeriod", "Period", "The period during which the Topic content was or is planned to be effective.", 0, 1, effectivePeriod);
2662        case -424927798: /*resourceTrigger*/  return new Property("resourceTrigger", "", "The criteria for including updates to a nominated resource in the topic.  Thie criteria may be just a human readable description and/or a full FHIR search string or FHIRPath expression.", 0, 1, resourceTrigger);
2663        case -1299519009: /*canFilterBy*/  return new Property("canFilterBy", "", "List of properties by which Subscriptions on the topic can be filtered.", 0, java.lang.Integer.MAX_VALUE, canFilterBy);
2664        default: return super.getNamedProperty(_hash, _name, _checkValid);
2665        }
2666
2667      }
2668
2669      @Override
2670      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2671        switch (hash) {
2672        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
2673        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
2674        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
2675        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
2676        case -978133683: /*derivedFromCanonical*/ return this.derivedFromCanonical == null ? new Base[0] : this.derivedFromCanonical.toArray(new Base[this.derivedFromCanonical.size()]); // CanonicalType
2677        case -1076333435: /*derivedFromUri*/ return this.derivedFromUri == null ? new Base[0] : this.derivedFromUri.toArray(new Base[this.derivedFromUri.size()]); // UriType
2678        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
2679        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
2680        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2681        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // Reference
2682        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
2683        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
2684        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
2685        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
2686        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
2687        case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType
2688        case 223539345: /*approvalDate*/ return this.approvalDate == null ? new Base[0] : new Base[] {this.approvalDate}; // DateType
2689        case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
2690        case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
2691        case -424927798: /*resourceTrigger*/ return this.resourceTrigger == null ? new Base[0] : new Base[] {this.resourceTrigger}; // TopicResourceTriggerComponent
2692        case -1299519009: /*canFilterBy*/ return this.canFilterBy == null ? new Base[0] : this.canFilterBy.toArray(new Base[this.canFilterBy.size()]); // TopicCanFilterByComponent
2693        default: return super.getProperty(hash, name, checkValid);
2694        }
2695
2696      }
2697
2698      @Override
2699      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2700        switch (hash) {
2701        case 116079: // url
2702          this.url = TypeConvertor.castToUri(value); // UriType
2703          return value;
2704        case -1618432855: // identifier
2705          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
2706          return value;
2707        case 351608024: // version
2708          this.version = TypeConvertor.castToString(value); // StringType
2709          return value;
2710        case 110371416: // title
2711          this.title = TypeConvertor.castToString(value); // StringType
2712          return value;
2713        case -978133683: // derivedFromCanonical
2714          this.getDerivedFromCanonical().add(TypeConvertor.castToCanonical(value)); // CanonicalType
2715          return value;
2716        case -1076333435: // derivedFromUri
2717          this.getDerivedFromUri().add(TypeConvertor.castToUri(value)); // UriType
2718          return value;
2719        case -892481550: // status
2720          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2721          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2722          return value;
2723        case -404562712: // experimental
2724          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
2725          return value;
2726        case 3076014: // date
2727          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2728          return value;
2729        case 1447404028: // publisher
2730          this.publisher = TypeConvertor.castToReference(value); // Reference
2731          return value;
2732        case 951526432: // contact
2733          this.getContact().add(TypeConvertor.castToContactDetail(value)); // ContactDetail
2734          return value;
2735        case -1724546052: // description
2736          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
2737          return value;
2738        case -669707736: // useContext
2739          this.getUseContext().add(TypeConvertor.castToUsageContext(value)); // UsageContext
2740          return value;
2741        case -507075711: // jurisdiction
2742          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept
2743          return value;
2744        case -220463842: // purpose
2745          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
2746          return value;
2747        case 1522889671: // copyright
2748          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
2749          return value;
2750        case 223539345: // approvalDate
2751          this.approvalDate = TypeConvertor.castToDate(value); // DateType
2752          return value;
2753        case -1687512484: // lastReviewDate
2754          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
2755          return value;
2756        case -403934648: // effectivePeriod
2757          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
2758          return value;
2759        case -424927798: // resourceTrigger
2760          this.resourceTrigger = (TopicResourceTriggerComponent) value; // TopicResourceTriggerComponent
2761          return value;
2762        case -1299519009: // canFilterBy
2763          this.getCanFilterBy().add((TopicCanFilterByComponent) value); // TopicCanFilterByComponent
2764          return value;
2765        default: return super.setProperty(hash, name, value);
2766        }
2767
2768      }
2769
2770      @Override
2771      public Base setProperty(String name, Base value) throws FHIRException {
2772        if (name.equals("url")) {
2773          this.url = TypeConvertor.castToUri(value); // UriType
2774        } else if (name.equals("identifier")) {
2775          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
2776        } else if (name.equals("version")) {
2777          this.version = TypeConvertor.castToString(value); // StringType
2778        } else if (name.equals("title")) {
2779          this.title = TypeConvertor.castToString(value); // StringType
2780        } else if (name.equals("derivedFromCanonical")) {
2781          this.getDerivedFromCanonical().add(TypeConvertor.castToCanonical(value));
2782        } else if (name.equals("derivedFromUri")) {
2783          this.getDerivedFromUri().add(TypeConvertor.castToUri(value));
2784        } else if (name.equals("status")) {
2785          value = new PublicationStatusEnumFactory().fromType(TypeConvertor.castToCode(value));
2786          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2787        } else if (name.equals("experimental")) {
2788          this.experimental = TypeConvertor.castToBoolean(value); // BooleanType
2789        } else if (name.equals("date")) {
2790          this.date = TypeConvertor.castToDateTime(value); // DateTimeType
2791        } else if (name.equals("publisher")) {
2792          this.publisher = TypeConvertor.castToReference(value); // Reference
2793        } else if (name.equals("contact")) {
2794          this.getContact().add(TypeConvertor.castToContactDetail(value));
2795        } else if (name.equals("description")) {
2796          this.description = TypeConvertor.castToMarkdown(value); // MarkdownType
2797        } else if (name.equals("useContext")) {
2798          this.getUseContext().add(TypeConvertor.castToUsageContext(value));
2799        } else if (name.equals("jurisdiction")) {
2800          this.getJurisdiction().add(TypeConvertor.castToCodeableConcept(value));
2801        } else if (name.equals("purpose")) {
2802          this.purpose = TypeConvertor.castToMarkdown(value); // MarkdownType
2803        } else if (name.equals("copyright")) {
2804          this.copyright = TypeConvertor.castToMarkdown(value); // MarkdownType
2805        } else if (name.equals("approvalDate")) {
2806          this.approvalDate = TypeConvertor.castToDate(value); // DateType
2807        } else if (name.equals("lastReviewDate")) {
2808          this.lastReviewDate = TypeConvertor.castToDate(value); // DateType
2809        } else if (name.equals("effectivePeriod")) {
2810          this.effectivePeriod = TypeConvertor.castToPeriod(value); // Period
2811        } else if (name.equals("resourceTrigger")) {
2812          this.resourceTrigger = (TopicResourceTriggerComponent) value; // TopicResourceTriggerComponent
2813        } else if (name.equals("canFilterBy")) {
2814          this.getCanFilterBy().add((TopicCanFilterByComponent) value);
2815        } else
2816          return super.setProperty(name, value);
2817        return value;
2818      }
2819
2820      @Override
2821      public Base makeProperty(int hash, String name) throws FHIRException {
2822        switch (hash) {
2823        case 116079:  return getUrlElement();
2824        case -1618432855:  return addIdentifier(); 
2825        case 351608024:  return getVersionElement();
2826        case 110371416:  return getTitleElement();
2827        case -978133683:  return addDerivedFromCanonicalElement();
2828        case -1076333435:  return addDerivedFromUriElement();
2829        case -892481550:  return getStatusElement();
2830        case -404562712:  return getExperimentalElement();
2831        case 3076014:  return getDateElement();
2832        case 1447404028:  return getPublisher();
2833        case 951526432:  return addContact(); 
2834        case -1724546052:  return getDescriptionElement();
2835        case -669707736:  return addUseContext(); 
2836        case -507075711:  return addJurisdiction(); 
2837        case -220463842:  return getPurposeElement();
2838        case 1522889671:  return getCopyrightElement();
2839        case 223539345:  return getApprovalDateElement();
2840        case -1687512484:  return getLastReviewDateElement();
2841        case -403934648:  return getEffectivePeriod();
2842        case -424927798:  return getResourceTrigger();
2843        case -1299519009:  return addCanFilterBy(); 
2844        default: return super.makeProperty(hash, name);
2845        }
2846
2847      }
2848
2849      @Override
2850      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
2851        switch (hash) {
2852        case 116079: /*url*/ return new String[] {"uri"};
2853        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
2854        case 351608024: /*version*/ return new String[] {"string"};
2855        case 110371416: /*title*/ return new String[] {"string"};
2856        case -978133683: /*derivedFromCanonical*/ return new String[] {"canonical"};
2857        case -1076333435: /*derivedFromUri*/ return new String[] {"uri"};
2858        case -892481550: /*status*/ return new String[] {"code"};
2859        case -404562712: /*experimental*/ return new String[] {"boolean"};
2860        case 3076014: /*date*/ return new String[] {"dateTime"};
2861        case 1447404028: /*publisher*/ return new String[] {"Reference"};
2862        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
2863        case -1724546052: /*description*/ return new String[] {"markdown"};
2864        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
2865        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
2866        case -220463842: /*purpose*/ return new String[] {"markdown"};
2867        case 1522889671: /*copyright*/ return new String[] {"markdown"};
2868        case 223539345: /*approvalDate*/ return new String[] {"date"};
2869        case -1687512484: /*lastReviewDate*/ return new String[] {"date"};
2870        case -403934648: /*effectivePeriod*/ return new String[] {"Period"};
2871        case -424927798: /*resourceTrigger*/ return new String[] {};
2872        case -1299519009: /*canFilterBy*/ return new String[] {};
2873        default: return super.getTypesForProperty(hash, name);
2874        }
2875
2876      }
2877
2878      @Override
2879      public Base addChild(String name) throws FHIRException {
2880        if (name.equals("url")) {
2881          throw new FHIRException("Cannot call addChild on a primitive type Topic.url");
2882        }
2883        else if (name.equals("identifier")) {
2884          return addIdentifier();
2885        }
2886        else if (name.equals("version")) {
2887          throw new FHIRException("Cannot call addChild on a primitive type Topic.version");
2888        }
2889        else if (name.equals("title")) {
2890          throw new FHIRException("Cannot call addChild on a primitive type Topic.title");
2891        }
2892        else if (name.equals("derivedFromCanonical")) {
2893          throw new FHIRException("Cannot call addChild on a primitive type Topic.derivedFromCanonical");
2894        }
2895        else if (name.equals("derivedFromUri")) {
2896          throw new FHIRException("Cannot call addChild on a primitive type Topic.derivedFromUri");
2897        }
2898        else if (name.equals("status")) {
2899          throw new FHIRException("Cannot call addChild on a primitive type Topic.status");
2900        }
2901        else if (name.equals("experimental")) {
2902          throw new FHIRException("Cannot call addChild on a primitive type Topic.experimental");
2903        }
2904        else if (name.equals("date")) {
2905          throw new FHIRException("Cannot call addChild on a primitive type Topic.date");
2906        }
2907        else if (name.equals("publisher")) {
2908          this.publisher = new Reference();
2909          return this.publisher;
2910        }
2911        else if (name.equals("contact")) {
2912          return addContact();
2913        }
2914        else if (name.equals("description")) {
2915          throw new FHIRException("Cannot call addChild on a primitive type Topic.description");
2916        }
2917        else if (name.equals("useContext")) {
2918          return addUseContext();
2919        }
2920        else if (name.equals("jurisdiction")) {
2921          return addJurisdiction();
2922        }
2923        else if (name.equals("purpose")) {
2924          throw new FHIRException("Cannot call addChild on a primitive type Topic.purpose");
2925        }
2926        else if (name.equals("copyright")) {
2927          throw new FHIRException("Cannot call addChild on a primitive type Topic.copyright");
2928        }
2929        else if (name.equals("approvalDate")) {
2930          throw new FHIRException("Cannot call addChild on a primitive type Topic.approvalDate");
2931        }
2932        else if (name.equals("lastReviewDate")) {
2933          throw new FHIRException("Cannot call addChild on a primitive type Topic.lastReviewDate");
2934        }
2935        else if (name.equals("effectivePeriod")) {
2936          this.effectivePeriod = new Period();
2937          return this.effectivePeriod;
2938        }
2939        else if (name.equals("resourceTrigger")) {
2940          this.resourceTrigger = new TopicResourceTriggerComponent();
2941          return this.resourceTrigger;
2942        }
2943        else if (name.equals("canFilterBy")) {
2944          return addCanFilterBy();
2945        }
2946        else
2947          return super.addChild(name);
2948      }
2949
2950  public String fhirType() {
2951    return "Topic";
2952
2953  }
2954
2955      public Topic copy() {
2956        Topic dst = new Topic();
2957        copyValues(dst);
2958        return dst;
2959      }
2960
2961      public void copyValues(Topic dst) {
2962        super.copyValues(dst);
2963        dst.url = url == null ? null : url.copy();
2964        if (identifier != null) {
2965          dst.identifier = new ArrayList<Identifier>();
2966          for (Identifier i : identifier)
2967            dst.identifier.add(i.copy());
2968        };
2969        dst.version = version == null ? null : version.copy();
2970        dst.title = title == null ? null : title.copy();
2971        if (derivedFromCanonical != null) {
2972          dst.derivedFromCanonical = new ArrayList<CanonicalType>();
2973          for (CanonicalType i : derivedFromCanonical)
2974            dst.derivedFromCanonical.add(i.copy());
2975        };
2976        if (derivedFromUri != null) {
2977          dst.derivedFromUri = new ArrayList<UriType>();
2978          for (UriType i : derivedFromUri)
2979            dst.derivedFromUri.add(i.copy());
2980        };
2981        dst.status = status == null ? null : status.copy();
2982        dst.experimental = experimental == null ? null : experimental.copy();
2983        dst.date = date == null ? null : date.copy();
2984        dst.publisher = publisher == null ? null : publisher.copy();
2985        if (contact != null) {
2986          dst.contact = new ArrayList<ContactDetail>();
2987          for (ContactDetail i : contact)
2988            dst.contact.add(i.copy());
2989        };
2990        dst.description = description == null ? null : description.copy();
2991        if (useContext != null) {
2992          dst.useContext = new ArrayList<UsageContext>();
2993          for (UsageContext i : useContext)
2994            dst.useContext.add(i.copy());
2995        };
2996        if (jurisdiction != null) {
2997          dst.jurisdiction = new ArrayList<CodeableConcept>();
2998          for (CodeableConcept i : jurisdiction)
2999            dst.jurisdiction.add(i.copy());
3000        };
3001        dst.purpose = purpose == null ? null : purpose.copy();
3002        dst.copyright = copyright == null ? null : copyright.copy();
3003        dst.approvalDate = approvalDate == null ? null : approvalDate.copy();
3004        dst.lastReviewDate = lastReviewDate == null ? null : lastReviewDate.copy();
3005        dst.effectivePeriod = effectivePeriod == null ? null : effectivePeriod.copy();
3006        dst.resourceTrigger = resourceTrigger == null ? null : resourceTrigger.copy();
3007        if (canFilterBy != null) {
3008          dst.canFilterBy = new ArrayList<TopicCanFilterByComponent>();
3009          for (TopicCanFilterByComponent i : canFilterBy)
3010            dst.canFilterBy.add(i.copy());
3011        };
3012      }
3013
3014      protected Topic typedCopy() {
3015        return copy();
3016      }
3017
3018      @Override
3019      public boolean equalsDeep(Base other_) {
3020        if (!super.equalsDeep(other_))
3021          return false;
3022        if (!(other_ instanceof Topic))
3023          return false;
3024        Topic o = (Topic) other_;
3025        return compareDeep(url, o.url, true) && compareDeep(identifier, o.identifier, true) && compareDeep(version, o.version, true)
3026           && compareDeep(title, o.title, true) && compareDeep(derivedFromCanonical, o.derivedFromCanonical, true)
3027           && compareDeep(derivedFromUri, o.derivedFromUri, true) && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true)
3028           && compareDeep(date, o.date, true) && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true)
3029           && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true)
3030           && compareDeep(jurisdiction, o.jurisdiction, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true)
3031           && compareDeep(approvalDate, o.approvalDate, true) && compareDeep(lastReviewDate, o.lastReviewDate, true)
3032           && compareDeep(effectivePeriod, o.effectivePeriod, true) && compareDeep(resourceTrigger, o.resourceTrigger, true)
3033           && compareDeep(canFilterBy, o.canFilterBy, true);
3034      }
3035
3036      @Override
3037      public boolean equalsShallow(Base other_) {
3038        if (!super.equalsShallow(other_))
3039          return false;
3040        if (!(other_ instanceof Topic))
3041          return false;
3042        Topic o = (Topic) other_;
3043        return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(title, o.title, true)
3044           && compareValues(derivedFromCanonical, o.derivedFromCanonical, true) && compareValues(derivedFromUri, o.derivedFromUri, true)
3045           && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(date, o.date, true)
3046           && compareValues(description, o.description, true) && compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true)
3047           && compareValues(approvalDate, o.approvalDate, true) && compareValues(lastReviewDate, o.lastReviewDate, true)
3048          ;
3049      }
3050
3051      public boolean isEmpty() {
3052        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, identifier, version
3053          , title, derivedFromCanonical, derivedFromUri, status, experimental, date, publisher
3054          , contact, description, useContext, jurisdiction, purpose, copyright, approvalDate
3055          , lastReviewDate, effectivePeriod, resourceTrigger, canFilterBy);
3056      }
3057
3058  @Override
3059  public ResourceType getResourceType() {
3060    return ResourceType.Topic;
3061   }
3062
3063 /**
3064   * Search parameter: <b>date</b>
3065   * <p>
3066   * Description: <b>Date status first applied</b><br>
3067   * Type: <b>date</b><br>
3068   * Path: <b>Topic.date</b><br>
3069   * </p>
3070   */
3071  @SearchParamDefinition(name="date", path="Topic.date", description="Date status first applied", type="date" )
3072  public static final String SP_DATE = "date";
3073 /**
3074   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3075   * <p>
3076   * Description: <b>Date status first applied</b><br>
3077   * Type: <b>date</b><br>
3078   * Path: <b>Topic.date</b><br>
3079   * </p>
3080   */
3081  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3082
3083 /**
3084   * Search parameter: <b>identifier</b>
3085   * <p>
3086   * Description: <b>Business Identifier for Topic</b><br>
3087   * Type: <b>token</b><br>
3088   * Path: <b>Topic.identifier</b><br>
3089   * </p>
3090   */
3091  @SearchParamDefinition(name="identifier", path="Topic.identifier", description="Business Identifier for Topic", type="token" )
3092  public static final String SP_IDENTIFIER = "identifier";
3093 /**
3094   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
3095   * <p>
3096   * Description: <b>Business Identifier for Topic</b><br>
3097   * Type: <b>token</b><br>
3098   * Path: <b>Topic.identifier</b><br>
3099   * </p>
3100   */
3101  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
3102
3103 /**
3104   * Search parameter: <b>publisher</b>
3105   * <p>
3106   * Description: <b>The name of the individual or organization that published the Topic</b><br>
3107   * Type: <b>reference</b><br>
3108   * Path: <b>Topic.publisher</b><br>
3109   * </p>
3110   */
3111  @SearchParamDefinition(name="publisher", path="Topic.publisher", description="The name of the individual or organization that published the Topic", type="reference", target={Organization.class, Practitioner.class, PractitionerRole.class } )
3112  public static final String SP_PUBLISHER = "publisher";
3113 /**
3114   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
3115   * <p>
3116   * Description: <b>The name of the individual or organization that published the Topic</b><br>
3117   * Type: <b>reference</b><br>
3118   * Path: <b>Topic.publisher</b><br>
3119   * </p>
3120   */
3121  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PUBLISHER);
3122
3123/**
3124   * Constant for fluent queries to be used to add include statements. Specifies
3125   * the path value of "<b>Topic:publisher</b>".
3126   */
3127  public static final ca.uhn.fhir.model.api.Include INCLUDE_PUBLISHER = new ca.uhn.fhir.model.api.Include("Topic:publisher").toLocked();
3128
3129 /**
3130   * Search parameter: <b>resource-type</b>
3131   * <p>
3132   * Description: <b>Candidate types for this topic</b><br>
3133   * Type: <b>token</b><br>
3134   * Path: <b>Topic.resourceTrigger.resourceType</b><br>
3135   * </p>
3136   */
3137  @SearchParamDefinition(name="resource-type", path="Topic.resourceTrigger.resourceType", description="Candidate types for this topic", type="token" )
3138  public static final String SP_RESOURCE_TYPE = "resource-type";
3139 /**
3140   * <b>Fluent Client</b> search parameter constant for <b>resource-type</b>
3141   * <p>
3142   * Description: <b>Candidate types for this topic</b><br>
3143   * Type: <b>token</b><br>
3144   * Path: <b>Topic.resourceTrigger.resourceType</b><br>
3145   * </p>
3146   */
3147  public static final ca.uhn.fhir.rest.gclient.TokenClientParam RESOURCE_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_RESOURCE_TYPE);
3148
3149 /**
3150   * Search parameter: <b>status</b>
3151   * <p>
3152   * Description: <b>draft | active | retired | unknown</b><br>
3153   * Type: <b>token</b><br>
3154   * Path: <b>Topic.status</b><br>
3155   * </p>
3156   */
3157  @SearchParamDefinition(name="status", path="Topic.status", description="draft | active | retired | unknown", type="token" )
3158  public static final String SP_STATUS = "status";
3159 /**
3160   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3161   * <p>
3162   * Description: <b>draft | active | retired | unknown</b><br>
3163   * Type: <b>token</b><br>
3164   * Path: <b>Topic.status</b><br>
3165   * </p>
3166   */
3167  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3168
3169 /**
3170   * Search parameter: <b>title</b>
3171   * <p>
3172   * Description: <b>Name for this Topic (Human friendly)</b><br>
3173   * Type: <b>string</b><br>
3174   * Path: <b>Topic.title</b><br>
3175   * </p>
3176   */
3177  @SearchParamDefinition(name="title", path="Topic.title", description="Name for this Topic (Human friendly)", type="string" )
3178  public static final String SP_TITLE = "title";
3179 /**
3180   * <b>Fluent Client</b> search parameter constant for <b>title</b>
3181   * <p>
3182   * Description: <b>Name for this Topic (Human friendly)</b><br>
3183   * Type: <b>string</b><br>
3184   * Path: <b>Topic.title</b><br>
3185   * </p>
3186   */
3187  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
3188
3189 /**
3190   * Search parameter: <b>trigger-description</b>
3191   * <p>
3192   * Description: <b>Text representation of the trigger</b><br>
3193   * Type: <b>string</b><br>
3194   * Path: <b>Topic.resourceTrigger.description</b><br>
3195   * </p>
3196   */
3197  @SearchParamDefinition(name="trigger-description", path="Topic.resourceTrigger.description", description="Text representation of the trigger", type="string" )
3198  public static final String SP_TRIGGER_DESCRIPTION = "trigger-description";
3199 /**
3200   * <b>Fluent Client</b> search parameter constant for <b>trigger-description</b>
3201   * <p>
3202   * Description: <b>Text representation of the trigger</b><br>
3203   * Type: <b>string</b><br>
3204   * Path: <b>Topic.resourceTrigger.description</b><br>
3205   * </p>
3206   */
3207  public static final ca.uhn.fhir.rest.gclient.StringClientParam TRIGGER_DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TRIGGER_DESCRIPTION);
3208
3209 /**
3210   * Search parameter: <b>url</b>
3211   * <p>
3212   * Description: <b>Logical canonical URL to reference this Topic (globally unique)</b><br>
3213   * Type: <b>uri</b><br>
3214   * Path: <b>Topic.url</b><br>
3215   * </p>
3216   */
3217  @SearchParamDefinition(name="url", path="Topic.url", description="Logical canonical URL to reference this Topic (globally unique)", type="uri" )
3218  public static final String SP_URL = "url";
3219 /**
3220   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3221   * <p>
3222   * Description: <b>Logical canonical URL to reference this Topic (globally unique)</b><br>
3223   * Type: <b>uri</b><br>
3224   * Path: <b>Topic.url</b><br>
3225   * </p>
3226   */
3227  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3228
3229 /**
3230   * Search parameter: <b>version</b>
3231   * <p>
3232   * Description: <b>Business version of the Topic</b><br>
3233   * Type: <b>token</b><br>
3234   * Path: <b>Topic.version</b><br>
3235   * </p>
3236   */
3237  @SearchParamDefinition(name="version", path="Topic.version", description="Business version of the Topic", type="token" )
3238  public static final String SP_VERSION = "version";
3239 /**
3240   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3241   * <p>
3242   * Description: <b>Business version of the Topic</b><br>
3243   * Type: <b>token</b><br>
3244   * Path: <b>Topic.version</b><br>
3245   * </p>
3246   */
3247  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3248
3249
3250}
3251