001package org.hl7.fhir.r5.model;
002
003
004/*
005  Copyright (c) 2011+, HL7, Inc.
006  All rights reserved.
007  
008  Redistribution and use in source and binary forms, with or without modification, \
009  are permitted provided that the following conditions are met:
010  
011   * Redistributions of source code must retain the above copyright notice, this \
012     list of conditions and the following disclaimer.
013   * Redistributions in binary form must reproduce the above copyright notice, \
014     this list of conditions and the following disclaimer in the documentation \
015     and/or other materials provided with the distribution.
016   * Neither the name of HL7 nor the names of its contributors may be used to 
017     endorse or promote products derived from this software without specific 
018     prior written permission.
019  
020  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
021  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
022  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
023  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
024  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
025  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
026  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
027  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
028  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
029  POSSIBILITY OF SUCH DAMAGE.
030  */
031
032// Generated on Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1
033
034import java.util.ArrayList;
035import java.util.Date;
036import java.util.List;
037import org.hl7.fhir.utilities.Utilities;
038import org.hl7.fhir.r5.model.Enumerations.*;
039import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
040import org.hl7.fhir.exceptions.FHIRException;
041import org.hl7.fhir.instance.model.api.ICompositeType;
042import ca.uhn.fhir.model.api.annotation.ResourceDef;
043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
044import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
045import ca.uhn.fhir.model.api.annotation.Child;
046import ca.uhn.fhir.model.api.annotation.ChildOrder;
047import ca.uhn.fhir.model.api.annotation.Description;
048import ca.uhn.fhir.model.api.annotation.Block;
049
050/**
051 * The subscription resource describes a particular client's request to be notified about a SubscriptionTopic.
052 */
053@ResourceDef(name="Subscription", profile="http://hl7.org/fhir/StructureDefinition/Subscription")
054public class Subscription extends DomainResource {
055
056    public enum SubscriptionPayloadContent {
057        /**
058         * No resource content is transacted in the notification payload.
059         */
060        EMPTY, 
061        /**
062         * Only the resource id is transacted in the notification payload.
063         */
064        IDONLY, 
065        /**
066         * The entire resource is transacted in the notification payload.
067         */
068        FULLRESOURCE, 
069        /**
070         * added to help the parsers with the generic types
071         */
072        NULL;
073        public static SubscriptionPayloadContent fromCode(String codeString) throws FHIRException {
074            if (codeString == null || "".equals(codeString))
075                return null;
076        if ("empty".equals(codeString))
077          return EMPTY;
078        if ("id-only".equals(codeString))
079          return IDONLY;
080        if ("full-resource".equals(codeString))
081          return FULLRESOURCE;
082        if (Configuration.isAcceptInvalidEnums())
083          return null;
084        else
085          throw new FHIRException("Unknown SubscriptionPayloadContent code '"+codeString+"'");
086        }
087        public String toCode() {
088          switch (this) {
089            case EMPTY: return "empty";
090            case IDONLY: return "id-only";
091            case FULLRESOURCE: return "full-resource";
092            default: return "?";
093          }
094        }
095        public String getSystem() {
096          switch (this) {
097            case EMPTY: return "http://hl7.org/fhir/subscription-payload-content";
098            case IDONLY: return "http://hl7.org/fhir/subscription-payload-content";
099            case FULLRESOURCE: return "http://hl7.org/fhir/subscription-payload-content";
100            default: return "?";
101          }
102        }
103        public String getDefinition() {
104          switch (this) {
105            case EMPTY: return "No resource content is transacted in the notification payload.";
106            case IDONLY: return "Only the resource id is transacted in the notification payload.";
107            case FULLRESOURCE: return "The entire resource is transacted in the notification payload.";
108            default: return "?";
109          }
110        }
111        public String getDisplay() {
112          switch (this) {
113            case EMPTY: return "empty";
114            case IDONLY: return "id-only";
115            case FULLRESOURCE: return "full-resource";
116            default: return "?";
117          }
118        }
119    }
120
121  public static class SubscriptionPayloadContentEnumFactory implements EnumFactory<SubscriptionPayloadContent> {
122    public SubscriptionPayloadContent fromCode(String codeString) throws IllegalArgumentException {
123      if (codeString == null || "".equals(codeString))
124            if (codeString == null || "".equals(codeString))
125                return null;
126        if ("empty".equals(codeString))
127          return SubscriptionPayloadContent.EMPTY;
128        if ("id-only".equals(codeString))
129          return SubscriptionPayloadContent.IDONLY;
130        if ("full-resource".equals(codeString))
131          return SubscriptionPayloadContent.FULLRESOURCE;
132        throw new IllegalArgumentException("Unknown SubscriptionPayloadContent code '"+codeString+"'");
133        }
134        public Enumeration<SubscriptionPayloadContent> fromType(Base code) throws FHIRException {
135          if (code == null)
136            return null;
137          if (code.isEmpty())
138            return new Enumeration<SubscriptionPayloadContent>(this);
139          String codeString = ((PrimitiveType) code).asStringValue();
140          if (codeString == null || "".equals(codeString))
141            return null;
142        if ("empty".equals(codeString))
143          return new Enumeration<SubscriptionPayloadContent>(this, SubscriptionPayloadContent.EMPTY);
144        if ("id-only".equals(codeString))
145          return new Enumeration<SubscriptionPayloadContent>(this, SubscriptionPayloadContent.IDONLY);
146        if ("full-resource".equals(codeString))
147          return new Enumeration<SubscriptionPayloadContent>(this, SubscriptionPayloadContent.FULLRESOURCE);
148        throw new FHIRException("Unknown SubscriptionPayloadContent code '"+codeString+"'");
149        }
150    public String toCode(SubscriptionPayloadContent code) {
151      if (code == SubscriptionPayloadContent.EMPTY)
152        return "empty";
153      if (code == SubscriptionPayloadContent.IDONLY)
154        return "id-only";
155      if (code == SubscriptionPayloadContent.FULLRESOURCE)
156        return "full-resource";
157      return "?";
158      }
159    public String toSystem(SubscriptionPayloadContent code) {
160      return code.getSystem();
161      }
162    }
163
164    public enum SubscriptionUrlLocation {
165        /**
166         * URLs should NOT be included in notifications.
167         */
168        NONE, 
169        /**
170         * URLs should be placed in Bundle.entry.fullUrl.
171         */
172        FULLURL, 
173        /**
174         * URLs should be placed in Bundle.entry.request and/or Bundle.entry.response.
175         */
176        REQUESTRESPONSE, 
177        /**
178         * URLS should be filled out in all available locations.
179         */
180        ALL, 
181        /**
182         * added to help the parsers with the generic types
183         */
184        NULL;
185        public static SubscriptionUrlLocation fromCode(String codeString) throws FHIRException {
186            if (codeString == null || "".equals(codeString))
187                return null;
188        if ("none".equals(codeString))
189          return NONE;
190        if ("full-url".equals(codeString))
191          return FULLURL;
192        if ("request-response".equals(codeString))
193          return REQUESTRESPONSE;
194        if ("all".equals(codeString))
195          return ALL;
196        if (Configuration.isAcceptInvalidEnums())
197          return null;
198        else
199          throw new FHIRException("Unknown SubscriptionUrlLocation code '"+codeString+"'");
200        }
201        public String toCode() {
202          switch (this) {
203            case NONE: return "none";
204            case FULLURL: return "full-url";
205            case REQUESTRESPONSE: return "request-response";
206            case ALL: return "all";
207            default: return "?";
208          }
209        }
210        public String getSystem() {
211          switch (this) {
212            case NONE: return "http://hl7.org/fhir/subscription-url-location";
213            case FULLURL: return "http://hl7.org/fhir/subscription-url-location";
214            case REQUESTRESPONSE: return "http://hl7.org/fhir/subscription-url-location";
215            case ALL: return "http://hl7.org/fhir/subscription-url-location";
216            default: return "?";
217          }
218        }
219        public String getDefinition() {
220          switch (this) {
221            case NONE: return "URLs should NOT be included in notifications.";
222            case FULLURL: return "URLs should be placed in Bundle.entry.fullUrl.";
223            case REQUESTRESPONSE: return "URLs should be placed in Bundle.entry.request and/or Bundle.entry.response.";
224            case ALL: return "URLS should be filled out in all available locations.";
225            default: return "?";
226          }
227        }
228        public String getDisplay() {
229          switch (this) {
230            case NONE: return "none";
231            case FULLURL: return "full-url";
232            case REQUESTRESPONSE: return "request-response";
233            case ALL: return "all";
234            default: return "?";
235          }
236        }
237    }
238
239  public static class SubscriptionUrlLocationEnumFactory implements EnumFactory<SubscriptionUrlLocation> {
240    public SubscriptionUrlLocation fromCode(String codeString) throws IllegalArgumentException {
241      if (codeString == null || "".equals(codeString))
242            if (codeString == null || "".equals(codeString))
243                return null;
244        if ("none".equals(codeString))
245          return SubscriptionUrlLocation.NONE;
246        if ("full-url".equals(codeString))
247          return SubscriptionUrlLocation.FULLURL;
248        if ("request-response".equals(codeString))
249          return SubscriptionUrlLocation.REQUESTRESPONSE;
250        if ("all".equals(codeString))
251          return SubscriptionUrlLocation.ALL;
252        throw new IllegalArgumentException("Unknown SubscriptionUrlLocation code '"+codeString+"'");
253        }
254        public Enumeration<SubscriptionUrlLocation> fromType(Base code) throws FHIRException {
255          if (code == null)
256            return null;
257          if (code.isEmpty())
258            return new Enumeration<SubscriptionUrlLocation>(this);
259          String codeString = ((PrimitiveType) code).asStringValue();
260          if (codeString == null || "".equals(codeString))
261            return null;
262        if ("none".equals(codeString))
263          return new Enumeration<SubscriptionUrlLocation>(this, SubscriptionUrlLocation.NONE);
264        if ("full-url".equals(codeString))
265          return new Enumeration<SubscriptionUrlLocation>(this, SubscriptionUrlLocation.FULLURL);
266        if ("request-response".equals(codeString))
267          return new Enumeration<SubscriptionUrlLocation>(this, SubscriptionUrlLocation.REQUESTRESPONSE);
268        if ("all".equals(codeString))
269          return new Enumeration<SubscriptionUrlLocation>(this, SubscriptionUrlLocation.ALL);
270        throw new FHIRException("Unknown SubscriptionUrlLocation code '"+codeString+"'");
271        }
272    public String toCode(SubscriptionUrlLocation code) {
273      if (code == SubscriptionUrlLocation.NONE)
274        return "none";
275      if (code == SubscriptionUrlLocation.FULLURL)
276        return "full-url";
277      if (code == SubscriptionUrlLocation.REQUESTRESPONSE)
278        return "request-response";
279      if (code == SubscriptionUrlLocation.ALL)
280        return "all";
281      return "?";
282      }
283    public String toSystem(SubscriptionUrlLocation code) {
284      return code.getSystem();
285      }
286    }
287
288    @Block()
289    public static class SubscriptionFilterByComponent extends BackboneElement implements IBaseBackboneElement {
290        /**
291         * If the element is a reference to another resource, this element contains "Reference", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient).
292         */
293        @Child(name = "resourceType", type = {UriType.class}, order=1, min=0, max=1, modifier=false, summary=true)
294        @Description(shortDefinition="Allowed Data type or Resource (reference to definition) for this Subscription", formalDefinition="If the element is a reference to another resource, this element contains \"Reference\", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient)." )
295        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types")
296        protected UriType resourceType;
297
298        /**
299         * The filter label (=key) as defined in the `SubscriptionTopic.canfilterBy.searchParamName`  element.
300         */
301        @Child(name = "searchParamName", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true)
302        @Description(shortDefinition="Filter label defined in SubscriptionTopic", formalDefinition="The filter label (=key) as defined in the `SubscriptionTopic.canfilterBy.searchParamName`  element." )
303        protected StringType searchParamName;
304
305        /**
306         * The operator to apply to the filter value when determining matches (Search modifiers).
307         */
308        @Child(name = "searchModifier", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=true)
309        @Description(shortDefinition="= | eq | ne | gt | lt | ge | le | sa | eb | ap | above | below | in | not-in | of-type", formalDefinition="The operator to apply to the filter value when determining matches (Search modifiers)." )
310        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subscription-search-modifier")
311        protected Enumeration<SubscriptionSearchModifier> searchModifier;
312
313        /**
314         * The literal value or resource path as is legal in search - for example, "Patient/123" or "le1950".
315         */
316        @Child(name = "value", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=true)
317        @Description(shortDefinition="Literal value or resource path", formalDefinition="The literal value or resource path as is legal in search - for example, \"Patient/123\" or \"le1950\"." )
318        protected StringType value;
319
320        private static final long serialVersionUID = 1179250301L;
321
322    /**
323     * Constructor
324     */
325      public SubscriptionFilterByComponent() {
326        super();
327      }
328
329    /**
330     * Constructor
331     */
332      public SubscriptionFilterByComponent(String searchParamName, String value) {
333        super();
334        this.setSearchParamName(searchParamName);
335        this.setValue(value);
336      }
337
338        /**
339         * @return {@link #resourceType} (If the element is a reference to another resource, this element contains "Reference", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient).). This is the underlying object with id, value and extensions. The accessor "getResourceType" gives direct access to the value
340         */
341        public UriType getResourceTypeElement() { 
342          if (this.resourceType == null)
343            if (Configuration.errorOnAutoCreate())
344              throw new Error("Attempt to auto-create SubscriptionFilterByComponent.resourceType");
345            else if (Configuration.doAutoCreate())
346              this.resourceType = new UriType(); // bb
347          return this.resourceType;
348        }
349
350        public boolean hasResourceTypeElement() { 
351          return this.resourceType != null && !this.resourceType.isEmpty();
352        }
353
354        public boolean hasResourceType() { 
355          return this.resourceType != null && !this.resourceType.isEmpty();
356        }
357
358        /**
359         * @param value {@link #resourceType} (If the element is a reference to another resource, this element contains "Reference", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient).). This is the underlying object with id, value and extensions. The accessor "getResourceType" gives direct access to the value
360         */
361        public SubscriptionFilterByComponent setResourceTypeElement(UriType value) { 
362          this.resourceType = value;
363          return this;
364        }
365
366        /**
367         * @return If the element is a reference to another resource, this element contains "Reference", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient).
368         */
369        public String getResourceType() { 
370          return this.resourceType == null ? null : this.resourceType.getValue();
371        }
372
373        /**
374         * @param value If the element is a reference to another resource, this element contains "Reference", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient).
375         */
376        public SubscriptionFilterByComponent setResourceType(String value) { 
377          if (Utilities.noString(value))
378            this.resourceType = null;
379          else {
380            if (this.resourceType == null)
381              this.resourceType = new UriType();
382            this.resourceType.setValue(value);
383          }
384          return this;
385        }
386
387        /**
388         * @return {@link #searchParamName} (The filter label (=key) as defined in the `SubscriptionTopic.canfilterBy.searchParamName`  element.). This is the underlying object with id, value and extensions. The accessor "getSearchParamName" gives direct access to the value
389         */
390        public StringType getSearchParamNameElement() { 
391          if (this.searchParamName == null)
392            if (Configuration.errorOnAutoCreate())
393              throw new Error("Attempt to auto-create SubscriptionFilterByComponent.searchParamName");
394            else if (Configuration.doAutoCreate())
395              this.searchParamName = new StringType(); // bb
396          return this.searchParamName;
397        }
398
399        public boolean hasSearchParamNameElement() { 
400          return this.searchParamName != null && !this.searchParamName.isEmpty();
401        }
402
403        public boolean hasSearchParamName() { 
404          return this.searchParamName != null && !this.searchParamName.isEmpty();
405        }
406
407        /**
408         * @param value {@link #searchParamName} (The filter label (=key) as defined in the `SubscriptionTopic.canfilterBy.searchParamName`  element.). This is the underlying object with id, value and extensions. The accessor "getSearchParamName" gives direct access to the value
409         */
410        public SubscriptionFilterByComponent setSearchParamNameElement(StringType value) { 
411          this.searchParamName = value;
412          return this;
413        }
414
415        /**
416         * @return The filter label (=key) as defined in the `SubscriptionTopic.canfilterBy.searchParamName`  element.
417         */
418        public String getSearchParamName() { 
419          return this.searchParamName == null ? null : this.searchParamName.getValue();
420        }
421
422        /**
423         * @param value The filter label (=key) as defined in the `SubscriptionTopic.canfilterBy.searchParamName`  element.
424         */
425        public SubscriptionFilterByComponent setSearchParamName(String value) { 
426            if (this.searchParamName == null)
427              this.searchParamName = new StringType();
428            this.searchParamName.setValue(value);
429          return this;
430        }
431
432        /**
433         * @return {@link #searchModifier} (The operator to apply to the filter value when determining matches (Search modifiers).). This is the underlying object with id, value and extensions. The accessor "getSearchModifier" gives direct access to the value
434         */
435        public Enumeration<SubscriptionSearchModifier> getSearchModifierElement() { 
436          if (this.searchModifier == null)
437            if (Configuration.errorOnAutoCreate())
438              throw new Error("Attempt to auto-create SubscriptionFilterByComponent.searchModifier");
439            else if (Configuration.doAutoCreate())
440              this.searchModifier = new Enumeration<SubscriptionSearchModifier>(new SubscriptionSearchModifierEnumFactory()); // bb
441          return this.searchModifier;
442        }
443
444        public boolean hasSearchModifierElement() { 
445          return this.searchModifier != null && !this.searchModifier.isEmpty();
446        }
447
448        public boolean hasSearchModifier() { 
449          return this.searchModifier != null && !this.searchModifier.isEmpty();
450        }
451
452        /**
453         * @param value {@link #searchModifier} (The operator to apply to the filter value when determining matches (Search modifiers).). This is the underlying object with id, value and extensions. The accessor "getSearchModifier" gives direct access to the value
454         */
455        public SubscriptionFilterByComponent setSearchModifierElement(Enumeration<SubscriptionSearchModifier> value) { 
456          this.searchModifier = value;
457          return this;
458        }
459
460        /**
461         * @return The operator to apply to the filter value when determining matches (Search modifiers).
462         */
463        public SubscriptionSearchModifier getSearchModifier() { 
464          return this.searchModifier == null ? null : this.searchModifier.getValue();
465        }
466
467        /**
468         * @param value The operator to apply to the filter value when determining matches (Search modifiers).
469         */
470        public SubscriptionFilterByComponent setSearchModifier(SubscriptionSearchModifier value) { 
471          if (value == null)
472            this.searchModifier = null;
473          else {
474            if (this.searchModifier == null)
475              this.searchModifier = new Enumeration<SubscriptionSearchModifier>(new SubscriptionSearchModifierEnumFactory());
476            this.searchModifier.setValue(value);
477          }
478          return this;
479        }
480
481        /**
482         * @return {@link #value} (The literal value or resource path as is legal in search - for example, "Patient/123" or "le1950".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
483         */
484        public StringType getValueElement() { 
485          if (this.value == null)
486            if (Configuration.errorOnAutoCreate())
487              throw new Error("Attempt to auto-create SubscriptionFilterByComponent.value");
488            else if (Configuration.doAutoCreate())
489              this.value = new StringType(); // bb
490          return this.value;
491        }
492
493        public boolean hasValueElement() { 
494          return this.value != null && !this.value.isEmpty();
495        }
496
497        public boolean hasValue() { 
498          return this.value != null && !this.value.isEmpty();
499        }
500
501        /**
502         * @param value {@link #value} (The literal value or resource path as is legal in search - for example, "Patient/123" or "le1950".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value
503         */
504        public SubscriptionFilterByComponent setValueElement(StringType value) { 
505          this.value = value;
506          return this;
507        }
508
509        /**
510         * @return The literal value or resource path as is legal in search - for example, "Patient/123" or "le1950".
511         */
512        public String getValue() { 
513          return this.value == null ? null : this.value.getValue();
514        }
515
516        /**
517         * @param value The literal value or resource path as is legal in search - for example, "Patient/123" or "le1950".
518         */
519        public SubscriptionFilterByComponent setValue(String value) { 
520            if (this.value == null)
521              this.value = new StringType();
522            this.value.setValue(value);
523          return this;
524        }
525
526        protected void listChildren(List<Property> children) {
527          super.listChildren(children);
528          children.add(new Property("resourceType", "uri", "If the element is a reference to another resource, this element contains \"Reference\", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient).", 0, 1, resourceType));
529          children.add(new Property("searchParamName", "string", "The filter label (=key) as defined in the `SubscriptionTopic.canfilterBy.searchParamName`  element.", 0, 1, searchParamName));
530          children.add(new Property("searchModifier", "code", "The operator to apply to the filter value when determining matches (Search modifiers).", 0, 1, searchModifier));
531          children.add(new Property("value", "string", "The literal value or resource path as is legal in search - for example, \"Patient/123\" or \"le1950\".", 0, 1, value));
532        }
533
534        @Override
535        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
536          switch (_hash) {
537          case -384364440: /*resourceType*/  return new Property("resourceType", "uri", "If the element is a reference to another resource, this element contains \"Reference\", and the targetProfile element defines what resources can be referenced. The targetProfile may be a reference to the general definition of a resource (e.g. http://hl7.org/fhir/StructureDefinition/Patient).", 0, 1, resourceType);
538          case 83857392: /*searchParamName*/  return new Property("searchParamName", "string", "The filter label (=key) as defined in the `SubscriptionTopic.canfilterBy.searchParamName`  element.", 0, 1, searchParamName);
539          case 1540924575: /*searchModifier*/  return new Property("searchModifier", "code", "The operator to apply to the filter value when determining matches (Search modifiers).", 0, 1, searchModifier);
540          case 111972721: /*value*/  return new Property("value", "string", "The literal value or resource path as is legal in search - for example, \"Patient/123\" or \"le1950\".", 0, 1, value);
541          default: return super.getNamedProperty(_hash, _name, _checkValid);
542          }
543
544        }
545
546      @Override
547      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
548        switch (hash) {
549        case -384364440: /*resourceType*/ return this.resourceType == null ? new Base[0] : new Base[] {this.resourceType}; // UriType
550        case 83857392: /*searchParamName*/ return this.searchParamName == null ? new Base[0] : new Base[] {this.searchParamName}; // StringType
551        case 1540924575: /*searchModifier*/ return this.searchModifier == null ? new Base[0] : new Base[] {this.searchModifier}; // Enumeration<SubscriptionSearchModifier>
552        case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
553        default: return super.getProperty(hash, name, checkValid);
554        }
555
556      }
557
558      @Override
559      public Base setProperty(int hash, String name, Base value) throws FHIRException {
560        switch (hash) {
561        case -384364440: // resourceType
562          this.resourceType = TypeConvertor.castToUri(value); // UriType
563          return value;
564        case 83857392: // searchParamName
565          this.searchParamName = TypeConvertor.castToString(value); // StringType
566          return value;
567        case 1540924575: // searchModifier
568          value = new SubscriptionSearchModifierEnumFactory().fromType(TypeConvertor.castToCode(value));
569          this.searchModifier = (Enumeration) value; // Enumeration<SubscriptionSearchModifier>
570          return value;
571        case 111972721: // value
572          this.value = TypeConvertor.castToString(value); // StringType
573          return value;
574        default: return super.setProperty(hash, name, value);
575        }
576
577      }
578
579      @Override
580      public Base setProperty(String name, Base value) throws FHIRException {
581        if (name.equals("resourceType")) {
582          this.resourceType = TypeConvertor.castToUri(value); // UriType
583        } else if (name.equals("searchParamName")) {
584          this.searchParamName = TypeConvertor.castToString(value); // StringType
585        } else if (name.equals("searchModifier")) {
586          value = new SubscriptionSearchModifierEnumFactory().fromType(TypeConvertor.castToCode(value));
587          this.searchModifier = (Enumeration) value; // Enumeration<SubscriptionSearchModifier>
588        } else if (name.equals("value")) {
589          this.value = TypeConvertor.castToString(value); // StringType
590        } else
591          return super.setProperty(name, value);
592        return value;
593      }
594
595      @Override
596      public Base makeProperty(int hash, String name) throws FHIRException {
597        switch (hash) {
598        case -384364440:  return getResourceTypeElement();
599        case 83857392:  return getSearchParamNameElement();
600        case 1540924575:  return getSearchModifierElement();
601        case 111972721:  return getValueElement();
602        default: return super.makeProperty(hash, name);
603        }
604
605      }
606
607      @Override
608      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
609        switch (hash) {
610        case -384364440: /*resourceType*/ return new String[] {"uri"};
611        case 83857392: /*searchParamName*/ return new String[] {"string"};
612        case 1540924575: /*searchModifier*/ return new String[] {"code"};
613        case 111972721: /*value*/ return new String[] {"string"};
614        default: return super.getTypesForProperty(hash, name);
615        }
616
617      }
618
619      @Override
620      public Base addChild(String name) throws FHIRException {
621        if (name.equals("resourceType")) {
622          throw new FHIRException("Cannot call addChild on a primitive type Subscription.filterBy.resourceType");
623        }
624        else if (name.equals("searchParamName")) {
625          throw new FHIRException("Cannot call addChild on a primitive type Subscription.filterBy.searchParamName");
626        }
627        else if (name.equals("searchModifier")) {
628          throw new FHIRException("Cannot call addChild on a primitive type Subscription.filterBy.searchModifier");
629        }
630        else if (name.equals("value")) {
631          throw new FHIRException("Cannot call addChild on a primitive type Subscription.filterBy.value");
632        }
633        else
634          return super.addChild(name);
635      }
636
637      public SubscriptionFilterByComponent copy() {
638        SubscriptionFilterByComponent dst = new SubscriptionFilterByComponent();
639        copyValues(dst);
640        return dst;
641      }
642
643      public void copyValues(SubscriptionFilterByComponent dst) {
644        super.copyValues(dst);
645        dst.resourceType = resourceType == null ? null : resourceType.copy();
646        dst.searchParamName = searchParamName == null ? null : searchParamName.copy();
647        dst.searchModifier = searchModifier == null ? null : searchModifier.copy();
648        dst.value = value == null ? null : value.copy();
649      }
650
651      @Override
652      public boolean equalsDeep(Base other_) {
653        if (!super.equalsDeep(other_))
654          return false;
655        if (!(other_ instanceof SubscriptionFilterByComponent))
656          return false;
657        SubscriptionFilterByComponent o = (SubscriptionFilterByComponent) other_;
658        return compareDeep(resourceType, o.resourceType, true) && compareDeep(searchParamName, o.searchParamName, true)
659           && compareDeep(searchModifier, o.searchModifier, true) && compareDeep(value, o.value, true);
660      }
661
662      @Override
663      public boolean equalsShallow(Base other_) {
664        if (!super.equalsShallow(other_))
665          return false;
666        if (!(other_ instanceof SubscriptionFilterByComponent))
667          return false;
668        SubscriptionFilterByComponent o = (SubscriptionFilterByComponent) other_;
669        return compareValues(resourceType, o.resourceType, true) && compareValues(searchParamName, o.searchParamName, true)
670           && compareValues(searchModifier, o.searchModifier, true) && compareValues(value, o.value, true);
671      }
672
673      public boolean isEmpty() {
674        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resourceType, searchParamName
675          , searchModifier, value);
676      }
677
678  public String fhirType() {
679    return "Subscription.filterBy";
680
681  }
682
683  }
684
685    /**
686     * A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.
687     */
688    @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
689    @Description(shortDefinition="Additional identifiers (business identifier)", formalDefinition="A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance." )
690    protected List<Identifier> identifier;
691
692    /**
693     * A natural language name identifying the subscription.
694     */
695    @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true)
696    @Description(shortDefinition="Human readable name for this subscription", formalDefinition="A natural language name identifying the subscription." )
697    protected StringType name;
698
699    /**
700     * The status of the subscription, which marks the server state for managing the subscription.
701     */
702    @Child(name = "status", type = {CodeType.class}, order=2, min=1, max=1, modifier=true, summary=true)
703    @Description(shortDefinition="requested | active | error | off | entered-in-error", formalDefinition="The status of the subscription, which marks the server state for managing the subscription." )
704    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subscription-state")
705    protected Enumeration<SubscriptionState> status;
706
707    /**
708     * The reference to the subscription topic to be notified about.
709     */
710    @Child(name = "topic", type = {CanonicalType.class}, order=3, min=1, max=1, modifier=false, summary=true)
711    @Description(shortDefinition="Reference to the subscription topic being subscribed to", formalDefinition="The reference to the subscription topic to be notified about." )
712    protected CanonicalType topic;
713
714    /**
715     * Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.
716     */
717    @Child(name = "contact", type = {ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
718    @Description(shortDefinition="Contact details for source (e.g. troubleshooting)", formalDefinition="Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting." )
719    protected List<ContactPoint> contact;
720
721    /**
722     * The time for the server to turn the subscription off.
723     */
724    @Child(name = "end", type = {InstantType.class}, order=5, min=0, max=1, modifier=false, summary=true)
725    @Description(shortDefinition="When to automatically delete the subscription", formalDefinition="The time for the server to turn the subscription off." )
726    protected InstantType end;
727
728    /**
729     * A description of why this subscription is defined.
730     */
731    @Child(name = "reason", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true)
732    @Description(shortDefinition="Description of why this subscription was created", formalDefinition="A description of why this subscription is defined." )
733    protected StringType reason;
734
735    /**
736     * The filter properties to be applied to narrow the subscription topic stream.  When multiple filters are applied, evaluates to true if all the conditions are met; otherwise it returns false.   (i.e., logical AND).
737     */
738    @Child(name = "filterBy", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
739    @Description(shortDefinition="Criteria for narrowing the subscription topic stream", formalDefinition="The filter properties to be applied to narrow the subscription topic stream.  When multiple filters are applied, evaluates to true if all the conditions are met; otherwise it returns false.   (i.e., logical AND)." )
740    protected List<SubscriptionFilterByComponent> filterBy;
741
742    /**
743     * The type of channel to send notifications on.
744     */
745    @Child(name = "channelType", type = {Coding.class}, order=8, min=1, max=1, modifier=false, summary=true)
746    @Description(shortDefinition="Channel type for notifications", formalDefinition="The type of channel to send notifications on." )
747    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subscription-channel-type")
748    protected Coding channelType;
749
750    /**
751     * The url that describes the actual end-point to send messages to.
752     */
753    @Child(name = "endpoint", type = {UrlType.class}, order=9, min=0, max=1, modifier=false, summary=true)
754    @Description(shortDefinition="Where the channel points to", formalDefinition="The url that describes the actual end-point to send messages to." )
755    protected UrlType endpoint;
756
757    /**
758     * Additional headers / information to send as part of the notification.
759     */
760    @Child(name = "header", type = {StringType.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
761    @Description(shortDefinition="Usage depends on the channel type", formalDefinition="Additional headers / information to send as part of the notification." )
762    protected List<StringType> header;
763
764    /**
765     * If present,  a 'hearbeat" notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds.    If not present, a heartbeat notification is not sent.
766     */
767    @Child(name = "heartbeatPeriod", type = {UnsignedIntType.class}, order=11, min=0, max=1, modifier=false, summary=true)
768    @Description(shortDefinition="Interval in seconds to send 'heartbeat' notification", formalDefinition="If present,  a 'hearbeat\" notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds.    If not present, a heartbeat notification is not sent." )
769    protected UnsignedIntType heartbeatPeriod;
770
771    /**
772     * If present, the maximum amount of time a server will allow before failing a notification attempt.
773     */
774    @Child(name = "timeout", type = {UnsignedIntType.class}, order=12, min=0, max=1, modifier=false, summary=true)
775    @Description(shortDefinition="Timeout in seconds to attempt notification delivery", formalDefinition="If present, the maximum amount of time a server will allow before failing a notification attempt." )
776    protected UnsignedIntType timeout;
777
778    /**
779     * The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The MIME types "text/plain" and "text/html" may also be used for Email subscriptions.
780     */
781    @Child(name = "contentType", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=true)
782    @Description(shortDefinition="MIME type to send, or omit for no payload", formalDefinition="The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The MIME types \"text/plain\" and \"text/html\" may also be used for Email subscriptions." )
783    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes")
784    protected CodeType contentType;
785
786    /**
787     * How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.
788     */
789    @Child(name = "content", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=true)
790    @Description(shortDefinition="empty | id-only | full-resource", formalDefinition="How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content." )
791    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subscription-payload-content")
792    protected Enumeration<SubscriptionPayloadContent> content;
793
794    /**
795     * If present, where to place URLs of resources in notifications.
796     */
797    @Child(name = "notificationUrlLocation", type = {CodeType.class}, order=15, min=0, max=1, modifier=false, summary=true)
798    @Description(shortDefinition="none | full-url | request-response | all", formalDefinition="If present, where to place URLs of resources in notifications." )
799    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/subscription-url-location")
800    protected Enumeration<SubscriptionUrlLocation> notificationUrlLocation;
801
802    /**
803     * If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification).  Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.
804     */
805    @Child(name = "maxCount", type = {PositiveIntType.class}, order=16, min=0, max=1, modifier=false, summary=true)
806    @Description(shortDefinition="Maximum number of triggering resources included in notification bundles", formalDefinition="If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification).  Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included." )
807    protected PositiveIntType maxCount;
808
809    private static final long serialVersionUID = -1188922658L;
810
811  /**
812   * Constructor
813   */
814    public Subscription() {
815      super();
816    }
817
818  /**
819   * Constructor
820   */
821    public Subscription(SubscriptionState status, String topic, Coding channelType) {
822      super();
823      this.setStatus(status);
824      this.setTopic(topic);
825      this.setChannelType(channelType);
826    }
827
828    /**
829     * @return {@link #identifier} (A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.)
830     */
831    public List<Identifier> getIdentifier() { 
832      if (this.identifier == null)
833        this.identifier = new ArrayList<Identifier>();
834      return this.identifier;
835    }
836
837    /**
838     * @return Returns a reference to <code>this</code> for easy method chaining
839     */
840    public Subscription setIdentifier(List<Identifier> theIdentifier) { 
841      this.identifier = theIdentifier;
842      return this;
843    }
844
845    public boolean hasIdentifier() { 
846      if (this.identifier == null)
847        return false;
848      for (Identifier item : this.identifier)
849        if (!item.isEmpty())
850          return true;
851      return false;
852    }
853
854    public Identifier addIdentifier() { //3
855      Identifier t = new Identifier();
856      if (this.identifier == null)
857        this.identifier = new ArrayList<Identifier>();
858      this.identifier.add(t);
859      return t;
860    }
861
862    public Subscription addIdentifier(Identifier t) { //3
863      if (t == null)
864        return this;
865      if (this.identifier == null)
866        this.identifier = new ArrayList<Identifier>();
867      this.identifier.add(t);
868      return this;
869    }
870
871    /**
872     * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3}
873     */
874    public Identifier getIdentifierFirstRep() { 
875      if (getIdentifier().isEmpty()) {
876        addIdentifier();
877      }
878      return getIdentifier().get(0);
879    }
880
881    /**
882     * @return {@link #name} (A natural language name identifying the subscription.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
883     */
884    public StringType getNameElement() { 
885      if (this.name == null)
886        if (Configuration.errorOnAutoCreate())
887          throw new Error("Attempt to auto-create Subscription.name");
888        else if (Configuration.doAutoCreate())
889          this.name = new StringType(); // bb
890      return this.name;
891    }
892
893    public boolean hasNameElement() { 
894      return this.name != null && !this.name.isEmpty();
895    }
896
897    public boolean hasName() { 
898      return this.name != null && !this.name.isEmpty();
899    }
900
901    /**
902     * @param value {@link #name} (A natural language name identifying the subscription.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
903     */
904    public Subscription setNameElement(StringType value) { 
905      this.name = value;
906      return this;
907    }
908
909    /**
910     * @return A natural language name identifying the subscription.
911     */
912    public String getName() { 
913      return this.name == null ? null : this.name.getValue();
914    }
915
916    /**
917     * @param value A natural language name identifying the subscription.
918     */
919    public Subscription setName(String value) { 
920      if (Utilities.noString(value))
921        this.name = null;
922      else {
923        if (this.name == null)
924          this.name = new StringType();
925        this.name.setValue(value);
926      }
927      return this;
928    }
929
930    /**
931     * @return {@link #status} (The status of the subscription, which marks the server state for managing the subscription.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
932     */
933    public Enumeration<SubscriptionState> getStatusElement() { 
934      if (this.status == null)
935        if (Configuration.errorOnAutoCreate())
936          throw new Error("Attempt to auto-create Subscription.status");
937        else if (Configuration.doAutoCreate())
938          this.status = new Enumeration<SubscriptionState>(new SubscriptionStateEnumFactory()); // bb
939      return this.status;
940    }
941
942    public boolean hasStatusElement() { 
943      return this.status != null && !this.status.isEmpty();
944    }
945
946    public boolean hasStatus() { 
947      return this.status != null && !this.status.isEmpty();
948    }
949
950    /**
951     * @param value {@link #status} (The status of the subscription, which marks the server state for managing the subscription.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
952     */
953    public Subscription setStatusElement(Enumeration<SubscriptionState> value) { 
954      this.status = value;
955      return this;
956    }
957
958    /**
959     * @return The status of the subscription, which marks the server state for managing the subscription.
960     */
961    public SubscriptionState getStatus() { 
962      return this.status == null ? null : this.status.getValue();
963    }
964
965    /**
966     * @param value The status of the subscription, which marks the server state for managing the subscription.
967     */
968    public Subscription setStatus(SubscriptionState value) { 
969        if (this.status == null)
970          this.status = new Enumeration<SubscriptionState>(new SubscriptionStateEnumFactory());
971        this.status.setValue(value);
972      return this;
973    }
974
975    /**
976     * @return {@link #topic} (The reference to the subscription topic to be notified about.). This is the underlying object with id, value and extensions. The accessor "getTopic" gives direct access to the value
977     */
978    public CanonicalType getTopicElement() { 
979      if (this.topic == null)
980        if (Configuration.errorOnAutoCreate())
981          throw new Error("Attempt to auto-create Subscription.topic");
982        else if (Configuration.doAutoCreate())
983          this.topic = new CanonicalType(); // bb
984      return this.topic;
985    }
986
987    public boolean hasTopicElement() { 
988      return this.topic != null && !this.topic.isEmpty();
989    }
990
991    public boolean hasTopic() { 
992      return this.topic != null && !this.topic.isEmpty();
993    }
994
995    /**
996     * @param value {@link #topic} (The reference to the subscription topic to be notified about.). This is the underlying object with id, value and extensions. The accessor "getTopic" gives direct access to the value
997     */
998    public Subscription setTopicElement(CanonicalType value) { 
999      this.topic = value;
1000      return this;
1001    }
1002
1003    /**
1004     * @return The reference to the subscription topic to be notified about.
1005     */
1006    public String getTopic() { 
1007      return this.topic == null ? null : this.topic.getValue();
1008    }
1009
1010    /**
1011     * @param value The reference to the subscription topic to be notified about.
1012     */
1013    public Subscription setTopic(String value) { 
1014        if (this.topic == null)
1015          this.topic = new CanonicalType();
1016        this.topic.setValue(value);
1017      return this;
1018    }
1019
1020    /**
1021     * @return {@link #contact} (Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.)
1022     */
1023    public List<ContactPoint> getContact() { 
1024      if (this.contact == null)
1025        this.contact = new ArrayList<ContactPoint>();
1026      return this.contact;
1027    }
1028
1029    /**
1030     * @return Returns a reference to <code>this</code> for easy method chaining
1031     */
1032    public Subscription setContact(List<ContactPoint> theContact) { 
1033      this.contact = theContact;
1034      return this;
1035    }
1036
1037    public boolean hasContact() { 
1038      if (this.contact == null)
1039        return false;
1040      for (ContactPoint item : this.contact)
1041        if (!item.isEmpty())
1042          return true;
1043      return false;
1044    }
1045
1046    public ContactPoint addContact() { //3
1047      ContactPoint t = new ContactPoint();
1048      if (this.contact == null)
1049        this.contact = new ArrayList<ContactPoint>();
1050      this.contact.add(t);
1051      return t;
1052    }
1053
1054    public Subscription addContact(ContactPoint t) { //3
1055      if (t == null)
1056        return this;
1057      if (this.contact == null)
1058        this.contact = new ArrayList<ContactPoint>();
1059      this.contact.add(t);
1060      return this;
1061    }
1062
1063    /**
1064     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3}
1065     */
1066    public ContactPoint getContactFirstRep() { 
1067      if (getContact().isEmpty()) {
1068        addContact();
1069      }
1070      return getContact().get(0);
1071    }
1072
1073    /**
1074     * @return {@link #end} (The time for the server to turn the subscription off.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
1075     */
1076    public InstantType getEndElement() { 
1077      if (this.end == null)
1078        if (Configuration.errorOnAutoCreate())
1079          throw new Error("Attempt to auto-create Subscription.end");
1080        else if (Configuration.doAutoCreate())
1081          this.end = new InstantType(); // bb
1082      return this.end;
1083    }
1084
1085    public boolean hasEndElement() { 
1086      return this.end != null && !this.end.isEmpty();
1087    }
1088
1089    public boolean hasEnd() { 
1090      return this.end != null && !this.end.isEmpty();
1091    }
1092
1093    /**
1094     * @param value {@link #end} (The time for the server to turn the subscription off.). This is the underlying object with id, value and extensions. The accessor "getEnd" gives direct access to the value
1095     */
1096    public Subscription setEndElement(InstantType value) { 
1097      this.end = value;
1098      return this;
1099    }
1100
1101    /**
1102     * @return The time for the server to turn the subscription off.
1103     */
1104    public Date getEnd() { 
1105      return this.end == null ? null : this.end.getValue();
1106    }
1107
1108    /**
1109     * @param value The time for the server to turn the subscription off.
1110     */
1111    public Subscription setEnd(Date value) { 
1112      if (value == null)
1113        this.end = null;
1114      else {
1115        if (this.end == null)
1116          this.end = new InstantType();
1117        this.end.setValue(value);
1118      }
1119      return this;
1120    }
1121
1122    /**
1123     * @return {@link #reason} (A description of why this subscription is defined.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value
1124     */
1125    public StringType getReasonElement() { 
1126      if (this.reason == null)
1127        if (Configuration.errorOnAutoCreate())
1128          throw new Error("Attempt to auto-create Subscription.reason");
1129        else if (Configuration.doAutoCreate())
1130          this.reason = new StringType(); // bb
1131      return this.reason;
1132    }
1133
1134    public boolean hasReasonElement() { 
1135      return this.reason != null && !this.reason.isEmpty();
1136    }
1137
1138    public boolean hasReason() { 
1139      return this.reason != null && !this.reason.isEmpty();
1140    }
1141
1142    /**
1143     * @param value {@link #reason} (A description of why this subscription is defined.). This is the underlying object with id, value and extensions. The accessor "getReason" gives direct access to the value
1144     */
1145    public Subscription setReasonElement(StringType value) { 
1146      this.reason = value;
1147      return this;
1148    }
1149
1150    /**
1151     * @return A description of why this subscription is defined.
1152     */
1153    public String getReason() { 
1154      return this.reason == null ? null : this.reason.getValue();
1155    }
1156
1157    /**
1158     * @param value A description of why this subscription is defined.
1159     */
1160    public Subscription setReason(String value) { 
1161      if (Utilities.noString(value))
1162        this.reason = null;
1163      else {
1164        if (this.reason == null)
1165          this.reason = new StringType();
1166        this.reason.setValue(value);
1167      }
1168      return this;
1169    }
1170
1171    /**
1172     * @return {@link #filterBy} (The filter properties to be applied to narrow the subscription topic stream.  When multiple filters are applied, evaluates to true if all the conditions are met; otherwise it returns false.   (i.e., logical AND).)
1173     */
1174    public List<SubscriptionFilterByComponent> getFilterBy() { 
1175      if (this.filterBy == null)
1176        this.filterBy = new ArrayList<SubscriptionFilterByComponent>();
1177      return this.filterBy;
1178    }
1179
1180    /**
1181     * @return Returns a reference to <code>this</code> for easy method chaining
1182     */
1183    public Subscription setFilterBy(List<SubscriptionFilterByComponent> theFilterBy) { 
1184      this.filterBy = theFilterBy;
1185      return this;
1186    }
1187
1188    public boolean hasFilterBy() { 
1189      if (this.filterBy == null)
1190        return false;
1191      for (SubscriptionFilterByComponent item : this.filterBy)
1192        if (!item.isEmpty())
1193          return true;
1194      return false;
1195    }
1196
1197    public SubscriptionFilterByComponent addFilterBy() { //3
1198      SubscriptionFilterByComponent t = new SubscriptionFilterByComponent();
1199      if (this.filterBy == null)
1200        this.filterBy = new ArrayList<SubscriptionFilterByComponent>();
1201      this.filterBy.add(t);
1202      return t;
1203    }
1204
1205    public Subscription addFilterBy(SubscriptionFilterByComponent t) { //3
1206      if (t == null)
1207        return this;
1208      if (this.filterBy == null)
1209        this.filterBy = new ArrayList<SubscriptionFilterByComponent>();
1210      this.filterBy.add(t);
1211      return this;
1212    }
1213
1214    /**
1215     * @return The first repetition of repeating field {@link #filterBy}, creating it if it does not already exist {3}
1216     */
1217    public SubscriptionFilterByComponent getFilterByFirstRep() { 
1218      if (getFilterBy().isEmpty()) {
1219        addFilterBy();
1220      }
1221      return getFilterBy().get(0);
1222    }
1223
1224    /**
1225     * @return {@link #channelType} (The type of channel to send notifications on.)
1226     */
1227    public Coding getChannelType() { 
1228      if (this.channelType == null)
1229        if (Configuration.errorOnAutoCreate())
1230          throw new Error("Attempt to auto-create Subscription.channelType");
1231        else if (Configuration.doAutoCreate())
1232          this.channelType = new Coding(); // cc
1233      return this.channelType;
1234    }
1235
1236    public boolean hasChannelType() { 
1237      return this.channelType != null && !this.channelType.isEmpty();
1238    }
1239
1240    /**
1241     * @param value {@link #channelType} (The type of channel to send notifications on.)
1242     */
1243    public Subscription setChannelType(Coding value) { 
1244      this.channelType = value;
1245      return this;
1246    }
1247
1248    /**
1249     * @return {@link #endpoint} (The url that describes the actual end-point to send messages to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value
1250     */
1251    public UrlType getEndpointElement() { 
1252      if (this.endpoint == null)
1253        if (Configuration.errorOnAutoCreate())
1254          throw new Error("Attempt to auto-create Subscription.endpoint");
1255        else if (Configuration.doAutoCreate())
1256          this.endpoint = new UrlType(); // bb
1257      return this.endpoint;
1258    }
1259
1260    public boolean hasEndpointElement() { 
1261      return this.endpoint != null && !this.endpoint.isEmpty();
1262    }
1263
1264    public boolean hasEndpoint() { 
1265      return this.endpoint != null && !this.endpoint.isEmpty();
1266    }
1267
1268    /**
1269     * @param value {@link #endpoint} (The url that describes the actual end-point to send messages to.). This is the underlying object with id, value and extensions. The accessor "getEndpoint" gives direct access to the value
1270     */
1271    public Subscription setEndpointElement(UrlType value) { 
1272      this.endpoint = value;
1273      return this;
1274    }
1275
1276    /**
1277     * @return The url that describes the actual end-point to send messages to.
1278     */
1279    public String getEndpoint() { 
1280      return this.endpoint == null ? null : this.endpoint.getValue();
1281    }
1282
1283    /**
1284     * @param value The url that describes the actual end-point to send messages to.
1285     */
1286    public Subscription setEndpoint(String value) { 
1287      if (Utilities.noString(value))
1288        this.endpoint = null;
1289      else {
1290        if (this.endpoint == null)
1291          this.endpoint = new UrlType();
1292        this.endpoint.setValue(value);
1293      }
1294      return this;
1295    }
1296
1297    /**
1298     * @return {@link #header} (Additional headers / information to send as part of the notification.)
1299     */
1300    public List<StringType> getHeader() { 
1301      if (this.header == null)
1302        this.header = new ArrayList<StringType>();
1303      return this.header;
1304    }
1305
1306    /**
1307     * @return Returns a reference to <code>this</code> for easy method chaining
1308     */
1309    public Subscription setHeader(List<StringType> theHeader) { 
1310      this.header = theHeader;
1311      return this;
1312    }
1313
1314    public boolean hasHeader() { 
1315      if (this.header == null)
1316        return false;
1317      for (StringType item : this.header)
1318        if (!item.isEmpty())
1319          return true;
1320      return false;
1321    }
1322
1323    /**
1324     * @return {@link #header} (Additional headers / information to send as part of the notification.)
1325     */
1326    public StringType addHeaderElement() {//2 
1327      StringType t = new StringType();
1328      if (this.header == null)
1329        this.header = new ArrayList<StringType>();
1330      this.header.add(t);
1331      return t;
1332    }
1333
1334    /**
1335     * @param value {@link #header} (Additional headers / information to send as part of the notification.)
1336     */
1337    public Subscription addHeader(String value) { //1
1338      StringType t = new StringType();
1339      t.setValue(value);
1340      if (this.header == null)
1341        this.header = new ArrayList<StringType>();
1342      this.header.add(t);
1343      return this;
1344    }
1345
1346    /**
1347     * @param value {@link #header} (Additional headers / information to send as part of the notification.)
1348     */
1349    public boolean hasHeader(String value) { 
1350      if (this.header == null)
1351        return false;
1352      for (StringType v : this.header)
1353        if (v.getValue().equals(value)) // string
1354          return true;
1355      return false;
1356    }
1357
1358    /**
1359     * @return {@link #heartbeatPeriod} (If present,  a 'hearbeat" notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds.    If not present, a heartbeat notification is not sent.). This is the underlying object with id, value and extensions. The accessor "getHeartbeatPeriod" gives direct access to the value
1360     */
1361    public UnsignedIntType getHeartbeatPeriodElement() { 
1362      if (this.heartbeatPeriod == null)
1363        if (Configuration.errorOnAutoCreate())
1364          throw new Error("Attempt to auto-create Subscription.heartbeatPeriod");
1365        else if (Configuration.doAutoCreate())
1366          this.heartbeatPeriod = new UnsignedIntType(); // bb
1367      return this.heartbeatPeriod;
1368    }
1369
1370    public boolean hasHeartbeatPeriodElement() { 
1371      return this.heartbeatPeriod != null && !this.heartbeatPeriod.isEmpty();
1372    }
1373
1374    public boolean hasHeartbeatPeriod() { 
1375      return this.heartbeatPeriod != null && !this.heartbeatPeriod.isEmpty();
1376    }
1377
1378    /**
1379     * @param value {@link #heartbeatPeriod} (If present,  a 'hearbeat" notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds.    If not present, a heartbeat notification is not sent.). This is the underlying object with id, value and extensions. The accessor "getHeartbeatPeriod" gives direct access to the value
1380     */
1381    public Subscription setHeartbeatPeriodElement(UnsignedIntType value) { 
1382      this.heartbeatPeriod = value;
1383      return this;
1384    }
1385
1386    /**
1387     * @return If present,  a 'hearbeat" notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds.    If not present, a heartbeat notification is not sent.
1388     */
1389    public int getHeartbeatPeriod() { 
1390      return this.heartbeatPeriod == null || this.heartbeatPeriod.isEmpty() ? 0 : this.heartbeatPeriod.getValue();
1391    }
1392
1393    /**
1394     * @param value If present,  a 'hearbeat" notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds.    If not present, a heartbeat notification is not sent.
1395     */
1396    public Subscription setHeartbeatPeriod(int value) { 
1397        if (this.heartbeatPeriod == null)
1398          this.heartbeatPeriod = new UnsignedIntType();
1399        this.heartbeatPeriod.setValue(value);
1400      return this;
1401    }
1402
1403    /**
1404     * @return {@link #timeout} (If present, the maximum amount of time a server will allow before failing a notification attempt.). This is the underlying object with id, value and extensions. The accessor "getTimeout" gives direct access to the value
1405     */
1406    public UnsignedIntType getTimeoutElement() { 
1407      if (this.timeout == null)
1408        if (Configuration.errorOnAutoCreate())
1409          throw new Error("Attempt to auto-create Subscription.timeout");
1410        else if (Configuration.doAutoCreate())
1411          this.timeout = new UnsignedIntType(); // bb
1412      return this.timeout;
1413    }
1414
1415    public boolean hasTimeoutElement() { 
1416      return this.timeout != null && !this.timeout.isEmpty();
1417    }
1418
1419    public boolean hasTimeout() { 
1420      return this.timeout != null && !this.timeout.isEmpty();
1421    }
1422
1423    /**
1424     * @param value {@link #timeout} (If present, the maximum amount of time a server will allow before failing a notification attempt.). This is the underlying object with id, value and extensions. The accessor "getTimeout" gives direct access to the value
1425     */
1426    public Subscription setTimeoutElement(UnsignedIntType value) { 
1427      this.timeout = value;
1428      return this;
1429    }
1430
1431    /**
1432     * @return If present, the maximum amount of time a server will allow before failing a notification attempt.
1433     */
1434    public int getTimeout() { 
1435      return this.timeout == null || this.timeout.isEmpty() ? 0 : this.timeout.getValue();
1436    }
1437
1438    /**
1439     * @param value If present, the maximum amount of time a server will allow before failing a notification attempt.
1440     */
1441    public Subscription setTimeout(int value) { 
1442        if (this.timeout == null)
1443          this.timeout = new UnsignedIntType();
1444        this.timeout.setValue(value);
1445      return this;
1446    }
1447
1448    /**
1449     * @return {@link #contentType} (The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The MIME types "text/plain" and "text/html" may also be used for Email subscriptions.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
1450     */
1451    public CodeType getContentTypeElement() { 
1452      if (this.contentType == null)
1453        if (Configuration.errorOnAutoCreate())
1454          throw new Error("Attempt to auto-create Subscription.contentType");
1455        else if (Configuration.doAutoCreate())
1456          this.contentType = new CodeType(); // bb
1457      return this.contentType;
1458    }
1459
1460    public boolean hasContentTypeElement() { 
1461      return this.contentType != null && !this.contentType.isEmpty();
1462    }
1463
1464    public boolean hasContentType() { 
1465      return this.contentType != null && !this.contentType.isEmpty();
1466    }
1467
1468    /**
1469     * @param value {@link #contentType} (The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The MIME types "text/plain" and "text/html" may also be used for Email subscriptions.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
1470     */
1471    public Subscription setContentTypeElement(CodeType value) { 
1472      this.contentType = value;
1473      return this;
1474    }
1475
1476    /**
1477     * @return The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The MIME types "text/plain" and "text/html" may also be used for Email subscriptions.
1478     */
1479    public String getContentType() { 
1480      return this.contentType == null ? null : this.contentType.getValue();
1481    }
1482
1483    /**
1484     * @param value The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The MIME types "text/plain" and "text/html" may also be used for Email subscriptions.
1485     */
1486    public Subscription setContentType(String value) { 
1487      if (Utilities.noString(value))
1488        this.contentType = null;
1489      else {
1490        if (this.contentType == null)
1491          this.contentType = new CodeType();
1492        this.contentType.setValue(value);
1493      }
1494      return this;
1495    }
1496
1497    /**
1498     * @return {@link #content} (How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.). This is the underlying object with id, value and extensions. The accessor "getContent" gives direct access to the value
1499     */
1500    public Enumeration<SubscriptionPayloadContent> getContentElement() { 
1501      if (this.content == null)
1502        if (Configuration.errorOnAutoCreate())
1503          throw new Error("Attempt to auto-create Subscription.content");
1504        else if (Configuration.doAutoCreate())
1505          this.content = new Enumeration<SubscriptionPayloadContent>(new SubscriptionPayloadContentEnumFactory()); // bb
1506      return this.content;
1507    }
1508
1509    public boolean hasContentElement() { 
1510      return this.content != null && !this.content.isEmpty();
1511    }
1512
1513    public boolean hasContent() { 
1514      return this.content != null && !this.content.isEmpty();
1515    }
1516
1517    /**
1518     * @param value {@link #content} (How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.). This is the underlying object with id, value and extensions. The accessor "getContent" gives direct access to the value
1519     */
1520    public Subscription setContentElement(Enumeration<SubscriptionPayloadContent> value) { 
1521      this.content = value;
1522      return this;
1523    }
1524
1525    /**
1526     * @return How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.
1527     */
1528    public SubscriptionPayloadContent getContent() { 
1529      return this.content == null ? null : this.content.getValue();
1530    }
1531
1532    /**
1533     * @param value How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.
1534     */
1535    public Subscription setContent(SubscriptionPayloadContent value) { 
1536      if (value == null)
1537        this.content = null;
1538      else {
1539        if (this.content == null)
1540          this.content = new Enumeration<SubscriptionPayloadContent>(new SubscriptionPayloadContentEnumFactory());
1541        this.content.setValue(value);
1542      }
1543      return this;
1544    }
1545
1546    /**
1547     * @return {@link #notificationUrlLocation} (If present, where to place URLs of resources in notifications.). This is the underlying object with id, value and extensions. The accessor "getNotificationUrlLocation" gives direct access to the value
1548     */
1549    public Enumeration<SubscriptionUrlLocation> getNotificationUrlLocationElement() { 
1550      if (this.notificationUrlLocation == null)
1551        if (Configuration.errorOnAutoCreate())
1552          throw new Error("Attempt to auto-create Subscription.notificationUrlLocation");
1553        else if (Configuration.doAutoCreate())
1554          this.notificationUrlLocation = new Enumeration<SubscriptionUrlLocation>(new SubscriptionUrlLocationEnumFactory()); // bb
1555      return this.notificationUrlLocation;
1556    }
1557
1558    public boolean hasNotificationUrlLocationElement() { 
1559      return this.notificationUrlLocation != null && !this.notificationUrlLocation.isEmpty();
1560    }
1561
1562    public boolean hasNotificationUrlLocation() { 
1563      return this.notificationUrlLocation != null && !this.notificationUrlLocation.isEmpty();
1564    }
1565
1566    /**
1567     * @param value {@link #notificationUrlLocation} (If present, where to place URLs of resources in notifications.). This is the underlying object with id, value and extensions. The accessor "getNotificationUrlLocation" gives direct access to the value
1568     */
1569    public Subscription setNotificationUrlLocationElement(Enumeration<SubscriptionUrlLocation> value) { 
1570      this.notificationUrlLocation = value;
1571      return this;
1572    }
1573
1574    /**
1575     * @return If present, where to place URLs of resources in notifications.
1576     */
1577    public SubscriptionUrlLocation getNotificationUrlLocation() { 
1578      return this.notificationUrlLocation == null ? null : this.notificationUrlLocation.getValue();
1579    }
1580
1581    /**
1582     * @param value If present, where to place URLs of resources in notifications.
1583     */
1584    public Subscription setNotificationUrlLocation(SubscriptionUrlLocation value) { 
1585      if (value == null)
1586        this.notificationUrlLocation = null;
1587      else {
1588        if (this.notificationUrlLocation == null)
1589          this.notificationUrlLocation = new Enumeration<SubscriptionUrlLocation>(new SubscriptionUrlLocationEnumFactory());
1590        this.notificationUrlLocation.setValue(value);
1591      }
1592      return this;
1593    }
1594
1595    /**
1596     * @return {@link #maxCount} (If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification).  Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.). This is the underlying object with id, value and extensions. The accessor "getMaxCount" gives direct access to the value
1597     */
1598    public PositiveIntType getMaxCountElement() { 
1599      if (this.maxCount == null)
1600        if (Configuration.errorOnAutoCreate())
1601          throw new Error("Attempt to auto-create Subscription.maxCount");
1602        else if (Configuration.doAutoCreate())
1603          this.maxCount = new PositiveIntType(); // bb
1604      return this.maxCount;
1605    }
1606
1607    public boolean hasMaxCountElement() { 
1608      return this.maxCount != null && !this.maxCount.isEmpty();
1609    }
1610
1611    public boolean hasMaxCount() { 
1612      return this.maxCount != null && !this.maxCount.isEmpty();
1613    }
1614
1615    /**
1616     * @param value {@link #maxCount} (If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification).  Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.). This is the underlying object with id, value and extensions. The accessor "getMaxCount" gives direct access to the value
1617     */
1618    public Subscription setMaxCountElement(PositiveIntType value) { 
1619      this.maxCount = value;
1620      return this;
1621    }
1622
1623    /**
1624     * @return If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification).  Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.
1625     */
1626    public int getMaxCount() { 
1627      return this.maxCount == null || this.maxCount.isEmpty() ? 0 : this.maxCount.getValue();
1628    }
1629
1630    /**
1631     * @param value If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification).  Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.
1632     */
1633    public Subscription setMaxCount(int value) { 
1634        if (this.maxCount == null)
1635          this.maxCount = new PositiveIntType();
1636        this.maxCount.setValue(value);
1637      return this;
1638    }
1639
1640      protected void listChildren(List<Property> children) {
1641        super.listChildren(children);
1642        children.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier));
1643        children.add(new Property("name", "string", "A natural language name identifying the subscription.", 0, 1, name));
1644        children.add(new Property("status", "code", "The status of the subscription, which marks the server state for managing the subscription.", 0, 1, status));
1645        children.add(new Property("topic", "canonical(SubscriptionTopic)", "The reference to the subscription topic to be notified about.", 0, 1, topic));
1646        children.add(new Property("contact", "ContactPoint", "Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.", 0, java.lang.Integer.MAX_VALUE, contact));
1647        children.add(new Property("end", "instant", "The time for the server to turn the subscription off.", 0, 1, end));
1648        children.add(new Property("reason", "string", "A description of why this subscription is defined.", 0, 1, reason));
1649        children.add(new Property("filterBy", "", "The filter properties to be applied to narrow the subscription topic stream.  When multiple filters are applied, evaluates to true if all the conditions are met; otherwise it returns false.   (i.e., logical AND).", 0, java.lang.Integer.MAX_VALUE, filterBy));
1650        children.add(new Property("channelType", "Coding", "The type of channel to send notifications on.", 0, 1, channelType));
1651        children.add(new Property("endpoint", "url", "The url that describes the actual end-point to send messages to.", 0, 1, endpoint));
1652        children.add(new Property("header", "string", "Additional headers / information to send as part of the notification.", 0, java.lang.Integer.MAX_VALUE, header));
1653        children.add(new Property("heartbeatPeriod", "unsignedInt", "If present,  a 'hearbeat\" notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds.    If not present, a heartbeat notification is not sent.", 0, 1, heartbeatPeriod));
1654        children.add(new Property("timeout", "unsignedInt", "If present, the maximum amount of time a server will allow before failing a notification attempt.", 0, 1, timeout));
1655        children.add(new Property("contentType", "code", "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The MIME types \"text/plain\" and \"text/html\" may also be used for Email subscriptions.", 0, 1, contentType));
1656        children.add(new Property("content", "code", "How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.", 0, 1, content));
1657        children.add(new Property("notificationUrlLocation", "code", "If present, where to place URLs of resources in notifications.", 0, 1, notificationUrlLocation));
1658        children.add(new Property("maxCount", "positiveInt", "If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification).  Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.", 0, 1, maxCount));
1659      }
1660
1661      @Override
1662      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1663        switch (_hash) {
1664        case -1618432855: /*identifier*/  return new Property("identifier", "Identifier", "A formal identifier that is used to identify this code system when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier);
1665        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the subscription.", 0, 1, name);
1666        case -892481550: /*status*/  return new Property("status", "code", "The status of the subscription, which marks the server state for managing the subscription.", 0, 1, status);
1667        case 110546223: /*topic*/  return new Property("topic", "canonical(SubscriptionTopic)", "The reference to the subscription topic to be notified about.", 0, 1, topic);
1668        case 951526432: /*contact*/  return new Property("contact", "ContactPoint", "Contact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.", 0, java.lang.Integer.MAX_VALUE, contact);
1669        case 100571: /*end*/  return new Property("end", "instant", "The time for the server to turn the subscription off.", 0, 1, end);
1670        case -934964668: /*reason*/  return new Property("reason", "string", "A description of why this subscription is defined.", 0, 1, reason);
1671        case -721168913: /*filterBy*/  return new Property("filterBy", "", "The filter properties to be applied to narrow the subscription topic stream.  When multiple filters are applied, evaluates to true if all the conditions are met; otherwise it returns false.   (i.e., logical AND).", 0, java.lang.Integer.MAX_VALUE, filterBy);
1672        case 274155229: /*channelType*/  return new Property("channelType", "Coding", "The type of channel to send notifications on.", 0, 1, channelType);
1673        case 1741102485: /*endpoint*/  return new Property("endpoint", "url", "The url that describes the actual end-point to send messages to.", 0, 1, endpoint);
1674        case -1221270899: /*header*/  return new Property("header", "string", "Additional headers / information to send as part of the notification.", 0, java.lang.Integer.MAX_VALUE, header);
1675        case -938465827: /*heartbeatPeriod*/  return new Property("heartbeatPeriod", "unsignedInt", "If present,  a 'hearbeat\" notification (keepalive) is sent via this channel with an the interval period equal to this elements integer value in seconds.    If not present, a heartbeat notification is not sent.", 0, 1, heartbeatPeriod);
1676        case -1313911455: /*timeout*/  return new Property("timeout", "unsignedInt", "If present, the maximum amount of time a server will allow before failing a notification attempt.", 0, 1, timeout);
1677        case -389131437: /*contentType*/  return new Property("contentType", "code", "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. The MIME types \"text/plain\" and \"text/html\" may also be used for Email subscriptions.", 0, 1, contentType);
1678        case 951530617: /*content*/  return new Property("content", "code", "How much of the resource content to deliver in the notification payload. The choices are an empty payload, only the resource id, or the full resource content.", 0, 1, content);
1679        case 1994381401: /*notificationUrlLocation*/  return new Property("notificationUrlLocation", "code", "If present, where to place URLs of resources in notifications.", 0, 1, notificationUrlLocation);
1680        case 382106123: /*maxCount*/  return new Property("maxCount", "positiveInt", "If present, the maximum number of triggering resources that will be included in a notification bundle (e.g., a server will not include more than this number of trigger resources in a single notification).  Note that this is not a strict limit on the number of entries in a bundle, as dependent resources can be included.", 0, 1, maxCount);
1681        default: return super.getNamedProperty(_hash, _name, _checkValid);
1682        }
1683
1684      }
1685
1686      @Override
1687      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1688        switch (hash) {
1689        case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
1690        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
1691        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<SubscriptionState>
1692        case 110546223: /*topic*/ return this.topic == null ? new Base[0] : new Base[] {this.topic}; // CanonicalType
1693        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactPoint
1694        case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // InstantType
1695        case -934964668: /*reason*/ return this.reason == null ? new Base[0] : new Base[] {this.reason}; // StringType
1696        case -721168913: /*filterBy*/ return this.filterBy == null ? new Base[0] : this.filterBy.toArray(new Base[this.filterBy.size()]); // SubscriptionFilterByComponent
1697        case 274155229: /*channelType*/ return this.channelType == null ? new Base[0] : new Base[] {this.channelType}; // Coding
1698        case 1741102485: /*endpoint*/ return this.endpoint == null ? new Base[0] : new Base[] {this.endpoint}; // UrlType
1699        case -1221270899: /*header*/ return this.header == null ? new Base[0] : this.header.toArray(new Base[this.header.size()]); // StringType
1700        case -938465827: /*heartbeatPeriod*/ return this.heartbeatPeriod == null ? new Base[0] : new Base[] {this.heartbeatPeriod}; // UnsignedIntType
1701        case -1313911455: /*timeout*/ return this.timeout == null ? new Base[0] : new Base[] {this.timeout}; // UnsignedIntType
1702        case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
1703        case 951530617: /*content*/ return this.content == null ? new Base[0] : new Base[] {this.content}; // Enumeration<SubscriptionPayloadContent>
1704        case 1994381401: /*notificationUrlLocation*/ return this.notificationUrlLocation == null ? new Base[0] : new Base[] {this.notificationUrlLocation}; // Enumeration<SubscriptionUrlLocation>
1705        case 382106123: /*maxCount*/ return this.maxCount == null ? new Base[0] : new Base[] {this.maxCount}; // PositiveIntType
1706        default: return super.getProperty(hash, name, checkValid);
1707        }
1708
1709      }
1710
1711      @Override
1712      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1713        switch (hash) {
1714        case -1618432855: // identifier
1715          this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier
1716          return value;
1717        case 3373707: // name
1718          this.name = TypeConvertor.castToString(value); // StringType
1719          return value;
1720        case -892481550: // status
1721          value = new SubscriptionStateEnumFactory().fromType(TypeConvertor.castToCode(value));
1722          this.status = (Enumeration) value; // Enumeration<SubscriptionState>
1723          return value;
1724        case 110546223: // topic
1725          this.topic = TypeConvertor.castToCanonical(value); // CanonicalType
1726          return value;
1727        case 951526432: // contact
1728          this.getContact().add(TypeConvertor.castToContactPoint(value)); // ContactPoint
1729          return value;
1730        case 100571: // end
1731          this.end = TypeConvertor.castToInstant(value); // InstantType
1732          return value;
1733        case -934964668: // reason
1734          this.reason = TypeConvertor.castToString(value); // StringType
1735          return value;
1736        case -721168913: // filterBy
1737          this.getFilterBy().add((SubscriptionFilterByComponent) value); // SubscriptionFilterByComponent
1738          return value;
1739        case 274155229: // channelType
1740          this.channelType = TypeConvertor.castToCoding(value); // Coding
1741          return value;
1742        case 1741102485: // endpoint
1743          this.endpoint = TypeConvertor.castToUrl(value); // UrlType
1744          return value;
1745        case -1221270899: // header
1746          this.getHeader().add(TypeConvertor.castToString(value)); // StringType
1747          return value;
1748        case -938465827: // heartbeatPeriod
1749          this.heartbeatPeriod = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1750          return value;
1751        case -1313911455: // timeout
1752          this.timeout = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1753          return value;
1754        case -389131437: // contentType
1755          this.contentType = TypeConvertor.castToCode(value); // CodeType
1756          return value;
1757        case 951530617: // content
1758          value = new SubscriptionPayloadContentEnumFactory().fromType(TypeConvertor.castToCode(value));
1759          this.content = (Enumeration) value; // Enumeration<SubscriptionPayloadContent>
1760          return value;
1761        case 1994381401: // notificationUrlLocation
1762          value = new SubscriptionUrlLocationEnumFactory().fromType(TypeConvertor.castToCode(value));
1763          this.notificationUrlLocation = (Enumeration) value; // Enumeration<SubscriptionUrlLocation>
1764          return value;
1765        case 382106123: // maxCount
1766          this.maxCount = TypeConvertor.castToPositiveInt(value); // PositiveIntType
1767          return value;
1768        default: return super.setProperty(hash, name, value);
1769        }
1770
1771      }
1772
1773      @Override
1774      public Base setProperty(String name, Base value) throws FHIRException {
1775        if (name.equals("identifier")) {
1776          this.getIdentifier().add(TypeConvertor.castToIdentifier(value));
1777        } else if (name.equals("name")) {
1778          this.name = TypeConvertor.castToString(value); // StringType
1779        } else if (name.equals("status")) {
1780          value = new SubscriptionStateEnumFactory().fromType(TypeConvertor.castToCode(value));
1781          this.status = (Enumeration) value; // Enumeration<SubscriptionState>
1782        } else if (name.equals("topic")) {
1783          this.topic = TypeConvertor.castToCanonical(value); // CanonicalType
1784        } else if (name.equals("contact")) {
1785          this.getContact().add(TypeConvertor.castToContactPoint(value));
1786        } else if (name.equals("end")) {
1787          this.end = TypeConvertor.castToInstant(value); // InstantType
1788        } else if (name.equals("reason")) {
1789          this.reason = TypeConvertor.castToString(value); // StringType
1790        } else if (name.equals("filterBy")) {
1791          this.getFilterBy().add((SubscriptionFilterByComponent) value);
1792        } else if (name.equals("channelType")) {
1793          this.channelType = TypeConvertor.castToCoding(value); // Coding
1794        } else if (name.equals("endpoint")) {
1795          this.endpoint = TypeConvertor.castToUrl(value); // UrlType
1796        } else if (name.equals("header")) {
1797          this.getHeader().add(TypeConvertor.castToString(value));
1798        } else if (name.equals("heartbeatPeriod")) {
1799          this.heartbeatPeriod = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1800        } else if (name.equals("timeout")) {
1801          this.timeout = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType
1802        } else if (name.equals("contentType")) {
1803          this.contentType = TypeConvertor.castToCode(value); // CodeType
1804        } else if (name.equals("content")) {
1805          value = new SubscriptionPayloadContentEnumFactory().fromType(TypeConvertor.castToCode(value));
1806          this.content = (Enumeration) value; // Enumeration<SubscriptionPayloadContent>
1807        } else if (name.equals("notificationUrlLocation")) {
1808          value = new SubscriptionUrlLocationEnumFactory().fromType(TypeConvertor.castToCode(value));
1809          this.notificationUrlLocation = (Enumeration) value; // Enumeration<SubscriptionUrlLocation>
1810        } else if (name.equals("maxCount")) {
1811          this.maxCount = TypeConvertor.castToPositiveInt(value); // PositiveIntType
1812        } else
1813          return super.setProperty(name, value);
1814        return value;
1815      }
1816
1817      @Override
1818      public Base makeProperty(int hash, String name) throws FHIRException {
1819        switch (hash) {
1820        case -1618432855:  return addIdentifier(); 
1821        case 3373707:  return getNameElement();
1822        case -892481550:  return getStatusElement();
1823        case 110546223:  return getTopicElement();
1824        case 951526432:  return addContact(); 
1825        case 100571:  return getEndElement();
1826        case -934964668:  return getReasonElement();
1827        case -721168913:  return addFilterBy(); 
1828        case 274155229:  return getChannelType();
1829        case 1741102485:  return getEndpointElement();
1830        case -1221270899:  return addHeaderElement();
1831        case -938465827:  return getHeartbeatPeriodElement();
1832        case -1313911455:  return getTimeoutElement();
1833        case -389131437:  return getContentTypeElement();
1834        case 951530617:  return getContentElement();
1835        case 1994381401:  return getNotificationUrlLocationElement();
1836        case 382106123:  return getMaxCountElement();
1837        default: return super.makeProperty(hash, name);
1838        }
1839
1840      }
1841
1842      @Override
1843      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1844        switch (hash) {
1845        case -1618432855: /*identifier*/ return new String[] {"Identifier"};
1846        case 3373707: /*name*/ return new String[] {"string"};
1847        case -892481550: /*status*/ return new String[] {"code"};
1848        case 110546223: /*topic*/ return new String[] {"canonical"};
1849        case 951526432: /*contact*/ return new String[] {"ContactPoint"};
1850        case 100571: /*end*/ return new String[] {"instant"};
1851        case -934964668: /*reason*/ return new String[] {"string"};
1852        case -721168913: /*filterBy*/ return new String[] {};
1853        case 274155229: /*channelType*/ return new String[] {"Coding"};
1854        case 1741102485: /*endpoint*/ return new String[] {"url"};
1855        case -1221270899: /*header*/ return new String[] {"string"};
1856        case -938465827: /*heartbeatPeriod*/ return new String[] {"unsignedInt"};
1857        case -1313911455: /*timeout*/ return new String[] {"unsignedInt"};
1858        case -389131437: /*contentType*/ return new String[] {"code"};
1859        case 951530617: /*content*/ return new String[] {"code"};
1860        case 1994381401: /*notificationUrlLocation*/ return new String[] {"code"};
1861        case 382106123: /*maxCount*/ return new String[] {"positiveInt"};
1862        default: return super.getTypesForProperty(hash, name);
1863        }
1864
1865      }
1866
1867      @Override
1868      public Base addChild(String name) throws FHIRException {
1869        if (name.equals("identifier")) {
1870          return addIdentifier();
1871        }
1872        else if (name.equals("name")) {
1873          throw new FHIRException("Cannot call addChild on a primitive type Subscription.name");
1874        }
1875        else if (name.equals("status")) {
1876          throw new FHIRException("Cannot call addChild on a primitive type Subscription.status");
1877        }
1878        else if (name.equals("topic")) {
1879          throw new FHIRException("Cannot call addChild on a primitive type Subscription.topic");
1880        }
1881        else if (name.equals("contact")) {
1882          return addContact();
1883        }
1884        else if (name.equals("end")) {
1885          throw new FHIRException("Cannot call addChild on a primitive type Subscription.end");
1886        }
1887        else if (name.equals("reason")) {
1888          throw new FHIRException("Cannot call addChild on a primitive type Subscription.reason");
1889        }
1890        else if (name.equals("filterBy")) {
1891          return addFilterBy();
1892        }
1893        else if (name.equals("channelType")) {
1894          this.channelType = new Coding();
1895          return this.channelType;
1896        }
1897        else if (name.equals("endpoint")) {
1898          throw new FHIRException("Cannot call addChild on a primitive type Subscription.endpoint");
1899        }
1900        else if (name.equals("header")) {
1901          throw new FHIRException("Cannot call addChild on a primitive type Subscription.header");
1902        }
1903        else if (name.equals("heartbeatPeriod")) {
1904          throw new FHIRException("Cannot call addChild on a primitive type Subscription.heartbeatPeriod");
1905        }
1906        else if (name.equals("timeout")) {
1907          throw new FHIRException("Cannot call addChild on a primitive type Subscription.timeout");
1908        }
1909        else if (name.equals("contentType")) {
1910          throw new FHIRException("Cannot call addChild on a primitive type Subscription.contentType");
1911        }
1912        else if (name.equals("content")) {
1913          throw new FHIRException("Cannot call addChild on a primitive type Subscription.content");
1914        }
1915        else if (name.equals("notificationUrlLocation")) {
1916          throw new FHIRException("Cannot call addChild on a primitive type Subscription.notificationUrlLocation");
1917        }
1918        else if (name.equals("maxCount")) {
1919          throw new FHIRException("Cannot call addChild on a primitive type Subscription.maxCount");
1920        }
1921        else
1922          return super.addChild(name);
1923      }
1924
1925  public String fhirType() {
1926    return "Subscription";
1927
1928  }
1929
1930      public Subscription copy() {
1931        Subscription dst = new Subscription();
1932        copyValues(dst);
1933        return dst;
1934      }
1935
1936      public void copyValues(Subscription dst) {
1937        super.copyValues(dst);
1938        if (identifier != null) {
1939          dst.identifier = new ArrayList<Identifier>();
1940          for (Identifier i : identifier)
1941            dst.identifier.add(i.copy());
1942        };
1943        dst.name = name == null ? null : name.copy();
1944        dst.status = status == null ? null : status.copy();
1945        dst.topic = topic == null ? null : topic.copy();
1946        if (contact != null) {
1947          dst.contact = new ArrayList<ContactPoint>();
1948          for (ContactPoint i : contact)
1949            dst.contact.add(i.copy());
1950        };
1951        dst.end = end == null ? null : end.copy();
1952        dst.reason = reason == null ? null : reason.copy();
1953        if (filterBy != null) {
1954          dst.filterBy = new ArrayList<SubscriptionFilterByComponent>();
1955          for (SubscriptionFilterByComponent i : filterBy)
1956            dst.filterBy.add(i.copy());
1957        };
1958        dst.channelType = channelType == null ? null : channelType.copy();
1959        dst.endpoint = endpoint == null ? null : endpoint.copy();
1960        if (header != null) {
1961          dst.header = new ArrayList<StringType>();
1962          for (StringType i : header)
1963            dst.header.add(i.copy());
1964        };
1965        dst.heartbeatPeriod = heartbeatPeriod == null ? null : heartbeatPeriod.copy();
1966        dst.timeout = timeout == null ? null : timeout.copy();
1967        dst.contentType = contentType == null ? null : contentType.copy();
1968        dst.content = content == null ? null : content.copy();
1969        dst.notificationUrlLocation = notificationUrlLocation == null ? null : notificationUrlLocation.copy();
1970        dst.maxCount = maxCount == null ? null : maxCount.copy();
1971      }
1972
1973      protected Subscription typedCopy() {
1974        return copy();
1975      }
1976
1977      @Override
1978      public boolean equalsDeep(Base other_) {
1979        if (!super.equalsDeep(other_))
1980          return false;
1981        if (!(other_ instanceof Subscription))
1982          return false;
1983        Subscription o = (Subscription) other_;
1984        return compareDeep(identifier, o.identifier, true) && compareDeep(name, o.name, true) && compareDeep(status, o.status, true)
1985           && compareDeep(topic, o.topic, true) && compareDeep(contact, o.contact, true) && compareDeep(end, o.end, true)
1986           && compareDeep(reason, o.reason, true) && compareDeep(filterBy, o.filterBy, true) && compareDeep(channelType, o.channelType, true)
1987           && compareDeep(endpoint, o.endpoint, true) && compareDeep(header, o.header, true) && compareDeep(heartbeatPeriod, o.heartbeatPeriod, true)
1988           && compareDeep(timeout, o.timeout, true) && compareDeep(contentType, o.contentType, true) && compareDeep(content, o.content, true)
1989           && compareDeep(notificationUrlLocation, o.notificationUrlLocation, true) && compareDeep(maxCount, o.maxCount, true)
1990          ;
1991      }
1992
1993      @Override
1994      public boolean equalsShallow(Base other_) {
1995        if (!super.equalsShallow(other_))
1996          return false;
1997        if (!(other_ instanceof Subscription))
1998          return false;
1999        Subscription o = (Subscription) other_;
2000        return compareValues(name, o.name, true) && compareValues(status, o.status, true) && compareValues(topic, o.topic, true)
2001           && compareValues(end, o.end, true) && compareValues(reason, o.reason, true) && compareValues(endpoint, o.endpoint, true)
2002           && compareValues(header, o.header, true) && compareValues(heartbeatPeriod, o.heartbeatPeriod, true)
2003           && compareValues(timeout, o.timeout, true) && compareValues(contentType, o.contentType, true) && compareValues(content, o.content, true)
2004           && compareValues(notificationUrlLocation, o.notificationUrlLocation, true) && compareValues(maxCount, o.maxCount, true)
2005          ;
2006      }
2007
2008      public boolean isEmpty() {
2009        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, name, status
2010          , topic, contact, end, reason, filterBy, channelType, endpoint, header, heartbeatPeriod
2011          , timeout, contentType, content, notificationUrlLocation, maxCount);
2012      }
2013
2014  @Override
2015  public ResourceType getResourceType() {
2016    return ResourceType.Subscription;
2017   }
2018
2019 /**
2020   * Search parameter: <b>contact</b>
2021   * <p>
2022   * Description: <b>Contact details for the subscription</b><br>
2023   * Type: <b>token</b><br>
2024   * Path: <b>Subscription.contact</b><br>
2025   * </p>
2026   */
2027  @SearchParamDefinition(name="contact", path="Subscription.contact", description="Contact details for the subscription", type="token" )
2028  public static final String SP_CONTACT = "contact";
2029 /**
2030   * <b>Fluent Client</b> search parameter constant for <b>contact</b>
2031   * <p>
2032   * Description: <b>Contact details for the subscription</b><br>
2033   * Type: <b>token</b><br>
2034   * Path: <b>Subscription.contact</b><br>
2035   * </p>
2036   */
2037  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTACT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTACT);
2038
2039 /**
2040   * Search parameter: <b>identifier</b>
2041   * <p>
2042   * Description: <b>A subscription identifier</b><br>
2043   * Type: <b>token</b><br>
2044   * Path: <b>Subscription.identifier</b><br>
2045   * </p>
2046   */
2047  @SearchParamDefinition(name="identifier", path="Subscription.identifier", description="A subscription identifier", type="token" )
2048  public static final String SP_IDENTIFIER = "identifier";
2049 /**
2050   * <b>Fluent Client</b> search parameter constant for <b>identifier</b>
2051   * <p>
2052   * Description: <b>A subscription identifier</b><br>
2053   * Type: <b>token</b><br>
2054   * Path: <b>Subscription.identifier</b><br>
2055   * </p>
2056   */
2057  public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER);
2058
2059 /**
2060   * Search parameter: <b>payload</b>
2061   * <p>
2062   * Description: <b>The mime-type of the notification payload</b><br>
2063   * Type: <b>token</b><br>
2064   * Path: <b>null</b><br>
2065   * </p>
2066   */
2067  @SearchParamDefinition(name="payload", path="", description="The mime-type of the notification payload", type="token" )
2068  public static final String SP_PAYLOAD = "payload";
2069 /**
2070   * <b>Fluent Client</b> search parameter constant for <b>payload</b>
2071   * <p>
2072   * Description: <b>The mime-type of the notification payload</b><br>
2073   * Type: <b>token</b><br>
2074   * Path: <b>null</b><br>
2075   * </p>
2076   */
2077  public static final ca.uhn.fhir.rest.gclient.TokenClientParam PAYLOAD = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PAYLOAD);
2078
2079 /**
2080   * Search parameter: <b>status</b>
2081   * <p>
2082   * Description: <b>The current state of the subscription</b><br>
2083   * Type: <b>token</b><br>
2084   * Path: <b>Subscription.status</b><br>
2085   * </p>
2086   */
2087  @SearchParamDefinition(name="status", path="Subscription.status", description="The current state of the subscription", type="token" )
2088  public static final String SP_STATUS = "status";
2089 /**
2090   * <b>Fluent Client</b> search parameter constant for <b>status</b>
2091   * <p>
2092   * Description: <b>The current state of the subscription</b><br>
2093   * Type: <b>token</b><br>
2094   * Path: <b>Subscription.status</b><br>
2095   * </p>
2096   */
2097  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
2098
2099 /**
2100   * Search parameter: <b>type</b>
2101   * <p>
2102   * Description: <b>The type of channel for the sent notifications</b><br>
2103   * Type: <b>token</b><br>
2104   * Path: <b>null</b><br>
2105   * </p>
2106   */
2107  @SearchParamDefinition(name="type", path="", description="The type of channel for the sent notifications", type="token" )
2108  public static final String SP_TYPE = "type";
2109 /**
2110   * <b>Fluent Client</b> search parameter constant for <b>type</b>
2111   * <p>
2112   * Description: <b>The type of channel for the sent notifications</b><br>
2113   * Type: <b>token</b><br>
2114   * Path: <b>null</b><br>
2115   * </p>
2116   */
2117  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
2118
2119 /**
2120   * Search parameter: <b>url</b>
2121   * <p>
2122   * Description: <b>The uri that will receive the notifications</b><br>
2123   * Type: <b>uri</b><br>
2124   * Path: <b>null</b><br>
2125   * </p>
2126   */
2127  @SearchParamDefinition(name="url", path="", description="The uri that will receive the notifications", type="uri" )
2128  public static final String SP_URL = "url";
2129 /**
2130   * <b>Fluent Client</b> search parameter constant for <b>url</b>
2131   * <p>
2132   * Description: <b>The uri that will receive the notifications</b><br>
2133   * Type: <b>uri</b><br>
2134   * Path: <b>null</b><br>
2135   * </p>
2136   */
2137  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
2138
2139
2140}
2141