001package org.hl7.fhir.dstu3.model;
002
003
004
005/*
006  Copyright (c) 2011+, HL7, Inc.
007  All rights reserved.
008  
009  Redistribution and use in source and binary forms, with or without modification, 
010  are permitted provided that the following conditions are met:
011  
012   * Redistributions of source code must retain the above copyright notice, this 
013     list of conditions and the following disclaimer.
014   * Redistributions in binary form must reproduce the above copyright notice, 
015     this list of conditions and the following disclaimer in the documentation 
016     and/or other materials provided with the distribution.
017   * Neither the name of HL7 nor the names of its contributors may be used to 
018     endorse or promote products derived from this software without specific 
019     prior written permission.
020  
021  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
022  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
023  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
024  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
025  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
026  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
027  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
028  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
029  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
030  POSSIBILITY OF SUCH DAMAGE.
031  
032*/
033
034// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x
035import java.util.ArrayList;
036import java.util.Date;
037import java.util.List;
038
039import org.hl7.fhir.dstu3.model.Enumerations.BindingStrength;
040import org.hl7.fhir.dstu3.model.Enumerations.BindingStrengthEnumFactory;
041import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus;
042import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory;
043import org.hl7.fhir.dstu3.model.Enumerations.SearchParamType;
044import org.hl7.fhir.dstu3.model.Enumerations.SearchParamTypeEnumFactory;
045import org.hl7.fhir.exceptions.FHIRException;
046import org.hl7.fhir.exceptions.FHIRFormatError;
047import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
048import org.hl7.fhir.utilities.Utilities;
049
050import ca.uhn.fhir.model.api.annotation.Block;
051import ca.uhn.fhir.model.api.annotation.Child;
052import ca.uhn.fhir.model.api.annotation.ChildOrder;
053import ca.uhn.fhir.model.api.annotation.Description;
054import ca.uhn.fhir.model.api.annotation.ResourceDef;
055import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
056/**
057 * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
058 */
059@ResourceDef(name="OperationDefinition", profile="http://hl7.org/fhir/Profile/OperationDefinition")
060@ChildOrder(names={"url", "version", "name", "status", "kind", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "idempotent", "code", "comment", "base", "resource", "system", "type", "instance", "parameter", "overload"})
061public class OperationDefinition extends MetadataResource {
062
063    public enum OperationKind {
064        /**
065         * This operation is invoked as an operation.
066         */
067        OPERATION, 
068        /**
069         * This operation is a named query, invoked using the search mechanism.
070         */
071        QUERY, 
072        /**
073         * added to help the parsers with the generic types
074         */
075        NULL;
076        public static OperationKind fromCode(String codeString) throws FHIRException {
077            if (codeString == null || "".equals(codeString))
078                return null;
079        if ("operation".equals(codeString))
080          return OPERATION;
081        if ("query".equals(codeString))
082          return QUERY;
083        if (Configuration.isAcceptInvalidEnums())
084          return null;
085        else
086          throw new FHIRException("Unknown OperationKind code '"+codeString+"'");
087        }
088        public String toCode() {
089          switch (this) {
090            case OPERATION: return "operation";
091            case QUERY: return "query";
092            case NULL: return null;
093            default: return "?";
094          }
095        }
096        public String getSystem() {
097          switch (this) {
098            case OPERATION: return "http://hl7.org/fhir/operation-kind";
099            case QUERY: return "http://hl7.org/fhir/operation-kind";
100            case NULL: return null;
101            default: return "?";
102          }
103        }
104        public String getDefinition() {
105          switch (this) {
106            case OPERATION: return "This operation is invoked as an operation.";
107            case QUERY: return "This operation is a named query, invoked using the search mechanism.";
108            case NULL: return null;
109            default: return "?";
110          }
111        }
112        public String getDisplay() {
113          switch (this) {
114            case OPERATION: return "Operation";
115            case QUERY: return "Query";
116            case NULL: return null;
117            default: return "?";
118          }
119        }
120    }
121
122  public static class OperationKindEnumFactory implements EnumFactory<OperationKind> {
123    public OperationKind fromCode(String codeString) throws IllegalArgumentException {
124      if (codeString == null || "".equals(codeString))
125            if (codeString == null || "".equals(codeString))
126                return null;
127        if ("operation".equals(codeString))
128          return OperationKind.OPERATION;
129        if ("query".equals(codeString))
130          return OperationKind.QUERY;
131        throw new IllegalArgumentException("Unknown OperationKind code '"+codeString+"'");
132        }
133        public Enumeration<OperationKind> fromType(Base code) throws FHIRException {
134          if (code == null)
135            return null;
136          if (code.isEmpty())
137            return new Enumeration<OperationKind>(this);
138          String codeString = ((PrimitiveType) code).asStringValue();
139          if (codeString == null || "".equals(codeString))
140            return null;
141        if ("operation".equals(codeString))
142          return new Enumeration<OperationKind>(this, OperationKind.OPERATION);
143        if ("query".equals(codeString))
144          return new Enumeration<OperationKind>(this, OperationKind.QUERY);
145        throw new FHIRException("Unknown OperationKind code '"+codeString+"'");
146        }
147    public String toCode(OperationKind code) {
148      if (code == OperationKind.OPERATION)
149        return "operation";
150      if (code == OperationKind.QUERY)
151        return "query";
152      return "?";
153      }
154    public String toSystem(OperationKind code) {
155      return code.getSystem();
156      }
157    }
158
159    public enum OperationParameterUse {
160        /**
161         * This is an input parameter.
162         */
163        IN, 
164        /**
165         * This is an output parameter.
166         */
167        OUT, 
168        /**
169         * added to help the parsers with the generic types
170         */
171        NULL;
172        public static OperationParameterUse fromCode(String codeString) throws FHIRException {
173            if (codeString == null || "".equals(codeString))
174                return null;
175        if ("in".equals(codeString))
176          return IN;
177        if ("out".equals(codeString))
178          return OUT;
179        if (Configuration.isAcceptInvalidEnums())
180          return null;
181        else
182          throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
183        }
184        public String toCode() {
185          switch (this) {
186            case IN: return "in";
187            case OUT: return "out";
188            case NULL: return null;
189            default: return "?";
190          }
191        }
192        public String getSystem() {
193          switch (this) {
194            case IN: return "http://hl7.org/fhir/operation-parameter-use";
195            case OUT: return "http://hl7.org/fhir/operation-parameter-use";
196            case NULL: return null;
197            default: return "?";
198          }
199        }
200        public String getDefinition() {
201          switch (this) {
202            case IN: return "This is an input parameter.";
203            case OUT: return "This is an output parameter.";
204            case NULL: return null;
205            default: return "?";
206          }
207        }
208        public String getDisplay() {
209          switch (this) {
210            case IN: return "In";
211            case OUT: return "Out";
212            case NULL: return null;
213            default: return "?";
214          }
215        }
216    }
217
218  public static class OperationParameterUseEnumFactory implements EnumFactory<OperationParameterUse> {
219    public OperationParameterUse fromCode(String codeString) throws IllegalArgumentException {
220      if (codeString == null || "".equals(codeString))
221            if (codeString == null || "".equals(codeString))
222                return null;
223        if ("in".equals(codeString))
224          return OperationParameterUse.IN;
225        if ("out".equals(codeString))
226          return OperationParameterUse.OUT;
227        throw new IllegalArgumentException("Unknown OperationParameterUse code '"+codeString+"'");
228        }
229        public Enumeration<OperationParameterUse> fromType(Base code) throws FHIRException {
230          if (code == null)
231            return null;
232          if (code.isEmpty())
233            return new Enumeration<OperationParameterUse>(this);
234          String codeString = ((PrimitiveType) code).asStringValue();
235          if (codeString == null || "".equals(codeString))
236            return null;
237        if ("in".equals(codeString))
238          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.IN);
239        if ("out".equals(codeString))
240          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.OUT);
241        throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
242        }
243    public String toCode(OperationParameterUse code) {
244      if (code == OperationParameterUse.IN)
245        return "in";
246      if (code == OperationParameterUse.OUT)
247        return "out";
248      return "?";
249      }
250    public String toSystem(OperationParameterUse code) {
251      return code.getSystem();
252      }
253    }
254
255    @Block()
256    public static class OperationDefinitionParameterComponent extends BackboneElement implements IBaseBackboneElement {
257        /**
258         * The name of used to identify the parameter.
259         */
260        @Child(name = "name", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
261        @Description(shortDefinition="Name in Parameters.parameter.name or in URL", formalDefinition="The name of used to identify the parameter." )
262        protected CodeType name;
263
264        /**
265         * Whether this is an input or an output parameter.
266         */
267        @Child(name = "use", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
268        @Description(shortDefinition="in | out", formalDefinition="Whether this is an input or an output parameter." )
269        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/operation-parameter-use")
270        protected Enumeration<OperationParameterUse> use;
271
272        /**
273         * The minimum number of times this parameter SHALL appear in the request or response.
274         */
275        @Child(name = "min", type = {IntegerType.class}, order=3, min=1, max=1, modifier=false, summary=false)
276        @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this parameter SHALL appear in the request or response." )
277        protected IntegerType min;
278
279        /**
280         * The maximum number of times this element is permitted to appear in the request or response.
281         */
282        @Child(name = "max", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=false)
283        @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the request or response." )
284        protected StringType max;
285
286        /**
287         * Describes the meaning or use of this parameter.
288         */
289        @Child(name = "documentation", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
290        @Description(shortDefinition="Description of meaning/use", formalDefinition="Describes the meaning or use of this parameter." )
291        protected StringType documentation;
292
293        /**
294         * The type for this parameter.
295         */
296        @Child(name = "type", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
297        @Description(shortDefinition="What type this parameter has", formalDefinition="The type for this parameter." )
298        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/all-types")
299        protected CodeType type;
300
301        /**
302         * How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.
303         */
304        @Child(name = "searchType", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false)
305        @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri", formalDefinition="How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'." )
306        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-param-type")
307        protected Enumeration<SearchParamType> searchType;
308
309        /**
310         * A profile the specifies the rules that this parameter must conform to.
311         */
312        @Child(name = "profile", type = {StructureDefinition.class}, order=8, min=0, max=1, modifier=false, summary=false)
313        @Description(shortDefinition="Profile on the type", formalDefinition="A profile the specifies the rules that this parameter must conform to." )
314        protected Reference profile;
315
316        /**
317         * The actual object that is the target of the reference (A profile the specifies the rules that this parameter must conform to.)
318         */
319        protected StructureDefinition profileTarget;
320
321        /**
322         * Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).
323         */
324        @Child(name = "binding", type = {}, order=9, min=0, max=1, modifier=false, summary=false)
325        @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this parameter is coded (code, Coding, CodeableConcept)." )
326        protected OperationDefinitionParameterBindingComponent binding;
327
328        /**
329         * The parts of a nested Parameter.
330         */
331        @Child(name = "part", type = {OperationDefinitionParameterComponent.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
332        @Description(shortDefinition="Parts of a nested Parameter", formalDefinition="The parts of a nested Parameter." )
333        protected List<OperationDefinitionParameterComponent> part;
334
335        private static final long serialVersionUID = -885506257L;
336
337    /**
338     * Constructor
339     */
340      public OperationDefinitionParameterComponent() {
341        super();
342      }
343
344    /**
345     * Constructor
346     */
347      public OperationDefinitionParameterComponent(CodeType name, Enumeration<OperationParameterUse> use, IntegerType min, StringType max) {
348        super();
349        this.name = name;
350        this.use = use;
351        this.min = min;
352        this.max = max;
353      }
354
355        /**
356         * @return {@link #name} (The name of used to identify the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
357         */
358        public CodeType getNameElement() { 
359          if (this.name == null)
360            if (Configuration.errorOnAutoCreate())
361              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.name");
362            else if (Configuration.doAutoCreate())
363              this.name = new CodeType(); // bb
364          return this.name;
365        }
366
367        public boolean hasNameElement() { 
368          return this.name != null && !this.name.isEmpty();
369        }
370
371        public boolean hasName() { 
372          return this.name != null && !this.name.isEmpty();
373        }
374
375        /**
376         * @param value {@link #name} (The name of used to identify the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
377         */
378        public OperationDefinitionParameterComponent setNameElement(CodeType value) { 
379          this.name = value;
380          return this;
381        }
382
383        /**
384         * @return The name of used to identify the parameter.
385         */
386        public String getName() { 
387          return this.name == null ? null : this.name.getValue();
388        }
389
390        /**
391         * @param value The name of used to identify the parameter.
392         */
393        public OperationDefinitionParameterComponent setName(String value) { 
394            if (this.name == null)
395              this.name = new CodeType();
396            this.name.setValue(value);
397          return this;
398        }
399
400        /**
401         * @return {@link #use} (Whether this is an input or an output parameter.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value
402         */
403        public Enumeration<OperationParameterUse> getUseElement() { 
404          if (this.use == null)
405            if (Configuration.errorOnAutoCreate())
406              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.use");
407            else if (Configuration.doAutoCreate())
408              this.use = new Enumeration<OperationParameterUse>(new OperationParameterUseEnumFactory()); // bb
409          return this.use;
410        }
411
412        public boolean hasUseElement() { 
413          return this.use != null && !this.use.isEmpty();
414        }
415
416        public boolean hasUse() { 
417          return this.use != null && !this.use.isEmpty();
418        }
419
420        /**
421         * @param value {@link #use} (Whether this is an input or an output parameter.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value
422         */
423        public OperationDefinitionParameterComponent setUseElement(Enumeration<OperationParameterUse> value) { 
424          this.use = value;
425          return this;
426        }
427
428        /**
429         * @return Whether this is an input or an output parameter.
430         */
431        public OperationParameterUse getUse() { 
432          return this.use == null ? null : this.use.getValue();
433        }
434
435        /**
436         * @param value Whether this is an input or an output parameter.
437         */
438        public OperationDefinitionParameterComponent setUse(OperationParameterUse value) { 
439            if (this.use == null)
440              this.use = new Enumeration<OperationParameterUse>(new OperationParameterUseEnumFactory());
441            this.use.setValue(value);
442          return this;
443        }
444
445        /**
446         * @return {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value
447         */
448        public IntegerType getMinElement() { 
449          if (this.min == null)
450            if (Configuration.errorOnAutoCreate())
451              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.min");
452            else if (Configuration.doAutoCreate())
453              this.min = new IntegerType(); // bb
454          return this.min;
455        }
456
457        public boolean hasMinElement() { 
458          return this.min != null && !this.min.isEmpty();
459        }
460
461        public boolean hasMin() { 
462          return this.min != null && !this.min.isEmpty();
463        }
464
465        /**
466         * @param value {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value
467         */
468        public OperationDefinitionParameterComponent setMinElement(IntegerType value) { 
469          this.min = value;
470          return this;
471        }
472
473        /**
474         * @return The minimum number of times this parameter SHALL appear in the request or response.
475         */
476        public int getMin() { 
477          return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue();
478        }
479
480        /**
481         * @param value The minimum number of times this parameter SHALL appear in the request or response.
482         */
483        public OperationDefinitionParameterComponent setMin(int value) { 
484            if (this.min == null)
485              this.min = new IntegerType();
486            this.min.setValue(value);
487          return this;
488        }
489
490        /**
491         * @return {@link #max} (The maximum number of times this element is permitted to appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value
492         */
493        public StringType getMaxElement() { 
494          if (this.max == null)
495            if (Configuration.errorOnAutoCreate())
496              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.max");
497            else if (Configuration.doAutoCreate())
498              this.max = new StringType(); // bb
499          return this.max;
500        }
501
502        public boolean hasMaxElement() { 
503          return this.max != null && !this.max.isEmpty();
504        }
505
506        public boolean hasMax() { 
507          return this.max != null && !this.max.isEmpty();
508        }
509
510        /**
511         * @param value {@link #max} (The maximum number of times this element is permitted to appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value
512         */
513        public OperationDefinitionParameterComponent setMaxElement(StringType value) { 
514          this.max = value;
515          return this;
516        }
517
518        /**
519         * @return The maximum number of times this element is permitted to appear in the request or response.
520         */
521        public String getMax() { 
522          return this.max == null ? null : this.max.getValue();
523        }
524
525        /**
526         * @param value The maximum number of times this element is permitted to appear in the request or response.
527         */
528        public OperationDefinitionParameterComponent setMax(String value) { 
529            if (this.max == null)
530              this.max = new StringType();
531            this.max.setValue(value);
532          return this;
533        }
534
535        /**
536         * @return {@link #documentation} (Describes the meaning or use of this parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
537         */
538        public StringType getDocumentationElement() { 
539          if (this.documentation == null)
540            if (Configuration.errorOnAutoCreate())
541              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.documentation");
542            else if (Configuration.doAutoCreate())
543              this.documentation = new StringType(); // bb
544          return this.documentation;
545        }
546
547        public boolean hasDocumentationElement() { 
548          return this.documentation != null && !this.documentation.isEmpty();
549        }
550
551        public boolean hasDocumentation() { 
552          return this.documentation != null && !this.documentation.isEmpty();
553        }
554
555        /**
556         * @param value {@link #documentation} (Describes the meaning or use of this parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value
557         */
558        public OperationDefinitionParameterComponent setDocumentationElement(StringType value) { 
559          this.documentation = value;
560          return this;
561        }
562
563        /**
564         * @return Describes the meaning or use of this parameter.
565         */
566        public String getDocumentation() { 
567          return this.documentation == null ? null : this.documentation.getValue();
568        }
569
570        /**
571         * @param value Describes the meaning or use of this parameter.
572         */
573        public OperationDefinitionParameterComponent setDocumentation(String value) { 
574          if (Utilities.noString(value))
575            this.documentation = null;
576          else {
577            if (this.documentation == null)
578              this.documentation = new StringType();
579            this.documentation.setValue(value);
580          }
581          return this;
582        }
583
584        /**
585         * @return {@link #type} (The type for this parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
586         */
587        public CodeType getTypeElement() { 
588          if (this.type == null)
589            if (Configuration.errorOnAutoCreate())
590              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.type");
591            else if (Configuration.doAutoCreate())
592              this.type = new CodeType(); // bb
593          return this.type;
594        }
595
596        public boolean hasTypeElement() { 
597          return this.type != null && !this.type.isEmpty();
598        }
599
600        public boolean hasType() { 
601          return this.type != null && !this.type.isEmpty();
602        }
603
604        /**
605         * @param value {@link #type} (The type for this parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
606         */
607        public OperationDefinitionParameterComponent setTypeElement(CodeType value) { 
608          this.type = value;
609          return this;
610        }
611
612        /**
613         * @return The type for this parameter.
614         */
615        public String getType() { 
616          return this.type == null ? null : this.type.getValue();
617        }
618
619        /**
620         * @param value The type for this parameter.
621         */
622        public OperationDefinitionParameterComponent setType(String value) { 
623          if (Utilities.noString(value))
624            this.type = null;
625          else {
626            if (this.type == null)
627              this.type = new CodeType();
628            this.type.setValue(value);
629          }
630          return this;
631        }
632
633        /**
634         * @return {@link #searchType} (How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.). This is the underlying object with id, value and extensions. The accessor "getSearchType" gives direct access to the value
635         */
636        public Enumeration<SearchParamType> getSearchTypeElement() { 
637          if (this.searchType == null)
638            if (Configuration.errorOnAutoCreate())
639              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.searchType");
640            else if (Configuration.doAutoCreate())
641              this.searchType = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); // bb
642          return this.searchType;
643        }
644
645        public boolean hasSearchTypeElement() { 
646          return this.searchType != null && !this.searchType.isEmpty();
647        }
648
649        public boolean hasSearchType() { 
650          return this.searchType != null && !this.searchType.isEmpty();
651        }
652
653        /**
654         * @param value {@link #searchType} (How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.). This is the underlying object with id, value and extensions. The accessor "getSearchType" gives direct access to the value
655         */
656        public OperationDefinitionParameterComponent setSearchTypeElement(Enumeration<SearchParamType> value) { 
657          this.searchType = value;
658          return this;
659        }
660
661        /**
662         * @return How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.
663         */
664        public SearchParamType getSearchType() { 
665          return this.searchType == null ? null : this.searchType.getValue();
666        }
667
668        /**
669         * @param value How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.
670         */
671        public OperationDefinitionParameterComponent setSearchType(SearchParamType value) { 
672          if (value == null)
673            this.searchType = null;
674          else {
675            if (this.searchType == null)
676              this.searchType = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory());
677            this.searchType.setValue(value);
678          }
679          return this;
680        }
681
682        /**
683         * @return {@link #profile} (A profile the specifies the rules that this parameter must conform to.)
684         */
685        public Reference getProfile() { 
686          if (this.profile == null)
687            if (Configuration.errorOnAutoCreate())
688              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.profile");
689            else if (Configuration.doAutoCreate())
690              this.profile = new Reference(); // cc
691          return this.profile;
692        }
693
694        public boolean hasProfile() { 
695          return this.profile != null && !this.profile.isEmpty();
696        }
697
698        /**
699         * @param value {@link #profile} (A profile the specifies the rules that this parameter must conform to.)
700         */
701        public OperationDefinitionParameterComponent setProfile(Reference value)  { 
702          this.profile = value;
703          return this;
704        }
705
706        /**
707         * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A profile the specifies the rules that this parameter must conform to.)
708         */
709        public StructureDefinition getProfileTarget() { 
710          if (this.profileTarget == null)
711            if (Configuration.errorOnAutoCreate())
712              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.profile");
713            else if (Configuration.doAutoCreate())
714              this.profileTarget = new StructureDefinition(); // aa
715          return this.profileTarget;
716        }
717
718        /**
719         * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A profile the specifies the rules that this parameter must conform to.)
720         */
721        public OperationDefinitionParameterComponent setProfileTarget(StructureDefinition value) { 
722          this.profileTarget = value;
723          return this;
724        }
725
726        /**
727         * @return {@link #binding} (Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).)
728         */
729        public OperationDefinitionParameterBindingComponent getBinding() { 
730          if (this.binding == null)
731            if (Configuration.errorOnAutoCreate())
732              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.binding");
733            else if (Configuration.doAutoCreate())
734              this.binding = new OperationDefinitionParameterBindingComponent(); // cc
735          return this.binding;
736        }
737
738        public boolean hasBinding() { 
739          return this.binding != null && !this.binding.isEmpty();
740        }
741
742        /**
743         * @param value {@link #binding} (Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).)
744         */
745        public OperationDefinitionParameterComponent setBinding(OperationDefinitionParameterBindingComponent value)  { 
746          this.binding = value;
747          return this;
748        }
749
750        /**
751         * @return {@link #part} (The parts of a nested Parameter.)
752         */
753        public List<OperationDefinitionParameterComponent> getPart() { 
754          if (this.part == null)
755            this.part = new ArrayList<OperationDefinitionParameterComponent>();
756          return this.part;
757        }
758
759        /**
760         * @return Returns a reference to <code>this</code> for easy method chaining
761         */
762        public OperationDefinitionParameterComponent setPart(List<OperationDefinitionParameterComponent> thePart) { 
763          this.part = thePart;
764          return this;
765        }
766
767        public boolean hasPart() { 
768          if (this.part == null)
769            return false;
770          for (OperationDefinitionParameterComponent item : this.part)
771            if (!item.isEmpty())
772              return true;
773          return false;
774        }
775
776        public OperationDefinitionParameterComponent addPart() { //3
777          OperationDefinitionParameterComponent t = new OperationDefinitionParameterComponent();
778          if (this.part == null)
779            this.part = new ArrayList<OperationDefinitionParameterComponent>();
780          this.part.add(t);
781          return t;
782        }
783
784        public OperationDefinitionParameterComponent addPart(OperationDefinitionParameterComponent t) { //3
785          if (t == null)
786            return this;
787          if (this.part == null)
788            this.part = new ArrayList<OperationDefinitionParameterComponent>();
789          this.part.add(t);
790          return this;
791        }
792
793        /**
794         * @return The first repetition of repeating field {@link #part}, creating it if it does not already exist
795         */
796        public OperationDefinitionParameterComponent getPartFirstRep() { 
797          if (getPart().isEmpty()) {
798            addPart();
799          }
800          return getPart().get(0);
801        }
802
803        protected void listChildren(List<Property> children) {
804          super.listChildren(children);
805          children.add(new Property("name", "code", "The name of used to identify the parameter.", 0, 1, name));
806          children.add(new Property("use", "code", "Whether this is an input or an output parameter.", 0, 1, use));
807          children.add(new Property("min", "integer", "The minimum number of times this parameter SHALL appear in the request or response.", 0, 1, min));
808          children.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the request or response.", 0, 1, max));
809          children.add(new Property("documentation", "string", "Describes the meaning or use of this parameter.", 0, 1, documentation));
810          children.add(new Property("type", "code", "The type for this parameter.", 0, 1, type));
811          children.add(new Property("searchType", "code", "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", 0, 1, searchType));
812          children.add(new Property("profile", "Reference(StructureDefinition)", "A profile the specifies the rules that this parameter must conform to.", 0, 1, profile));
813          children.add(new Property("binding", "", "Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).", 0, 1, binding));
814          children.add(new Property("part", "@OperationDefinition.parameter", "The parts of a nested Parameter.", 0, java.lang.Integer.MAX_VALUE, part));
815        }
816
817        @Override
818        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
819          switch (_hash) {
820          case 3373707: /*name*/  return new Property("name", "code", "The name of used to identify the parameter.", 0, 1, name);
821          case 116103: /*use*/  return new Property("use", "code", "Whether this is an input or an output parameter.", 0, 1, use);
822          case 108114: /*min*/  return new Property("min", "integer", "The minimum number of times this parameter SHALL appear in the request or response.", 0, 1, min);
823          case 107876: /*max*/  return new Property("max", "string", "The maximum number of times this element is permitted to appear in the request or response.", 0, 1, max);
824          case 1587405498: /*documentation*/  return new Property("documentation", "string", "Describes the meaning or use of this parameter.", 0, 1, documentation);
825          case 3575610: /*type*/  return new Property("type", "code", "The type for this parameter.", 0, 1, type);
826          case -710454014: /*searchType*/  return new Property("searchType", "code", "How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.", 0, 1, searchType);
827          case -309425751: /*profile*/  return new Property("profile", "Reference(StructureDefinition)", "A profile the specifies the rules that this parameter must conform to.", 0, 1, profile);
828          case -108220795: /*binding*/  return new Property("binding", "", "Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).", 0, 1, binding);
829          case 3433459: /*part*/  return new Property("part", "@OperationDefinition.parameter", "The parts of a nested Parameter.", 0, java.lang.Integer.MAX_VALUE, part);
830          default: return super.getNamedProperty(_hash, _name, _checkValid);
831          }
832
833        }
834
835      @Override
836      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
837        switch (hash) {
838        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // CodeType
839        case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<OperationParameterUse>
840        case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // IntegerType
841        case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
842        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
843        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
844        case -710454014: /*searchType*/ return this.searchType == null ? new Base[0] : new Base[] {this.searchType}; // Enumeration<SearchParamType>
845        case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Reference
846        case -108220795: /*binding*/ return this.binding == null ? new Base[0] : new Base[] {this.binding}; // OperationDefinitionParameterBindingComponent
847        case 3433459: /*part*/ return this.part == null ? new Base[0] : this.part.toArray(new Base[this.part.size()]); // OperationDefinitionParameterComponent
848        default: return super.getProperty(hash, name, checkValid);
849        }
850
851      }
852
853      @Override
854      public Base setProperty(int hash, String name, Base value) throws FHIRException {
855        switch (hash) {
856        case 3373707: // name
857          this.name = castToCode(value); // CodeType
858          return value;
859        case 116103: // use
860          value = new OperationParameterUseEnumFactory().fromType(castToCode(value));
861          this.use = (Enumeration) value; // Enumeration<OperationParameterUse>
862          return value;
863        case 108114: // min
864          this.min = castToInteger(value); // IntegerType
865          return value;
866        case 107876: // max
867          this.max = castToString(value); // StringType
868          return value;
869        case 1587405498: // documentation
870          this.documentation = castToString(value); // StringType
871          return value;
872        case 3575610: // type
873          this.type = castToCode(value); // CodeType
874          return value;
875        case -710454014: // searchType
876          value = new SearchParamTypeEnumFactory().fromType(castToCode(value));
877          this.searchType = (Enumeration) value; // Enumeration<SearchParamType>
878          return value;
879        case -309425751: // profile
880          this.profile = castToReference(value); // Reference
881          return value;
882        case -108220795: // binding
883          this.binding = (OperationDefinitionParameterBindingComponent) value; // OperationDefinitionParameterBindingComponent
884          return value;
885        case 3433459: // part
886          this.getPart().add((OperationDefinitionParameterComponent) value); // OperationDefinitionParameterComponent
887          return value;
888        default: return super.setProperty(hash, name, value);
889        }
890
891      }
892
893      @Override
894      public Base setProperty(String name, Base value) throws FHIRException {
895        if (name.equals("name")) {
896          this.name = castToCode(value); // CodeType
897        } else if (name.equals("use")) {
898          value = new OperationParameterUseEnumFactory().fromType(castToCode(value));
899          this.use = (Enumeration) value; // Enumeration<OperationParameterUse>
900        } else if (name.equals("min")) {
901          this.min = castToInteger(value); // IntegerType
902        } else if (name.equals("max")) {
903          this.max = castToString(value); // StringType
904        } else if (name.equals("documentation")) {
905          this.documentation = castToString(value); // StringType
906        } else if (name.equals("type")) {
907          this.type = castToCode(value); // CodeType
908        } else if (name.equals("searchType")) {
909          value = new SearchParamTypeEnumFactory().fromType(castToCode(value));
910          this.searchType = (Enumeration) value; // Enumeration<SearchParamType>
911        } else if (name.equals("profile")) {
912          this.profile = castToReference(value); // Reference
913        } else if (name.equals("binding")) {
914          this.binding = (OperationDefinitionParameterBindingComponent) value; // OperationDefinitionParameterBindingComponent
915        } else if (name.equals("part")) {
916          this.getPart().add((OperationDefinitionParameterComponent) value);
917        } else
918          return super.setProperty(name, value);
919        return value;
920      }
921
922      @Override
923      public Base makeProperty(int hash, String name) throws FHIRException {
924        switch (hash) {
925        case 3373707:  return getNameElement();
926        case 116103:  return getUseElement();
927        case 108114:  return getMinElement();
928        case 107876:  return getMaxElement();
929        case 1587405498:  return getDocumentationElement();
930        case 3575610:  return getTypeElement();
931        case -710454014:  return getSearchTypeElement();
932        case -309425751:  return getProfile(); 
933        case -108220795:  return getBinding(); 
934        case 3433459:  return addPart(); 
935        default: return super.makeProperty(hash, name);
936        }
937
938      }
939
940      @Override
941      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
942        switch (hash) {
943        case 3373707: /*name*/ return new String[] {"code"};
944        case 116103: /*use*/ return new String[] {"code"};
945        case 108114: /*min*/ return new String[] {"integer"};
946        case 107876: /*max*/ return new String[] {"string"};
947        case 1587405498: /*documentation*/ return new String[] {"string"};
948        case 3575610: /*type*/ return new String[] {"code"};
949        case -710454014: /*searchType*/ return new String[] {"code"};
950        case -309425751: /*profile*/ return new String[] {"Reference"};
951        case -108220795: /*binding*/ return new String[] {};
952        case 3433459: /*part*/ return new String[] {"@OperationDefinition.parameter"};
953        default: return super.getTypesForProperty(hash, name);
954        }
955
956      }
957
958      @Override
959      public Base addChild(String name) throws FHIRException {
960        if (name.equals("name")) {
961          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name");
962        }
963        else if (name.equals("use")) {
964          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.use");
965        }
966        else if (name.equals("min")) {
967          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.min");
968        }
969        else if (name.equals("max")) {
970          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.max");
971        }
972        else if (name.equals("documentation")) {
973          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.documentation");
974        }
975        else if (name.equals("type")) {
976          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.type");
977        }
978        else if (name.equals("searchType")) {
979          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.searchType");
980        }
981        else if (name.equals("profile")) {
982          this.profile = new Reference();
983          return this.profile;
984        }
985        else if (name.equals("binding")) {
986          this.binding = new OperationDefinitionParameterBindingComponent();
987          return this.binding;
988        }
989        else if (name.equals("part")) {
990          return addPart();
991        }
992        else
993          return super.addChild(name);
994      }
995
996      public OperationDefinitionParameterComponent copy() {
997        OperationDefinitionParameterComponent dst = new OperationDefinitionParameterComponent();
998        copyValues(dst);
999        dst.name = name == null ? null : name.copy();
1000        dst.use = use == null ? null : use.copy();
1001        dst.min = min == null ? null : min.copy();
1002        dst.max = max == null ? null : max.copy();
1003        dst.documentation = documentation == null ? null : documentation.copy();
1004        dst.type = type == null ? null : type.copy();
1005        dst.searchType = searchType == null ? null : searchType.copy();
1006        dst.profile = profile == null ? null : profile.copy();
1007        dst.binding = binding == null ? null : binding.copy();
1008        if (part != null) {
1009          dst.part = new ArrayList<OperationDefinitionParameterComponent>();
1010          for (OperationDefinitionParameterComponent i : part)
1011            dst.part.add(i.copy());
1012        };
1013        return dst;
1014      }
1015
1016      @Override
1017      public boolean equalsDeep(Base other_) {
1018        if (!super.equalsDeep(other_))
1019          return false;
1020        if (!(other_ instanceof OperationDefinitionParameterComponent))
1021          return false;
1022        OperationDefinitionParameterComponent o = (OperationDefinitionParameterComponent) other_;
1023        return compareDeep(name, o.name, true) && compareDeep(use, o.use, true) && compareDeep(min, o.min, true)
1024           && compareDeep(max, o.max, true) && compareDeep(documentation, o.documentation, true) && compareDeep(type, o.type, true)
1025           && compareDeep(searchType, o.searchType, true) && compareDeep(profile, o.profile, true) && compareDeep(binding, o.binding, true)
1026           && compareDeep(part, o.part, true);
1027      }
1028
1029      @Override
1030      public boolean equalsShallow(Base other_) {
1031        if (!super.equalsShallow(other_))
1032          return false;
1033        if (!(other_ instanceof OperationDefinitionParameterComponent))
1034          return false;
1035        OperationDefinitionParameterComponent o = (OperationDefinitionParameterComponent) other_;
1036        return compareValues(name, o.name, true) && compareValues(use, o.use, true) && compareValues(min, o.min, true)
1037           && compareValues(max, o.max, true) && compareValues(documentation, o.documentation, true) && compareValues(type, o.type, true)
1038           && compareValues(searchType, o.searchType, true);
1039      }
1040
1041      public boolean isEmpty() {
1042        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, use, min, max, documentation
1043          , type, searchType, profile, binding, part);
1044      }
1045
1046  public String fhirType() {
1047    return "OperationDefinition.parameter";
1048
1049  }
1050
1051  }
1052
1053    @Block()
1054    public static class OperationDefinitionParameterBindingComponent extends BackboneElement implements IBaseBackboneElement {
1055        /**
1056         * Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.
1057         */
1058        @Child(name = "strength", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1059        @Description(shortDefinition="required | extensible | preferred | example", formalDefinition="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." )
1060        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/binding-strength")
1061        protected Enumeration<BindingStrength> strength;
1062
1063        /**
1064         * Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.
1065         */
1066        @Child(name = "valueSet", type = {UriType.class, ValueSet.class}, order=2, min=1, max=1, modifier=false, summary=false)
1067        @Description(shortDefinition="Source of value set", formalDefinition="Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used." )
1068        protected Type valueSet;
1069
1070        private static final long serialVersionUID = 857140521L;
1071
1072    /**
1073     * Constructor
1074     */
1075      public OperationDefinitionParameterBindingComponent() {
1076        super();
1077      }
1078
1079    /**
1080     * Constructor
1081     */
1082      public OperationDefinitionParameterBindingComponent(Enumeration<BindingStrength> strength, Type valueSet) {
1083        super();
1084        this.strength = strength;
1085        this.valueSet = valueSet;
1086      }
1087
1088        /**
1089         * @return {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value
1090         */
1091        public Enumeration<BindingStrength> getStrengthElement() { 
1092          if (this.strength == null)
1093            if (Configuration.errorOnAutoCreate())
1094              throw new Error("Attempt to auto-create OperationDefinitionParameterBindingComponent.strength");
1095            else if (Configuration.doAutoCreate())
1096              this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory()); // bb
1097          return this.strength;
1098        }
1099
1100        public boolean hasStrengthElement() { 
1101          return this.strength != null && !this.strength.isEmpty();
1102        }
1103
1104        public boolean hasStrength() { 
1105          return this.strength != null && !this.strength.isEmpty();
1106        }
1107
1108        /**
1109         * @param value {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value
1110         */
1111        public OperationDefinitionParameterBindingComponent setStrengthElement(Enumeration<BindingStrength> value) { 
1112          this.strength = value;
1113          return this;
1114        }
1115
1116        /**
1117         * @return Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.
1118         */
1119        public BindingStrength getStrength() { 
1120          return this.strength == null ? null : this.strength.getValue();
1121        }
1122
1123        /**
1124         * @param value Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.
1125         */
1126        public OperationDefinitionParameterBindingComponent setStrength(BindingStrength value) { 
1127            if (this.strength == null)
1128              this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory());
1129            this.strength.setValue(value);
1130          return this;
1131        }
1132
1133        /**
1134         * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.)
1135         */
1136        public Type getValueSet() { 
1137          return this.valueSet;
1138        }
1139
1140        /**
1141         * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.)
1142         */
1143        public UriType getValueSetUriType() throws FHIRException { 
1144          if (this.valueSet == null)
1145            return null;
1146          if (!(this.valueSet instanceof UriType))
1147            throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.valueSet.getClass().getName()+" was encountered");
1148          return (UriType) this.valueSet;
1149        }
1150
1151        public boolean hasValueSetUriType() { 
1152          return this != null && this.valueSet instanceof UriType;
1153        }
1154
1155        /**
1156         * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.)
1157         */
1158        public Reference getValueSetReference() throws FHIRException { 
1159          if (this.valueSet == null)
1160            return null;
1161          if (!(this.valueSet instanceof Reference))
1162            throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered");
1163          return (Reference) this.valueSet;
1164        }
1165
1166        public boolean hasValueSetReference() { 
1167          return this != null && this.valueSet instanceof Reference;
1168        }
1169
1170        public boolean hasValueSet() { 
1171          return this.valueSet != null && !this.valueSet.isEmpty();
1172        }
1173
1174        /**
1175         * @param value {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.)
1176         */
1177        public OperationDefinitionParameterBindingComponent setValueSet(Type value) throws FHIRFormatError { 
1178          if (value != null && !(value instanceof UriType || value instanceof Reference))
1179            throw new FHIRFormatError("Not the right type for OperationDefinition.parameter.binding.valueSet[x]: "+value.fhirType());
1180          this.valueSet = value;
1181          return this;
1182        }
1183
1184        protected void listChildren(List<Property> children) {
1185          super.listChildren(children);
1186          children.add(new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, 1, strength));
1187          children.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, 1, valueSet));
1188        }
1189
1190        @Override
1191        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1192          switch (_hash) {
1193          case 1791316033: /*strength*/  return new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, 1, strength);
1194          case -1438410321: /*valueSet[x]*/  return new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, 1, valueSet);
1195          case -1410174671: /*valueSet*/  return new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, 1, valueSet);
1196          case -1438416261: /*valueSetUri*/  return new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, 1, valueSet);
1197          case 295220506: /*valueSetReference*/  return new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, 1, valueSet);
1198          default: return super.getNamedProperty(_hash, _name, _checkValid);
1199          }
1200
1201        }
1202
1203      @Override
1204      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1205        switch (hash) {
1206        case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // Enumeration<BindingStrength>
1207        case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // Type
1208        default: return super.getProperty(hash, name, checkValid);
1209        }
1210
1211      }
1212
1213      @Override
1214      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1215        switch (hash) {
1216        case 1791316033: // strength
1217          value = new BindingStrengthEnumFactory().fromType(castToCode(value));
1218          this.strength = (Enumeration) value; // Enumeration<BindingStrength>
1219          return value;
1220        case -1410174671: // valueSet
1221          this.valueSet = castToType(value); // Type
1222          return value;
1223        default: return super.setProperty(hash, name, value);
1224        }
1225
1226      }
1227
1228      @Override
1229      public Base setProperty(String name, Base value) throws FHIRException {
1230        if (name.equals("strength")) {
1231          value = new BindingStrengthEnumFactory().fromType(castToCode(value));
1232          this.strength = (Enumeration) value; // Enumeration<BindingStrength>
1233        } else if (name.equals("valueSet[x]")) {
1234          this.valueSet = castToType(value); // Type
1235        } else
1236          return super.setProperty(name, value);
1237        return value;
1238      }
1239
1240      @Override
1241      public Base makeProperty(int hash, String name) throws FHIRException {
1242        switch (hash) {
1243        case 1791316033:  return getStrengthElement();
1244        case -1438410321:  return getValueSet(); 
1245        case -1410174671:  return getValueSet(); 
1246        default: return super.makeProperty(hash, name);
1247        }
1248
1249      }
1250
1251      @Override
1252      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1253        switch (hash) {
1254        case 1791316033: /*strength*/ return new String[] {"code"};
1255        case -1410174671: /*valueSet*/ return new String[] {"uri", "Reference"};
1256        default: return super.getTypesForProperty(hash, name);
1257        }
1258
1259      }
1260
1261      @Override
1262      public Base addChild(String name) throws FHIRException {
1263        if (name.equals("strength")) {
1264          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.strength");
1265        }
1266        else if (name.equals("valueSetUri")) {
1267          this.valueSet = new UriType();
1268          return this.valueSet;
1269        }
1270        else if (name.equals("valueSetReference")) {
1271          this.valueSet = new Reference();
1272          return this.valueSet;
1273        }
1274        else
1275          return super.addChild(name);
1276      }
1277
1278      public OperationDefinitionParameterBindingComponent copy() {
1279        OperationDefinitionParameterBindingComponent dst = new OperationDefinitionParameterBindingComponent();
1280        copyValues(dst);
1281        dst.strength = strength == null ? null : strength.copy();
1282        dst.valueSet = valueSet == null ? null : valueSet.copy();
1283        return dst;
1284      }
1285
1286      @Override
1287      public boolean equalsDeep(Base other_) {
1288        if (!super.equalsDeep(other_))
1289          return false;
1290        if (!(other_ instanceof OperationDefinitionParameterBindingComponent))
1291          return false;
1292        OperationDefinitionParameterBindingComponent o = (OperationDefinitionParameterBindingComponent) other_;
1293        return compareDeep(strength, o.strength, true) && compareDeep(valueSet, o.valueSet, true);
1294      }
1295
1296      @Override
1297      public boolean equalsShallow(Base other_) {
1298        if (!super.equalsShallow(other_))
1299          return false;
1300        if (!(other_ instanceof OperationDefinitionParameterBindingComponent))
1301          return false;
1302        OperationDefinitionParameterBindingComponent o = (OperationDefinitionParameterBindingComponent) other_;
1303        return compareValues(strength, o.strength, true);
1304      }
1305
1306      public boolean isEmpty() {
1307        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(strength, valueSet);
1308      }
1309
1310  public String fhirType() {
1311    return "OperationDefinition.parameter.binding";
1312
1313  }
1314
1315  }
1316
1317    @Block()
1318    public static class OperationDefinitionOverloadComponent extends BackboneElement implements IBaseBackboneElement {
1319        /**
1320         * Name of parameter to include in overload.
1321         */
1322        @Child(name = "parameterName", type = {StringType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1323        @Description(shortDefinition="Name of parameter to include in overload", formalDefinition="Name of parameter to include in overload." )
1324        protected List<StringType> parameterName;
1325
1326        /**
1327         * Comments to go on overload.
1328         */
1329        @Child(name = "comment", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1330        @Description(shortDefinition="Comments to go on overload", formalDefinition="Comments to go on overload." )
1331        protected StringType comment;
1332
1333        private static final long serialVersionUID = -907948545L;
1334
1335    /**
1336     * Constructor
1337     */
1338      public OperationDefinitionOverloadComponent() {
1339        super();
1340      }
1341
1342        /**
1343         * @return {@link #parameterName} (Name of parameter to include in overload.)
1344         */
1345        public List<StringType> getParameterName() { 
1346          if (this.parameterName == null)
1347            this.parameterName = new ArrayList<StringType>();
1348          return this.parameterName;
1349        }
1350
1351        /**
1352         * @return Returns a reference to <code>this</code> for easy method chaining
1353         */
1354        public OperationDefinitionOverloadComponent setParameterName(List<StringType> theParameterName) { 
1355          this.parameterName = theParameterName;
1356          return this;
1357        }
1358
1359        public boolean hasParameterName() { 
1360          if (this.parameterName == null)
1361            return false;
1362          for (StringType item : this.parameterName)
1363            if (!item.isEmpty())
1364              return true;
1365          return false;
1366        }
1367
1368        /**
1369         * @return {@link #parameterName} (Name of parameter to include in overload.)
1370         */
1371        public StringType addParameterNameElement() {//2 
1372          StringType t = new StringType();
1373          if (this.parameterName == null)
1374            this.parameterName = new ArrayList<StringType>();
1375          this.parameterName.add(t);
1376          return t;
1377        }
1378
1379        /**
1380         * @param value {@link #parameterName} (Name of parameter to include in overload.)
1381         */
1382        public OperationDefinitionOverloadComponent addParameterName(String value) { //1
1383          StringType t = new StringType();
1384          t.setValue(value);
1385          if (this.parameterName == null)
1386            this.parameterName = new ArrayList<StringType>();
1387          this.parameterName.add(t);
1388          return this;
1389        }
1390
1391        /**
1392         * @param value {@link #parameterName} (Name of parameter to include in overload.)
1393         */
1394        public boolean hasParameterName(String value) { 
1395          if (this.parameterName == null)
1396            return false;
1397          for (StringType v : this.parameterName)
1398            if (v.getValue().equals(value)) // string
1399              return true;
1400          return false;
1401        }
1402
1403        /**
1404         * @return {@link #comment} (Comments to go on overload.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
1405         */
1406        public StringType getCommentElement() { 
1407          if (this.comment == null)
1408            if (Configuration.errorOnAutoCreate())
1409              throw new Error("Attempt to auto-create OperationDefinitionOverloadComponent.comment");
1410            else if (Configuration.doAutoCreate())
1411              this.comment = new StringType(); // bb
1412          return this.comment;
1413        }
1414
1415        public boolean hasCommentElement() { 
1416          return this.comment != null && !this.comment.isEmpty();
1417        }
1418
1419        public boolean hasComment() { 
1420          return this.comment != null && !this.comment.isEmpty();
1421        }
1422
1423        /**
1424         * @param value {@link #comment} (Comments to go on overload.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
1425         */
1426        public OperationDefinitionOverloadComponent setCommentElement(StringType value) { 
1427          this.comment = value;
1428          return this;
1429        }
1430
1431        /**
1432         * @return Comments to go on overload.
1433         */
1434        public String getComment() { 
1435          return this.comment == null ? null : this.comment.getValue();
1436        }
1437
1438        /**
1439         * @param value Comments to go on overload.
1440         */
1441        public OperationDefinitionOverloadComponent setComment(String value) { 
1442          if (Utilities.noString(value))
1443            this.comment = null;
1444          else {
1445            if (this.comment == null)
1446              this.comment = new StringType();
1447            this.comment.setValue(value);
1448          }
1449          return this;
1450        }
1451
1452        protected void listChildren(List<Property> children) {
1453          super.listChildren(children);
1454          children.add(new Property("parameterName", "string", "Name of parameter to include in overload.", 0, java.lang.Integer.MAX_VALUE, parameterName));
1455          children.add(new Property("comment", "string", "Comments to go on overload.", 0, 1, comment));
1456        }
1457
1458        @Override
1459        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1460          switch (_hash) {
1461          case -379607596: /*parameterName*/  return new Property("parameterName", "string", "Name of parameter to include in overload.", 0, java.lang.Integer.MAX_VALUE, parameterName);
1462          case 950398559: /*comment*/  return new Property("comment", "string", "Comments to go on overload.", 0, 1, comment);
1463          default: return super.getNamedProperty(_hash, _name, _checkValid);
1464          }
1465
1466        }
1467
1468      @Override
1469      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1470        switch (hash) {
1471        case -379607596: /*parameterName*/ return this.parameterName == null ? new Base[0] : this.parameterName.toArray(new Base[this.parameterName.size()]); // StringType
1472        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
1473        default: return super.getProperty(hash, name, checkValid);
1474        }
1475
1476      }
1477
1478      @Override
1479      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1480        switch (hash) {
1481        case -379607596: // parameterName
1482          this.getParameterName().add(castToString(value)); // StringType
1483          return value;
1484        case 950398559: // comment
1485          this.comment = castToString(value); // StringType
1486          return value;
1487        default: return super.setProperty(hash, name, value);
1488        }
1489
1490      }
1491
1492      @Override
1493      public Base setProperty(String name, Base value) throws FHIRException {
1494        if (name.equals("parameterName")) {
1495          this.getParameterName().add(castToString(value));
1496        } else if (name.equals("comment")) {
1497          this.comment = castToString(value); // StringType
1498        } else
1499          return super.setProperty(name, value);
1500        return value;
1501      }
1502
1503      @Override
1504      public Base makeProperty(int hash, String name) throws FHIRException {
1505        switch (hash) {
1506        case -379607596:  return addParameterNameElement();
1507        case 950398559:  return getCommentElement();
1508        default: return super.makeProperty(hash, name);
1509        }
1510
1511      }
1512
1513      @Override
1514      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1515        switch (hash) {
1516        case -379607596: /*parameterName*/ return new String[] {"string"};
1517        case 950398559: /*comment*/ return new String[] {"string"};
1518        default: return super.getTypesForProperty(hash, name);
1519        }
1520
1521      }
1522
1523      @Override
1524      public Base addChild(String name) throws FHIRException {
1525        if (name.equals("parameterName")) {
1526          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.parameterName");
1527        }
1528        else if (name.equals("comment")) {
1529          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.comment");
1530        }
1531        else
1532          return super.addChild(name);
1533      }
1534
1535      public OperationDefinitionOverloadComponent copy() {
1536        OperationDefinitionOverloadComponent dst = new OperationDefinitionOverloadComponent();
1537        copyValues(dst);
1538        if (parameterName != null) {
1539          dst.parameterName = new ArrayList<StringType>();
1540          for (StringType i : parameterName)
1541            dst.parameterName.add(i.copy());
1542        };
1543        dst.comment = comment == null ? null : comment.copy();
1544        return dst;
1545      }
1546
1547      @Override
1548      public boolean equalsDeep(Base other_) {
1549        if (!super.equalsDeep(other_))
1550          return false;
1551        if (!(other_ instanceof OperationDefinitionOverloadComponent))
1552          return false;
1553        OperationDefinitionOverloadComponent o = (OperationDefinitionOverloadComponent) other_;
1554        return compareDeep(parameterName, o.parameterName, true) && compareDeep(comment, o.comment, true)
1555          ;
1556      }
1557
1558      @Override
1559      public boolean equalsShallow(Base other_) {
1560        if (!super.equalsShallow(other_))
1561          return false;
1562        if (!(other_ instanceof OperationDefinitionOverloadComponent))
1563          return false;
1564        OperationDefinitionOverloadComponent o = (OperationDefinitionOverloadComponent) other_;
1565        return compareValues(parameterName, o.parameterName, true) && compareValues(comment, o.comment, true)
1566          ;
1567      }
1568
1569      public boolean isEmpty() {
1570        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(parameterName, comment);
1571      }
1572
1573  public String fhirType() {
1574    return "OperationDefinition.overload";
1575
1576  }
1577
1578  }
1579
1580    /**
1581     * Whether this is an operation or a named query.
1582     */
1583    @Child(name = "kind", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=false)
1584    @Description(shortDefinition="operation | query", formalDefinition="Whether this is an operation or a named query." )
1585    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/operation-kind")
1586    protected Enumeration<OperationKind> kind;
1587
1588    /**
1589     * Explaination of why this operation definition is needed and why it has been designed as it has.
1590     */
1591    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1592    @Description(shortDefinition="Why this operation definition is defined", formalDefinition="Explaination of why this operation definition is needed and why it has been designed as it has." )
1593    protected MarkdownType purpose;
1594
1595    /**
1596     * Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.
1597     */
1598    @Child(name = "idempotent", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1599    @Description(shortDefinition="Whether content is unchanged by the operation", formalDefinition="Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST." )
1600    protected BooleanType idempotent;
1601
1602    /**
1603     * The name used to invoke the operation.
1604     */
1605    @Child(name = "code", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1606    @Description(shortDefinition="Name used to invoke the operation", formalDefinition="The name used to invoke the operation." )
1607    protected CodeType code;
1608
1609    /**
1610     * Additional information about how to use this operation or named query.
1611     */
1612    @Child(name = "comment", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1613    @Description(shortDefinition="Additional information about use", formalDefinition="Additional information about how to use this operation or named query." )
1614    protected StringType comment;
1615
1616    /**
1617     * Indicates that this operation definition is a constraining profile on the base.
1618     */
1619    @Child(name = "base", type = {OperationDefinition.class}, order=5, min=0, max=1, modifier=false, summary=true)
1620    @Description(shortDefinition="Marks this as a profile of the base", formalDefinition="Indicates that this operation definition is a constraining profile on the base." )
1621    protected Reference base;
1622
1623    /**
1624     * The actual object that is the target of the reference (Indicates that this operation definition is a constraining profile on the base.)
1625     */
1626    protected OperationDefinition baseTarget;
1627
1628    /**
1629     * The types on which this operation can be executed.
1630     */
1631    @Child(name = "resource", type = {CodeType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1632    @Description(shortDefinition="Types this operation applies to", formalDefinition="The types on which this operation can be executed." )
1633    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
1634    protected List<CodeType> resource;
1635
1636    /**
1637     * Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).
1638     */
1639    @Child(name = "system", type = {BooleanType.class}, order=7, min=1, max=1, modifier=false, summary=true)
1640    @Description(shortDefinition="Invoke at the system level?", formalDefinition="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context)." )
1641    protected BooleanType system;
1642
1643    /**
1644     * Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).
1645     */
1646    @Child(name = "type", type = {BooleanType.class}, order=8, min=1, max=1, modifier=false, summary=true)
1647    @Description(shortDefinition="Invole at the type level?", formalDefinition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context)." )
1648    protected BooleanType type;
1649
1650    /**
1651     * Indicates whether this operation can be invoked on a particular instance of one of the given types.
1652     */
1653    @Child(name = "instance", type = {BooleanType.class}, order=9, min=1, max=1, modifier=false, summary=true)
1654    @Description(shortDefinition="Invoke on an instance?", formalDefinition="Indicates whether this operation can be invoked on a particular instance of one of the given types." )
1655    protected BooleanType instance;
1656
1657    /**
1658     * The parameters for the operation/query.
1659     */
1660    @Child(name = "parameter", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1661    @Description(shortDefinition="Parameters for the operation/query", formalDefinition="The parameters for the operation/query." )
1662    protected List<OperationDefinitionParameterComponent> parameter;
1663
1664    /**
1665     * Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.
1666     */
1667    @Child(name = "overload", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1668    @Description(shortDefinition="Define overloaded variants for when  generating code", formalDefinition="Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation." )
1669    protected List<OperationDefinitionOverloadComponent> overload;
1670
1671    private static final long serialVersionUID = 1292377899L;
1672
1673  /**
1674   * Constructor
1675   */
1676    public OperationDefinition() {
1677      super();
1678    }
1679
1680  /**
1681   * Constructor
1682   */
1683    public OperationDefinition(StringType name, Enumeration<PublicationStatus> status, Enumeration<OperationKind> kind, CodeType code, BooleanType system, BooleanType type, BooleanType instance) {
1684      super();
1685      this.name = name;
1686      this.status = status;
1687      this.kind = kind;
1688      this.code = code;
1689      this.system = system;
1690      this.type = type;
1691      this.instance = instance;
1692    }
1693
1694    /**
1695     * @return {@link #url} (An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1696     */
1697    public UriType getUrlElement() { 
1698      if (this.url == null)
1699        if (Configuration.errorOnAutoCreate())
1700          throw new Error("Attempt to auto-create OperationDefinition.url");
1701        else if (Configuration.doAutoCreate())
1702          this.url = new UriType(); // bb
1703      return this.url;
1704    }
1705
1706    public boolean hasUrlElement() { 
1707      return this.url != null && !this.url.isEmpty();
1708    }
1709
1710    public boolean hasUrl() { 
1711      return this.url != null && !this.url.isEmpty();
1712    }
1713
1714    /**
1715     * @param value {@link #url} (An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
1716     */
1717    public OperationDefinition setUrlElement(UriType value) { 
1718      this.url = value;
1719      return this;
1720    }
1721
1722    /**
1723     * @return An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).
1724     */
1725    public String getUrl() { 
1726      return this.url == null ? null : this.url.getValue();
1727    }
1728
1729    /**
1730     * @param value An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).
1731     */
1732    public OperationDefinition setUrl(String value) { 
1733      if (Utilities.noString(value))
1734        this.url = null;
1735      else {
1736        if (this.url == null)
1737          this.url = new UriType();
1738        this.url.setValue(value);
1739      }
1740      return this;
1741    }
1742
1743    /**
1744     * @return {@link #version} (The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1745     */
1746    public StringType getVersionElement() { 
1747      if (this.version == null)
1748        if (Configuration.errorOnAutoCreate())
1749          throw new Error("Attempt to auto-create OperationDefinition.version");
1750        else if (Configuration.doAutoCreate())
1751          this.version = new StringType(); // bb
1752      return this.version;
1753    }
1754
1755    public boolean hasVersionElement() { 
1756      return this.version != null && !this.version.isEmpty();
1757    }
1758
1759    public boolean hasVersion() { 
1760      return this.version != null && !this.version.isEmpty();
1761    }
1762
1763    /**
1764     * @param value {@link #version} (The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
1765     */
1766    public OperationDefinition setVersionElement(StringType value) { 
1767      this.version = value;
1768      return this;
1769    }
1770
1771    /**
1772     * @return The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
1773     */
1774    public String getVersion() { 
1775      return this.version == null ? null : this.version.getValue();
1776    }
1777
1778    /**
1779     * @param value The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.
1780     */
1781    public OperationDefinition setVersion(String value) { 
1782      if (Utilities.noString(value))
1783        this.version = null;
1784      else {
1785        if (this.version == null)
1786          this.version = new StringType();
1787        this.version.setValue(value);
1788      }
1789      return this;
1790    }
1791
1792    /**
1793     * @return {@link #name} (A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1794     */
1795    public StringType getNameElement() { 
1796      if (this.name == null)
1797        if (Configuration.errorOnAutoCreate())
1798          throw new Error("Attempt to auto-create OperationDefinition.name");
1799        else if (Configuration.doAutoCreate())
1800          this.name = new StringType(); // bb
1801      return this.name;
1802    }
1803
1804    public boolean hasNameElement() { 
1805      return this.name != null && !this.name.isEmpty();
1806    }
1807
1808    public boolean hasName() { 
1809      return this.name != null && !this.name.isEmpty();
1810    }
1811
1812    /**
1813     * @param value {@link #name} (A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
1814     */
1815    public OperationDefinition setNameElement(StringType value) { 
1816      this.name = value;
1817      return this;
1818    }
1819
1820    /**
1821     * @return A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1822     */
1823    public String getName() { 
1824      return this.name == null ? null : this.name.getValue();
1825    }
1826
1827    /**
1828     * @param value A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
1829     */
1830    public OperationDefinition setName(String value) { 
1831        if (this.name == null)
1832          this.name = new StringType();
1833        this.name.setValue(value);
1834      return this;
1835    }
1836
1837    /**
1838     * @return {@link #status} (The status of this operation definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1839     */
1840    public Enumeration<PublicationStatus> getStatusElement() { 
1841      if (this.status == null)
1842        if (Configuration.errorOnAutoCreate())
1843          throw new Error("Attempt to auto-create OperationDefinition.status");
1844        else if (Configuration.doAutoCreate())
1845          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
1846      return this.status;
1847    }
1848
1849    public boolean hasStatusElement() { 
1850      return this.status != null && !this.status.isEmpty();
1851    }
1852
1853    public boolean hasStatus() { 
1854      return this.status != null && !this.status.isEmpty();
1855    }
1856
1857    /**
1858     * @param value {@link #status} (The status of this operation definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
1859     */
1860    public OperationDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
1861      this.status = value;
1862      return this;
1863    }
1864
1865    /**
1866     * @return The status of this operation definition. Enables tracking the life-cycle of the content.
1867     */
1868    public PublicationStatus getStatus() { 
1869      return this.status == null ? null : this.status.getValue();
1870    }
1871
1872    /**
1873     * @param value The status of this operation definition. Enables tracking the life-cycle of the content.
1874     */
1875    public OperationDefinition setStatus(PublicationStatus value) { 
1876        if (this.status == null)
1877          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
1878        this.status.setValue(value);
1879      return this;
1880    }
1881
1882    /**
1883     * @return {@link #kind} (Whether this is an operation or a named query.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
1884     */
1885    public Enumeration<OperationKind> getKindElement() { 
1886      if (this.kind == null)
1887        if (Configuration.errorOnAutoCreate())
1888          throw new Error("Attempt to auto-create OperationDefinition.kind");
1889        else if (Configuration.doAutoCreate())
1890          this.kind = new Enumeration<OperationKind>(new OperationKindEnumFactory()); // bb
1891      return this.kind;
1892    }
1893
1894    public boolean hasKindElement() { 
1895      return this.kind != null && !this.kind.isEmpty();
1896    }
1897
1898    public boolean hasKind() { 
1899      return this.kind != null && !this.kind.isEmpty();
1900    }
1901
1902    /**
1903     * @param value {@link #kind} (Whether this is an operation or a named query.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
1904     */
1905    public OperationDefinition setKindElement(Enumeration<OperationKind> value) { 
1906      this.kind = value;
1907      return this;
1908    }
1909
1910    /**
1911     * @return Whether this is an operation or a named query.
1912     */
1913    public OperationKind getKind() { 
1914      return this.kind == null ? null : this.kind.getValue();
1915    }
1916
1917    /**
1918     * @param value Whether this is an operation or a named query.
1919     */
1920    public OperationDefinition setKind(OperationKind value) { 
1921        if (this.kind == null)
1922          this.kind = new Enumeration<OperationKind>(new OperationKindEnumFactory());
1923        this.kind.setValue(value);
1924      return this;
1925    }
1926
1927    /**
1928     * @return {@link #experimental} (A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
1929     */
1930    public BooleanType getExperimentalElement() { 
1931      if (this.experimental == null)
1932        if (Configuration.errorOnAutoCreate())
1933          throw new Error("Attempt to auto-create OperationDefinition.experimental");
1934        else if (Configuration.doAutoCreate())
1935          this.experimental = new BooleanType(); // bb
1936      return this.experimental;
1937    }
1938
1939    public boolean hasExperimentalElement() { 
1940      return this.experimental != null && !this.experimental.isEmpty();
1941    }
1942
1943    public boolean hasExperimental() { 
1944      return this.experimental != null && !this.experimental.isEmpty();
1945    }
1946
1947    /**
1948     * @param value {@link #experimental} (A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value
1949     */
1950    public OperationDefinition setExperimentalElement(BooleanType value) { 
1951      this.experimental = value;
1952      return this;
1953    }
1954
1955    /**
1956     * @return A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
1957     */
1958    public boolean getExperimental() { 
1959      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
1960    }
1961
1962    /**
1963     * @param value A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
1964     */
1965    public OperationDefinition setExperimental(boolean value) { 
1966        if (this.experimental == null)
1967          this.experimental = new BooleanType();
1968        this.experimental.setValue(value);
1969      return this;
1970    }
1971
1972    /**
1973     * @return {@link #date} (The date  (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1974     */
1975    public DateTimeType getDateElement() { 
1976      if (this.date == null)
1977        if (Configuration.errorOnAutoCreate())
1978          throw new Error("Attempt to auto-create OperationDefinition.date");
1979        else if (Configuration.doAutoCreate())
1980          this.date = new DateTimeType(); // bb
1981      return this.date;
1982    }
1983
1984    public boolean hasDateElement() { 
1985      return this.date != null && !this.date.isEmpty();
1986    }
1987
1988    public boolean hasDate() { 
1989      return this.date != null && !this.date.isEmpty();
1990    }
1991
1992    /**
1993     * @param value {@link #date} (The date  (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value
1994     */
1995    public OperationDefinition setDateElement(DateTimeType value) { 
1996      this.date = value;
1997      return this;
1998    }
1999
2000    /**
2001     * @return The date  (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.
2002     */
2003    public Date getDate() { 
2004      return this.date == null ? null : this.date.getValue();
2005    }
2006
2007    /**
2008     * @param value The date  (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.
2009     */
2010    public OperationDefinition setDate(Date value) { 
2011      if (value == null)
2012        this.date = null;
2013      else {
2014        if (this.date == null)
2015          this.date = new DateTimeType();
2016        this.date.setValue(value);
2017      }
2018      return this;
2019    }
2020
2021    /**
2022     * @return {@link #publisher} (The name of the individual or organization that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2023     */
2024    public StringType getPublisherElement() { 
2025      if (this.publisher == null)
2026        if (Configuration.errorOnAutoCreate())
2027          throw new Error("Attempt to auto-create OperationDefinition.publisher");
2028        else if (Configuration.doAutoCreate())
2029          this.publisher = new StringType(); // bb
2030      return this.publisher;
2031    }
2032
2033    public boolean hasPublisherElement() { 
2034      return this.publisher != null && !this.publisher.isEmpty();
2035    }
2036
2037    public boolean hasPublisher() { 
2038      return this.publisher != null && !this.publisher.isEmpty();
2039    }
2040
2041    /**
2042     * @param value {@link #publisher} (The name of the individual or organization that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2043     */
2044    public OperationDefinition setPublisherElement(StringType value) { 
2045      this.publisher = value;
2046      return this;
2047    }
2048
2049    /**
2050     * @return The name of the individual or organization that published the operation definition.
2051     */
2052    public String getPublisher() { 
2053      return this.publisher == null ? null : this.publisher.getValue();
2054    }
2055
2056    /**
2057     * @param value The name of the individual or organization that published the operation definition.
2058     */
2059    public OperationDefinition setPublisher(String value) { 
2060      if (Utilities.noString(value))
2061        this.publisher = null;
2062      else {
2063        if (this.publisher == null)
2064          this.publisher = new StringType();
2065        this.publisher.setValue(value);
2066      }
2067      return this;
2068    }
2069
2070    /**
2071     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2072     */
2073    public List<ContactDetail> getContact() { 
2074      if (this.contact == null)
2075        this.contact = new ArrayList<ContactDetail>();
2076      return this.contact;
2077    }
2078
2079    /**
2080     * @return Returns a reference to <code>this</code> for easy method chaining
2081     */
2082    public OperationDefinition setContact(List<ContactDetail> theContact) { 
2083      this.contact = theContact;
2084      return this;
2085    }
2086
2087    public boolean hasContact() { 
2088      if (this.contact == null)
2089        return false;
2090      for (ContactDetail item : this.contact)
2091        if (!item.isEmpty())
2092          return true;
2093      return false;
2094    }
2095
2096    public ContactDetail addContact() { //3
2097      ContactDetail t = new ContactDetail();
2098      if (this.contact == null)
2099        this.contact = new ArrayList<ContactDetail>();
2100      this.contact.add(t);
2101      return t;
2102    }
2103
2104    public OperationDefinition addContact(ContactDetail t) { //3
2105      if (t == null)
2106        return this;
2107      if (this.contact == null)
2108        this.contact = new ArrayList<ContactDetail>();
2109      this.contact.add(t);
2110      return this;
2111    }
2112
2113    /**
2114     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
2115     */
2116    public ContactDetail getContactFirstRep() { 
2117      if (getContact().isEmpty()) {
2118        addContact();
2119      }
2120      return getContact().get(0);
2121    }
2122
2123    /**
2124     * @return {@link #description} (A free text natural language description of the operation definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2125     */
2126    public MarkdownType getDescriptionElement() { 
2127      if (this.description == null)
2128        if (Configuration.errorOnAutoCreate())
2129          throw new Error("Attempt to auto-create OperationDefinition.description");
2130        else if (Configuration.doAutoCreate())
2131          this.description = new MarkdownType(); // bb
2132      return this.description;
2133    }
2134
2135    public boolean hasDescriptionElement() { 
2136      return this.description != null && !this.description.isEmpty();
2137    }
2138
2139    public boolean hasDescription() { 
2140      return this.description != null && !this.description.isEmpty();
2141    }
2142
2143    /**
2144     * @param value {@link #description} (A free text natural language description of the operation definition from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
2145     */
2146    public OperationDefinition setDescriptionElement(MarkdownType value) { 
2147      this.description = value;
2148      return this;
2149    }
2150
2151    /**
2152     * @return A free text natural language description of the operation definition from a consumer's perspective.
2153     */
2154    public String getDescription() { 
2155      return this.description == null ? null : this.description.getValue();
2156    }
2157
2158    /**
2159     * @param value A free text natural language description of the operation definition from a consumer's perspective.
2160     */
2161    public OperationDefinition setDescription(String value) { 
2162      if (value == null)
2163        this.description = null;
2164      else {
2165        if (this.description == null)
2166          this.description = new MarkdownType();
2167        this.description.setValue(value);
2168      }
2169      return this;
2170    }
2171
2172    /**
2173     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances.)
2174     */
2175    public List<UsageContext> getUseContext() { 
2176      if (this.useContext == null)
2177        this.useContext = new ArrayList<UsageContext>();
2178      return this.useContext;
2179    }
2180
2181    /**
2182     * @return Returns a reference to <code>this</code> for easy method chaining
2183     */
2184    public OperationDefinition setUseContext(List<UsageContext> theUseContext) { 
2185      this.useContext = theUseContext;
2186      return this;
2187    }
2188
2189    public boolean hasUseContext() { 
2190      if (this.useContext == null)
2191        return false;
2192      for (UsageContext item : this.useContext)
2193        if (!item.isEmpty())
2194          return true;
2195      return false;
2196    }
2197
2198    public UsageContext addUseContext() { //3
2199      UsageContext t = new UsageContext();
2200      if (this.useContext == null)
2201        this.useContext = new ArrayList<UsageContext>();
2202      this.useContext.add(t);
2203      return t;
2204    }
2205
2206    public OperationDefinition addUseContext(UsageContext t) { //3
2207      if (t == null)
2208        return this;
2209      if (this.useContext == null)
2210        this.useContext = new ArrayList<UsageContext>();
2211      this.useContext.add(t);
2212      return this;
2213    }
2214
2215    /**
2216     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
2217     */
2218    public UsageContext getUseContextFirstRep() { 
2219      if (getUseContext().isEmpty()) {
2220        addUseContext();
2221      }
2222      return getUseContext().get(0);
2223    }
2224
2225    /**
2226     * @return {@link #jurisdiction} (A legal or geographic region in which the operation definition is intended to be used.)
2227     */
2228    public List<CodeableConcept> getJurisdiction() { 
2229      if (this.jurisdiction == null)
2230        this.jurisdiction = new ArrayList<CodeableConcept>();
2231      return this.jurisdiction;
2232    }
2233
2234    /**
2235     * @return Returns a reference to <code>this</code> for easy method chaining
2236     */
2237    public OperationDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
2238      this.jurisdiction = theJurisdiction;
2239      return this;
2240    }
2241
2242    public boolean hasJurisdiction() { 
2243      if (this.jurisdiction == null)
2244        return false;
2245      for (CodeableConcept item : this.jurisdiction)
2246        if (!item.isEmpty())
2247          return true;
2248      return false;
2249    }
2250
2251    public CodeableConcept addJurisdiction() { //3
2252      CodeableConcept t = new CodeableConcept();
2253      if (this.jurisdiction == null)
2254        this.jurisdiction = new ArrayList<CodeableConcept>();
2255      this.jurisdiction.add(t);
2256      return t;
2257    }
2258
2259    public OperationDefinition addJurisdiction(CodeableConcept t) { //3
2260      if (t == null)
2261        return this;
2262      if (this.jurisdiction == null)
2263        this.jurisdiction = new ArrayList<CodeableConcept>();
2264      this.jurisdiction.add(t);
2265      return this;
2266    }
2267
2268    /**
2269     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
2270     */
2271    public CodeableConcept getJurisdictionFirstRep() { 
2272      if (getJurisdiction().isEmpty()) {
2273        addJurisdiction();
2274      }
2275      return getJurisdiction().get(0);
2276    }
2277
2278    /**
2279     * @return {@link #purpose} (Explaination of why this operation definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2280     */
2281    public MarkdownType getPurposeElement() { 
2282      if (this.purpose == null)
2283        if (Configuration.errorOnAutoCreate())
2284          throw new Error("Attempt to auto-create OperationDefinition.purpose");
2285        else if (Configuration.doAutoCreate())
2286          this.purpose = new MarkdownType(); // bb
2287      return this.purpose;
2288    }
2289
2290    public boolean hasPurposeElement() { 
2291      return this.purpose != null && !this.purpose.isEmpty();
2292    }
2293
2294    public boolean hasPurpose() { 
2295      return this.purpose != null && !this.purpose.isEmpty();
2296    }
2297
2298    /**
2299     * @param value {@link #purpose} (Explaination of why this operation definition is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value
2300     */
2301    public OperationDefinition setPurposeElement(MarkdownType value) { 
2302      this.purpose = value;
2303      return this;
2304    }
2305
2306    /**
2307     * @return Explaination of why this operation definition is needed and why it has been designed as it has.
2308     */
2309    public String getPurpose() { 
2310      return this.purpose == null ? null : this.purpose.getValue();
2311    }
2312
2313    /**
2314     * @param value Explaination of why this operation definition is needed and why it has been designed as it has.
2315     */
2316    public OperationDefinition setPurpose(String value) { 
2317      if (value == null)
2318        this.purpose = null;
2319      else {
2320        if (this.purpose == null)
2321          this.purpose = new MarkdownType();
2322        this.purpose.setValue(value);
2323      }
2324      return this;
2325    }
2326
2327    /**
2328     * @return {@link #idempotent} (Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.). This is the underlying object with id, value and extensions. The accessor "getIdempotent" gives direct access to the value
2329     */
2330    public BooleanType getIdempotentElement() { 
2331      if (this.idempotent == null)
2332        if (Configuration.errorOnAutoCreate())
2333          throw new Error("Attempt to auto-create OperationDefinition.idempotent");
2334        else if (Configuration.doAutoCreate())
2335          this.idempotent = new BooleanType(); // bb
2336      return this.idempotent;
2337    }
2338
2339    public boolean hasIdempotentElement() { 
2340      return this.idempotent != null && !this.idempotent.isEmpty();
2341    }
2342
2343    public boolean hasIdempotent() { 
2344      return this.idempotent != null && !this.idempotent.isEmpty();
2345    }
2346
2347    /**
2348     * @param value {@link #idempotent} (Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.). This is the underlying object with id, value and extensions. The accessor "getIdempotent" gives direct access to the value
2349     */
2350    public OperationDefinition setIdempotentElement(BooleanType value) { 
2351      this.idempotent = value;
2352      return this;
2353    }
2354
2355    /**
2356     * @return Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.
2357     */
2358    public boolean getIdempotent() { 
2359      return this.idempotent == null || this.idempotent.isEmpty() ? false : this.idempotent.getValue();
2360    }
2361
2362    /**
2363     * @param value Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.
2364     */
2365    public OperationDefinition setIdempotent(boolean value) { 
2366        if (this.idempotent == null)
2367          this.idempotent = new BooleanType();
2368        this.idempotent.setValue(value);
2369      return this;
2370    }
2371
2372    /**
2373     * @return {@link #code} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
2374     */
2375    public CodeType getCodeElement() { 
2376      if (this.code == null)
2377        if (Configuration.errorOnAutoCreate())
2378          throw new Error("Attempt to auto-create OperationDefinition.code");
2379        else if (Configuration.doAutoCreate())
2380          this.code = new CodeType(); // bb
2381      return this.code;
2382    }
2383
2384    public boolean hasCodeElement() { 
2385      return this.code != null && !this.code.isEmpty();
2386    }
2387
2388    public boolean hasCode() { 
2389      return this.code != null && !this.code.isEmpty();
2390    }
2391
2392    /**
2393     * @param value {@link #code} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value
2394     */
2395    public OperationDefinition setCodeElement(CodeType value) { 
2396      this.code = value;
2397      return this;
2398    }
2399
2400    /**
2401     * @return The name used to invoke the operation.
2402     */
2403    public String getCode() { 
2404      return this.code == null ? null : this.code.getValue();
2405    }
2406
2407    /**
2408     * @param value The name used to invoke the operation.
2409     */
2410    public OperationDefinition setCode(String value) { 
2411        if (this.code == null)
2412          this.code = new CodeType();
2413        this.code.setValue(value);
2414      return this;
2415    }
2416
2417    /**
2418     * @return {@link #comment} (Additional information about how to use this operation or named query.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
2419     */
2420    public StringType getCommentElement() { 
2421      if (this.comment == null)
2422        if (Configuration.errorOnAutoCreate())
2423          throw new Error("Attempt to auto-create OperationDefinition.comment");
2424        else if (Configuration.doAutoCreate())
2425          this.comment = new StringType(); // bb
2426      return this.comment;
2427    }
2428
2429    public boolean hasCommentElement() { 
2430      return this.comment != null && !this.comment.isEmpty();
2431    }
2432
2433    public boolean hasComment() { 
2434      return this.comment != null && !this.comment.isEmpty();
2435    }
2436
2437    /**
2438     * @param value {@link #comment} (Additional information about how to use this operation or named query.). This is the underlying object with id, value and extensions. The accessor "getComment" gives direct access to the value
2439     */
2440    public OperationDefinition setCommentElement(StringType value) { 
2441      this.comment = value;
2442      return this;
2443    }
2444
2445    /**
2446     * @return Additional information about how to use this operation or named query.
2447     */
2448    public String getComment() { 
2449      return this.comment == null ? null : this.comment.getValue();
2450    }
2451
2452    /**
2453     * @param value Additional information about how to use this operation or named query.
2454     */
2455    public OperationDefinition setComment(String value) { 
2456      if (Utilities.noString(value))
2457        this.comment = null;
2458      else {
2459        if (this.comment == null)
2460          this.comment = new StringType();
2461        this.comment.setValue(value);
2462      }
2463      return this;
2464    }
2465
2466    /**
2467     * @return {@link #base} (Indicates that this operation definition is a constraining profile on the base.)
2468     */
2469    public Reference getBase() { 
2470      if (this.base == null)
2471        if (Configuration.errorOnAutoCreate())
2472          throw new Error("Attempt to auto-create OperationDefinition.base");
2473        else if (Configuration.doAutoCreate())
2474          this.base = new Reference(); // cc
2475      return this.base;
2476    }
2477
2478    public boolean hasBase() { 
2479      return this.base != null && !this.base.isEmpty();
2480    }
2481
2482    /**
2483     * @param value {@link #base} (Indicates that this operation definition is a constraining profile on the base.)
2484     */
2485    public OperationDefinition setBase(Reference value)  { 
2486      this.base = value;
2487      return this;
2488    }
2489
2490    /**
2491     * @return {@link #base} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Indicates that this operation definition is a constraining profile on the base.)
2492     */
2493    public OperationDefinition getBaseTarget() { 
2494      if (this.baseTarget == null)
2495        if (Configuration.errorOnAutoCreate())
2496          throw new Error("Attempt to auto-create OperationDefinition.base");
2497        else if (Configuration.doAutoCreate())
2498          this.baseTarget = new OperationDefinition(); // aa
2499      return this.baseTarget;
2500    }
2501
2502    /**
2503     * @param value {@link #base} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Indicates that this operation definition is a constraining profile on the base.)
2504     */
2505    public OperationDefinition setBaseTarget(OperationDefinition value) { 
2506      this.baseTarget = value;
2507      return this;
2508    }
2509
2510    /**
2511     * @return {@link #resource} (The types on which this operation can be executed.)
2512     */
2513    public List<CodeType> getResource() { 
2514      if (this.resource == null)
2515        this.resource = new ArrayList<CodeType>();
2516      return this.resource;
2517    }
2518
2519    /**
2520     * @return Returns a reference to <code>this</code> for easy method chaining
2521     */
2522    public OperationDefinition setResource(List<CodeType> theResource) { 
2523      this.resource = theResource;
2524      return this;
2525    }
2526
2527    public boolean hasResource() { 
2528      if (this.resource == null)
2529        return false;
2530      for (CodeType item : this.resource)
2531        if (!item.isEmpty())
2532          return true;
2533      return false;
2534    }
2535
2536    /**
2537     * @return {@link #resource} (The types on which this operation can be executed.)
2538     */
2539    public CodeType addResourceElement() {//2 
2540      CodeType t = new CodeType();
2541      if (this.resource == null)
2542        this.resource = new ArrayList<CodeType>();
2543      this.resource.add(t);
2544      return t;
2545    }
2546
2547    /**
2548     * @param value {@link #resource} (The types on which this operation can be executed.)
2549     */
2550    public OperationDefinition addResource(String value) { //1
2551      CodeType t = new CodeType();
2552      t.setValue(value);
2553      if (this.resource == null)
2554        this.resource = new ArrayList<CodeType>();
2555      this.resource.add(t);
2556      return this;
2557    }
2558
2559    /**
2560     * @param value {@link #resource} (The types on which this operation can be executed.)
2561     */
2562    public boolean hasResource(String value) { 
2563      if (this.resource == null)
2564        return false;
2565      for (CodeType v : this.resource)
2566        if (v.getValue().equals(value)) // code
2567          return true;
2568      return false;
2569    }
2570
2571    /**
2572     * @return {@link #system} (Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
2573     */
2574    public BooleanType getSystemElement() { 
2575      if (this.system == null)
2576        if (Configuration.errorOnAutoCreate())
2577          throw new Error("Attempt to auto-create OperationDefinition.system");
2578        else if (Configuration.doAutoCreate())
2579          this.system = new BooleanType(); // bb
2580      return this.system;
2581    }
2582
2583    public boolean hasSystemElement() { 
2584      return this.system != null && !this.system.isEmpty();
2585    }
2586
2587    public boolean hasSystem() { 
2588      return this.system != null && !this.system.isEmpty();
2589    }
2590
2591    /**
2592     * @param value {@link #system} (Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value
2593     */
2594    public OperationDefinition setSystemElement(BooleanType value) { 
2595      this.system = value;
2596      return this;
2597    }
2598
2599    /**
2600     * @return Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).
2601     */
2602    public boolean getSystem() { 
2603      return this.system == null || this.system.isEmpty() ? false : this.system.getValue();
2604    }
2605
2606    /**
2607     * @param value Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).
2608     */
2609    public OperationDefinition setSystem(boolean value) { 
2610        if (this.system == null)
2611          this.system = new BooleanType();
2612        this.system.setValue(value);
2613      return this;
2614    }
2615
2616    /**
2617     * @return {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2618     */
2619    public BooleanType getTypeElement() { 
2620      if (this.type == null)
2621        if (Configuration.errorOnAutoCreate())
2622          throw new Error("Attempt to auto-create OperationDefinition.type");
2623        else if (Configuration.doAutoCreate())
2624          this.type = new BooleanType(); // bb
2625      return this.type;
2626    }
2627
2628    public boolean hasTypeElement() { 
2629      return this.type != null && !this.type.isEmpty();
2630    }
2631
2632    public boolean hasType() { 
2633      return this.type != null && !this.type.isEmpty();
2634    }
2635
2636    /**
2637     * @param value {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
2638     */
2639    public OperationDefinition setTypeElement(BooleanType value) { 
2640      this.type = value;
2641      return this;
2642    }
2643
2644    /**
2645     * @return Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).
2646     */
2647    public boolean getType() { 
2648      return this.type == null || this.type.isEmpty() ? false : this.type.getValue();
2649    }
2650
2651    /**
2652     * @param value Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).
2653     */
2654    public OperationDefinition setType(boolean value) { 
2655        if (this.type == null)
2656          this.type = new BooleanType();
2657        this.type.setValue(value);
2658      return this;
2659    }
2660
2661    /**
2662     * @return {@link #instance} (Indicates whether this operation can be invoked on a particular instance of one of the given types.). This is the underlying object with id, value and extensions. The accessor "getInstance" gives direct access to the value
2663     */
2664    public BooleanType getInstanceElement() { 
2665      if (this.instance == null)
2666        if (Configuration.errorOnAutoCreate())
2667          throw new Error("Attempt to auto-create OperationDefinition.instance");
2668        else if (Configuration.doAutoCreate())
2669          this.instance = new BooleanType(); // bb
2670      return this.instance;
2671    }
2672
2673    public boolean hasInstanceElement() { 
2674      return this.instance != null && !this.instance.isEmpty();
2675    }
2676
2677    public boolean hasInstance() { 
2678      return this.instance != null && !this.instance.isEmpty();
2679    }
2680
2681    /**
2682     * @param value {@link #instance} (Indicates whether this operation can be invoked on a particular instance of one of the given types.). This is the underlying object with id, value and extensions. The accessor "getInstance" gives direct access to the value
2683     */
2684    public OperationDefinition setInstanceElement(BooleanType value) { 
2685      this.instance = value;
2686      return this;
2687    }
2688
2689    /**
2690     * @return Indicates whether this operation can be invoked on a particular instance of one of the given types.
2691     */
2692    public boolean getInstance() { 
2693      return this.instance == null || this.instance.isEmpty() ? false : this.instance.getValue();
2694    }
2695
2696    /**
2697     * @param value Indicates whether this operation can be invoked on a particular instance of one of the given types.
2698     */
2699    public OperationDefinition setInstance(boolean value) { 
2700        if (this.instance == null)
2701          this.instance = new BooleanType();
2702        this.instance.setValue(value);
2703      return this;
2704    }
2705
2706    /**
2707     * @return {@link #parameter} (The parameters for the operation/query.)
2708     */
2709    public List<OperationDefinitionParameterComponent> getParameter() { 
2710      if (this.parameter == null)
2711        this.parameter = new ArrayList<OperationDefinitionParameterComponent>();
2712      return this.parameter;
2713    }
2714
2715    /**
2716     * @return Returns a reference to <code>this</code> for easy method chaining
2717     */
2718    public OperationDefinition setParameter(List<OperationDefinitionParameterComponent> theParameter) { 
2719      this.parameter = theParameter;
2720      return this;
2721    }
2722
2723    public boolean hasParameter() { 
2724      if (this.parameter == null)
2725        return false;
2726      for (OperationDefinitionParameterComponent item : this.parameter)
2727        if (!item.isEmpty())
2728          return true;
2729      return false;
2730    }
2731
2732    public OperationDefinitionParameterComponent addParameter() { //3
2733      OperationDefinitionParameterComponent t = new OperationDefinitionParameterComponent();
2734      if (this.parameter == null)
2735        this.parameter = new ArrayList<OperationDefinitionParameterComponent>();
2736      this.parameter.add(t);
2737      return t;
2738    }
2739
2740    public OperationDefinition addParameter(OperationDefinitionParameterComponent t) { //3
2741      if (t == null)
2742        return this;
2743      if (this.parameter == null)
2744        this.parameter = new ArrayList<OperationDefinitionParameterComponent>();
2745      this.parameter.add(t);
2746      return this;
2747    }
2748
2749    /**
2750     * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist
2751     */
2752    public OperationDefinitionParameterComponent getParameterFirstRep() { 
2753      if (getParameter().isEmpty()) {
2754        addParameter();
2755      }
2756      return getParameter().get(0);
2757    }
2758
2759    /**
2760     * @return {@link #overload} (Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.)
2761     */
2762    public List<OperationDefinitionOverloadComponent> getOverload() { 
2763      if (this.overload == null)
2764        this.overload = new ArrayList<OperationDefinitionOverloadComponent>();
2765      return this.overload;
2766    }
2767
2768    /**
2769     * @return Returns a reference to <code>this</code> for easy method chaining
2770     */
2771    public OperationDefinition setOverload(List<OperationDefinitionOverloadComponent> theOverload) { 
2772      this.overload = theOverload;
2773      return this;
2774    }
2775
2776    public boolean hasOverload() { 
2777      if (this.overload == null)
2778        return false;
2779      for (OperationDefinitionOverloadComponent item : this.overload)
2780        if (!item.isEmpty())
2781          return true;
2782      return false;
2783    }
2784
2785    public OperationDefinitionOverloadComponent addOverload() { //3
2786      OperationDefinitionOverloadComponent t = new OperationDefinitionOverloadComponent();
2787      if (this.overload == null)
2788        this.overload = new ArrayList<OperationDefinitionOverloadComponent>();
2789      this.overload.add(t);
2790      return t;
2791    }
2792
2793    public OperationDefinition addOverload(OperationDefinitionOverloadComponent t) { //3
2794      if (t == null)
2795        return this;
2796      if (this.overload == null)
2797        this.overload = new ArrayList<OperationDefinitionOverloadComponent>();
2798      this.overload.add(t);
2799      return this;
2800    }
2801
2802    /**
2803     * @return The first repetition of repeating field {@link #overload}, creating it if it does not already exist
2804     */
2805    public OperationDefinitionOverloadComponent getOverloadFirstRep() { 
2806      if (getOverload().isEmpty()) {
2807        addOverload();
2808      }
2809      return getOverload().get(0);
2810    }
2811
2812      protected void listChildren(List<Property> children) {
2813        super.listChildren(children);
2814        children.add(new Property("url", "uri", "An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url));
2815        children.add(new Property("version", "string", "The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version));
2816        children.add(new Property("name", "string", "A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name));
2817        children.add(new Property("status", "code", "The status of this operation definition. Enables tracking the life-cycle of the content.", 0, 1, status));
2818        children.add(new Property("kind", "code", "Whether this is an operation or a named query.", 0, 1, kind));
2819        children.add(new Property("experimental", "boolean", "A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental));
2820        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.", 0, 1, date));
2821        children.add(new Property("publisher", "string", "The name of the individual or organization that published the operation definition.", 0, 1, publisher));
2822        children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact));
2823        children.add(new Property("description", "markdown", "A free text natural language description of the operation definition from a consumer's perspective.", 0, 1, description));
2824        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
2825        children.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the operation definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction));
2826        children.add(new Property("purpose", "markdown", "Explaination of why this operation definition is needed and why it has been designed as it has.", 0, 1, purpose));
2827        children.add(new Property("idempotent", "boolean", "Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.", 0, 1, idempotent));
2828        children.add(new Property("code", "code", "The name used to invoke the operation.", 0, 1, code));
2829        children.add(new Property("comment", "string", "Additional information about how to use this operation or named query.", 0, 1, comment));
2830        children.add(new Property("base", "Reference(OperationDefinition)", "Indicates that this operation definition is a constraining profile on the base.", 0, 1, base));
2831        children.add(new Property("resource", "code", "The types on which this operation can be executed.", 0, java.lang.Integer.MAX_VALUE, resource));
2832        children.add(new Property("system", "boolean", "Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).", 0, 1, system));
2833        children.add(new Property("type", "boolean", "Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).", 0, 1, type));
2834        children.add(new Property("instance", "boolean", "Indicates whether this operation can be invoked on a particular instance of one of the given types.", 0, 1, instance));
2835        children.add(new Property("parameter", "", "The parameters for the operation/query.", 0, java.lang.Integer.MAX_VALUE, parameter));
2836        children.add(new Property("overload", "", "Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.", 0, java.lang.Integer.MAX_VALUE, overload));
2837      }
2838
2839      @Override
2840      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
2841        switch (_hash) {
2842        case 116079: /*url*/  return new Property("url", "uri", "An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. The URL SHOULD include the major version of the operation definition. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url);
2843        case 351608024: /*version*/  return new Property("version", "string", "The identifier that is used to identify this version of the operation definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the operation definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, 1, version);
2844        case 3373707: /*name*/  return new Property("name", "string", "A natural language name identifying the operation definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, 1, name);
2845        case -892481550: /*status*/  return new Property("status", "code", "The status of this operation definition. Enables tracking the life-cycle of the content.", 0, 1, status);
2846        case 3292052: /*kind*/  return new Property("kind", "code", "Whether this is an operation or a named query.", 0, 1, kind);
2847        case -404562712: /*experimental*/  return new Property("experimental", "boolean", "A boolean value to indicate that this operation definition is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, 1, experimental);
2848        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the operation definition was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the operation definition changes.", 0, 1, date);
2849        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the individual or organization that published the operation definition.", 0, 1, publisher);
2850        case 951526432: /*contact*/  return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact);
2851        case -1724546052: /*description*/  return new Property("description", "markdown", "A free text natural language description of the operation definition from a consumer's perspective.", 0, 1, description);
2852        case -669707736: /*useContext*/  return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate operation definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
2853        case -507075711: /*jurisdiction*/  return new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the operation definition is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction);
2854        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explaination of why this operation definition is needed and why it has been designed as it has.", 0, 1, purpose);
2855        case 1680468793: /*idempotent*/  return new Property("idempotent", "boolean", "Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.", 0, 1, idempotent);
2856        case 3059181: /*code*/  return new Property("code", "code", "The name used to invoke the operation.", 0, 1, code);
2857        case 950398559: /*comment*/  return new Property("comment", "string", "Additional information about how to use this operation or named query.", 0, 1, comment);
2858        case 3016401: /*base*/  return new Property("base", "Reference(OperationDefinition)", "Indicates that this operation definition is a constraining profile on the base.", 0, 1, base);
2859        case -341064690: /*resource*/  return new Property("resource", "code", "The types on which this operation can be executed.", 0, java.lang.Integer.MAX_VALUE, resource);
2860        case -887328209: /*system*/  return new Property("system", "boolean", "Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).", 0, 1, system);
2861        case 3575610: /*type*/  return new Property("type", "boolean", "Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a specific resource id for the context).", 0, 1, type);
2862        case 555127957: /*instance*/  return new Property("instance", "boolean", "Indicates whether this operation can be invoked on a particular instance of one of the given types.", 0, 1, instance);
2863        case 1954460585: /*parameter*/  return new Property("parameter", "", "The parameters for the operation/query.", 0, java.lang.Integer.MAX_VALUE, parameter);
2864        case 529823674: /*overload*/  return new Property("overload", "", "Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.", 0, java.lang.Integer.MAX_VALUE, overload);
2865        default: return super.getNamedProperty(_hash, _name, _checkValid);
2866        }
2867
2868      }
2869
2870      @Override
2871      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
2872        switch (hash) {
2873        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
2874        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
2875        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
2876        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
2877        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<OperationKind>
2878        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
2879        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
2880        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
2881        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
2882        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
2883        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
2884        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
2885        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
2886        case 1680468793: /*idempotent*/ return this.idempotent == null ? new Base[0] : new Base[] {this.idempotent}; // BooleanType
2887        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
2888        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
2889        case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // Reference
2890        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // CodeType
2891        case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // BooleanType
2892        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // BooleanType
2893        case 555127957: /*instance*/ return this.instance == null ? new Base[0] : new Base[] {this.instance}; // BooleanType
2894        case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // OperationDefinitionParameterComponent
2895        case 529823674: /*overload*/ return this.overload == null ? new Base[0] : this.overload.toArray(new Base[this.overload.size()]); // OperationDefinitionOverloadComponent
2896        default: return super.getProperty(hash, name, checkValid);
2897        }
2898
2899      }
2900
2901      @Override
2902      public Base setProperty(int hash, String name, Base value) throws FHIRException {
2903        switch (hash) {
2904        case 116079: // url
2905          this.url = castToUri(value); // UriType
2906          return value;
2907        case 351608024: // version
2908          this.version = castToString(value); // StringType
2909          return value;
2910        case 3373707: // name
2911          this.name = castToString(value); // StringType
2912          return value;
2913        case -892481550: // status
2914          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
2915          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2916          return value;
2917        case 3292052: // kind
2918          value = new OperationKindEnumFactory().fromType(castToCode(value));
2919          this.kind = (Enumeration) value; // Enumeration<OperationKind>
2920          return value;
2921        case -404562712: // experimental
2922          this.experimental = castToBoolean(value); // BooleanType
2923          return value;
2924        case 3076014: // date
2925          this.date = castToDateTime(value); // DateTimeType
2926          return value;
2927        case 1447404028: // publisher
2928          this.publisher = castToString(value); // StringType
2929          return value;
2930        case 951526432: // contact
2931          this.getContact().add(castToContactDetail(value)); // ContactDetail
2932          return value;
2933        case -1724546052: // description
2934          this.description = castToMarkdown(value); // MarkdownType
2935          return value;
2936        case -669707736: // useContext
2937          this.getUseContext().add(castToUsageContext(value)); // UsageContext
2938          return value;
2939        case -507075711: // jurisdiction
2940          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
2941          return value;
2942        case -220463842: // purpose
2943          this.purpose = castToMarkdown(value); // MarkdownType
2944          return value;
2945        case 1680468793: // idempotent
2946          this.idempotent = castToBoolean(value); // BooleanType
2947          return value;
2948        case 3059181: // code
2949          this.code = castToCode(value); // CodeType
2950          return value;
2951        case 950398559: // comment
2952          this.comment = castToString(value); // StringType
2953          return value;
2954        case 3016401: // base
2955          this.base = castToReference(value); // Reference
2956          return value;
2957        case -341064690: // resource
2958          this.getResource().add(castToCode(value)); // CodeType
2959          return value;
2960        case -887328209: // system
2961          this.system = castToBoolean(value); // BooleanType
2962          return value;
2963        case 3575610: // type
2964          this.type = castToBoolean(value); // BooleanType
2965          return value;
2966        case 555127957: // instance
2967          this.instance = castToBoolean(value); // BooleanType
2968          return value;
2969        case 1954460585: // parameter
2970          this.getParameter().add((OperationDefinitionParameterComponent) value); // OperationDefinitionParameterComponent
2971          return value;
2972        case 529823674: // overload
2973          this.getOverload().add((OperationDefinitionOverloadComponent) value); // OperationDefinitionOverloadComponent
2974          return value;
2975        default: return super.setProperty(hash, name, value);
2976        }
2977
2978      }
2979
2980      @Override
2981      public Base setProperty(String name, Base value) throws FHIRException {
2982        if (name.equals("url")) {
2983          this.url = castToUri(value); // UriType
2984        } else if (name.equals("version")) {
2985          this.version = castToString(value); // StringType
2986        } else if (name.equals("name")) {
2987          this.name = castToString(value); // StringType
2988        } else if (name.equals("status")) {
2989          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
2990          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
2991        } else if (name.equals("kind")) {
2992          value = new OperationKindEnumFactory().fromType(castToCode(value));
2993          this.kind = (Enumeration) value; // Enumeration<OperationKind>
2994        } else if (name.equals("experimental")) {
2995          this.experimental = castToBoolean(value); // BooleanType
2996        } else if (name.equals("date")) {
2997          this.date = castToDateTime(value); // DateTimeType
2998        } else if (name.equals("publisher")) {
2999          this.publisher = castToString(value); // StringType
3000        } else if (name.equals("contact")) {
3001          this.getContact().add(castToContactDetail(value));
3002        } else if (name.equals("description")) {
3003          this.description = castToMarkdown(value); // MarkdownType
3004        } else if (name.equals("useContext")) {
3005          this.getUseContext().add(castToUsageContext(value));
3006        } else if (name.equals("jurisdiction")) {
3007          this.getJurisdiction().add(castToCodeableConcept(value));
3008        } else if (name.equals("purpose")) {
3009          this.purpose = castToMarkdown(value); // MarkdownType
3010        } else if (name.equals("idempotent")) {
3011          this.idempotent = castToBoolean(value); // BooleanType
3012        } else if (name.equals("code")) {
3013          this.code = castToCode(value); // CodeType
3014        } else if (name.equals("comment")) {
3015          this.comment = castToString(value); // StringType
3016        } else if (name.equals("base")) {
3017          this.base = castToReference(value); // Reference
3018        } else if (name.equals("resource")) {
3019          this.getResource().add(castToCode(value));
3020        } else if (name.equals("system")) {
3021          this.system = castToBoolean(value); // BooleanType
3022        } else if (name.equals("type")) {
3023          this.type = castToBoolean(value); // BooleanType
3024        } else if (name.equals("instance")) {
3025          this.instance = castToBoolean(value); // BooleanType
3026        } else if (name.equals("parameter")) {
3027          this.getParameter().add((OperationDefinitionParameterComponent) value);
3028        } else if (name.equals("overload")) {
3029          this.getOverload().add((OperationDefinitionOverloadComponent) value);
3030        } else
3031          return super.setProperty(name, value);
3032        return value;
3033      }
3034
3035      @Override
3036      public Base makeProperty(int hash, String name) throws FHIRException {
3037        switch (hash) {
3038        case 116079:  return getUrlElement();
3039        case 351608024:  return getVersionElement();
3040        case 3373707:  return getNameElement();
3041        case -892481550:  return getStatusElement();
3042        case 3292052:  return getKindElement();
3043        case -404562712:  return getExperimentalElement();
3044        case 3076014:  return getDateElement();
3045        case 1447404028:  return getPublisherElement();
3046        case 951526432:  return addContact(); 
3047        case -1724546052:  return getDescriptionElement();
3048        case -669707736:  return addUseContext(); 
3049        case -507075711:  return addJurisdiction(); 
3050        case -220463842:  return getPurposeElement();
3051        case 1680468793:  return getIdempotentElement();
3052        case 3059181:  return getCodeElement();
3053        case 950398559:  return getCommentElement();
3054        case 3016401:  return getBase(); 
3055        case -341064690:  return addResourceElement();
3056        case -887328209:  return getSystemElement();
3057        case 3575610:  return getTypeElement();
3058        case 555127957:  return getInstanceElement();
3059        case 1954460585:  return addParameter(); 
3060        case 529823674:  return addOverload(); 
3061        default: return super.makeProperty(hash, name);
3062        }
3063
3064      }
3065
3066      @Override
3067      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3068        switch (hash) {
3069        case 116079: /*url*/ return new String[] {"uri"};
3070        case 351608024: /*version*/ return new String[] {"string"};
3071        case 3373707: /*name*/ return new String[] {"string"};
3072        case -892481550: /*status*/ return new String[] {"code"};
3073        case 3292052: /*kind*/ return new String[] {"code"};
3074        case -404562712: /*experimental*/ return new String[] {"boolean"};
3075        case 3076014: /*date*/ return new String[] {"dateTime"};
3076        case 1447404028: /*publisher*/ return new String[] {"string"};
3077        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
3078        case -1724546052: /*description*/ return new String[] {"markdown"};
3079        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
3080        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
3081        case -220463842: /*purpose*/ return new String[] {"markdown"};
3082        case 1680468793: /*idempotent*/ return new String[] {"boolean"};
3083        case 3059181: /*code*/ return new String[] {"code"};
3084        case 950398559: /*comment*/ return new String[] {"string"};
3085        case 3016401: /*base*/ return new String[] {"Reference"};
3086        case -341064690: /*resource*/ return new String[] {"code"};
3087        case -887328209: /*system*/ return new String[] {"boolean"};
3088        case 3575610: /*type*/ return new String[] {"boolean"};
3089        case 555127957: /*instance*/ return new String[] {"boolean"};
3090        case 1954460585: /*parameter*/ return new String[] {};
3091        case 529823674: /*overload*/ return new String[] {};
3092        default: return super.getTypesForProperty(hash, name);
3093        }
3094
3095      }
3096
3097      @Override
3098      public Base addChild(String name) throws FHIRException {
3099        if (name.equals("url")) {
3100          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.url");
3101        }
3102        else if (name.equals("version")) {
3103          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.version");
3104        }
3105        else if (name.equals("name")) {
3106          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name");
3107        }
3108        else if (name.equals("status")) {
3109          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.status");
3110        }
3111        else if (name.equals("kind")) {
3112          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.kind");
3113        }
3114        else if (name.equals("experimental")) {
3115          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.experimental");
3116        }
3117        else if (name.equals("date")) {
3118          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.date");
3119        }
3120        else if (name.equals("publisher")) {
3121          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.publisher");
3122        }
3123        else if (name.equals("contact")) {
3124          return addContact();
3125        }
3126        else if (name.equals("description")) {
3127          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.description");
3128        }
3129        else if (name.equals("useContext")) {
3130          return addUseContext();
3131        }
3132        else if (name.equals("jurisdiction")) {
3133          return addJurisdiction();
3134        }
3135        else if (name.equals("purpose")) {
3136          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.purpose");
3137        }
3138        else if (name.equals("idempotent")) {
3139          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.idempotent");
3140        }
3141        else if (name.equals("code")) {
3142          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.code");
3143        }
3144        else if (name.equals("comment")) {
3145          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.comment");
3146        }
3147        else if (name.equals("base")) {
3148          this.base = new Reference();
3149          return this.base;
3150        }
3151        else if (name.equals("resource")) {
3152          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.resource");
3153        }
3154        else if (name.equals("system")) {
3155          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.system");
3156        }
3157        else if (name.equals("type")) {
3158          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.type");
3159        }
3160        else if (name.equals("instance")) {
3161          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.instance");
3162        }
3163        else if (name.equals("parameter")) {
3164          return addParameter();
3165        }
3166        else if (name.equals("overload")) {
3167          return addOverload();
3168        }
3169        else
3170          return super.addChild(name);
3171      }
3172
3173  public String fhirType() {
3174    return "OperationDefinition";
3175
3176  }
3177
3178      public OperationDefinition copy() {
3179        OperationDefinition dst = new OperationDefinition();
3180        copyValues(dst);
3181        dst.url = url == null ? null : url.copy();
3182        dst.version = version == null ? null : version.copy();
3183        dst.name = name == null ? null : name.copy();
3184        dst.status = status == null ? null : status.copy();
3185        dst.kind = kind == null ? null : kind.copy();
3186        dst.experimental = experimental == null ? null : experimental.copy();
3187        dst.date = date == null ? null : date.copy();
3188        dst.publisher = publisher == null ? null : publisher.copy();
3189        if (contact != null) {
3190          dst.contact = new ArrayList<ContactDetail>();
3191          for (ContactDetail i : contact)
3192            dst.contact.add(i.copy());
3193        };
3194        dst.description = description == null ? null : description.copy();
3195        if (useContext != null) {
3196          dst.useContext = new ArrayList<UsageContext>();
3197          for (UsageContext i : useContext)
3198            dst.useContext.add(i.copy());
3199        };
3200        if (jurisdiction != null) {
3201          dst.jurisdiction = new ArrayList<CodeableConcept>();
3202          for (CodeableConcept i : jurisdiction)
3203            dst.jurisdiction.add(i.copy());
3204        };
3205        dst.purpose = purpose == null ? null : purpose.copy();
3206        dst.idempotent = idempotent == null ? null : idempotent.copy();
3207        dst.code = code == null ? null : code.copy();
3208        dst.comment = comment == null ? null : comment.copy();
3209        dst.base = base == null ? null : base.copy();
3210        if (resource != null) {
3211          dst.resource = new ArrayList<CodeType>();
3212          for (CodeType i : resource)
3213            dst.resource.add(i.copy());
3214        };
3215        dst.system = system == null ? null : system.copy();
3216        dst.type = type == null ? null : type.copy();
3217        dst.instance = instance == null ? null : instance.copy();
3218        if (parameter != null) {
3219          dst.parameter = new ArrayList<OperationDefinitionParameterComponent>();
3220          for (OperationDefinitionParameterComponent i : parameter)
3221            dst.parameter.add(i.copy());
3222        };
3223        if (overload != null) {
3224          dst.overload = new ArrayList<OperationDefinitionOverloadComponent>();
3225          for (OperationDefinitionOverloadComponent i : overload)
3226            dst.overload.add(i.copy());
3227        };
3228        return dst;
3229      }
3230
3231      protected OperationDefinition typedCopy() {
3232        return copy();
3233      }
3234
3235      @Override
3236      public boolean equalsDeep(Base other_) {
3237        if (!super.equalsDeep(other_))
3238          return false;
3239        if (!(other_ instanceof OperationDefinition))
3240          return false;
3241        OperationDefinition o = (OperationDefinition) other_;
3242        return compareDeep(kind, o.kind, true) && compareDeep(purpose, o.purpose, true) && compareDeep(idempotent, o.idempotent, true)
3243           && compareDeep(code, o.code, true) && compareDeep(comment, o.comment, true) && compareDeep(base, o.base, true)
3244           && compareDeep(resource, o.resource, true) && compareDeep(system, o.system, true) && compareDeep(type, o.type, true)
3245           && compareDeep(instance, o.instance, true) && compareDeep(parameter, o.parameter, true) && compareDeep(overload, o.overload, true)
3246          ;
3247      }
3248
3249      @Override
3250      public boolean equalsShallow(Base other_) {
3251        if (!super.equalsShallow(other_))
3252          return false;
3253        if (!(other_ instanceof OperationDefinition))
3254          return false;
3255        OperationDefinition o = (OperationDefinition) other_;
3256        return compareValues(kind, o.kind, true) && compareValues(purpose, o.purpose, true) && compareValues(idempotent, o.idempotent, true)
3257           && compareValues(code, o.code, true) && compareValues(comment, o.comment, true) && compareValues(resource, o.resource, true)
3258           && compareValues(system, o.system, true) && compareValues(type, o.type, true) && compareValues(instance, o.instance, true)
3259          ;
3260      }
3261
3262      public boolean isEmpty() {
3263        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, purpose, idempotent
3264          , code, comment, base, resource, system, type, instance, parameter, overload
3265          );
3266      }
3267
3268  @Override
3269  public ResourceType getResourceType() {
3270    return ResourceType.OperationDefinition;
3271   }
3272
3273 /**
3274   * Search parameter: <b>date</b>
3275   * <p>
3276   * Description: <b>The operation definition publication date</b><br>
3277   * Type: <b>date</b><br>
3278   * Path: <b>OperationDefinition.date</b><br>
3279   * </p>
3280   */
3281  @SearchParamDefinition(name="date", path="OperationDefinition.date", description="The operation definition publication date", type="date" )
3282  public static final String SP_DATE = "date";
3283 /**
3284   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3285   * <p>
3286   * Description: <b>The operation definition publication date</b><br>
3287   * Type: <b>date</b><br>
3288   * Path: <b>OperationDefinition.date</b><br>
3289   * </p>
3290   */
3291  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3292
3293 /**
3294   * Search parameter: <b>code</b>
3295   * <p>
3296   * Description: <b>Name used to invoke the operation</b><br>
3297   * Type: <b>token</b><br>
3298   * Path: <b>OperationDefinition.code</b><br>
3299   * </p>
3300   */
3301  @SearchParamDefinition(name="code", path="OperationDefinition.code", description="Name used to invoke the operation", type="token" )
3302  public static final String SP_CODE = "code";
3303 /**
3304   * <b>Fluent Client</b> search parameter constant for <b>code</b>
3305   * <p>
3306   * Description: <b>Name used to invoke the operation</b><br>
3307   * Type: <b>token</b><br>
3308   * Path: <b>OperationDefinition.code</b><br>
3309   * </p>
3310   */
3311  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
3312
3313 /**
3314   * Search parameter: <b>instance</b>
3315   * <p>
3316   * Description: <b>Invoke on an instance?</b><br>
3317   * Type: <b>token</b><br>
3318   * Path: <b>OperationDefinition.instance</b><br>
3319   * </p>
3320   */
3321  @SearchParamDefinition(name="instance", path="OperationDefinition.instance", description="Invoke on an instance?", type="token" )
3322  public static final String SP_INSTANCE = "instance";
3323 /**
3324   * <b>Fluent Client</b> search parameter constant for <b>instance</b>
3325   * <p>
3326   * Description: <b>Invoke on an instance?</b><br>
3327   * Type: <b>token</b><br>
3328   * Path: <b>OperationDefinition.instance</b><br>
3329   * </p>
3330   */
3331  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INSTANCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INSTANCE);
3332
3333 /**
3334   * Search parameter: <b>kind</b>
3335   * <p>
3336   * Description: <b>operation | query</b><br>
3337   * Type: <b>token</b><br>
3338   * Path: <b>OperationDefinition.kind</b><br>
3339   * </p>
3340   */
3341  @SearchParamDefinition(name="kind", path="OperationDefinition.kind", description="operation | query", type="token" )
3342  public static final String SP_KIND = "kind";
3343 /**
3344   * <b>Fluent Client</b> search parameter constant for <b>kind</b>
3345   * <p>
3346   * Description: <b>operation | query</b><br>
3347   * Type: <b>token</b><br>
3348   * Path: <b>OperationDefinition.kind</b><br>
3349   * </p>
3350   */
3351  public static final ca.uhn.fhir.rest.gclient.TokenClientParam KIND = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_KIND);
3352
3353 /**
3354   * Search parameter: <b>jurisdiction</b>
3355   * <p>
3356   * Description: <b>Intended jurisdiction for the operation definition</b><br>
3357   * Type: <b>token</b><br>
3358   * Path: <b>OperationDefinition.jurisdiction</b><br>
3359   * </p>
3360   */
3361  @SearchParamDefinition(name="jurisdiction", path="OperationDefinition.jurisdiction", description="Intended jurisdiction for the operation definition", type="token" )
3362  public static final String SP_JURISDICTION = "jurisdiction";
3363 /**
3364   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
3365   * <p>
3366   * Description: <b>Intended jurisdiction for the operation definition</b><br>
3367   * Type: <b>token</b><br>
3368   * Path: <b>OperationDefinition.jurisdiction</b><br>
3369   * </p>
3370   */
3371  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
3372
3373 /**
3374   * Search parameter: <b>description</b>
3375   * <p>
3376   * Description: <b>The description of the operation definition</b><br>
3377   * Type: <b>string</b><br>
3378   * Path: <b>OperationDefinition.description</b><br>
3379   * </p>
3380   */
3381  @SearchParamDefinition(name="description", path="OperationDefinition.description", description="The description of the operation definition", type="string" )
3382  public static final String SP_DESCRIPTION = "description";
3383 /**
3384   * <b>Fluent Client</b> search parameter constant for <b>description</b>
3385   * <p>
3386   * Description: <b>The description of the operation definition</b><br>
3387   * Type: <b>string</b><br>
3388   * Path: <b>OperationDefinition.description</b><br>
3389   * </p>
3390   */
3391  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
3392
3393 /**
3394   * Search parameter: <b>type</b>
3395   * <p>
3396   * Description: <b>Invole at the type level?</b><br>
3397   * Type: <b>token</b><br>
3398   * Path: <b>OperationDefinition.type</b><br>
3399   * </p>
3400   */
3401  @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invole at the type level?", type="token" )
3402  public static final String SP_TYPE = "type";
3403 /**
3404   * <b>Fluent Client</b> search parameter constant for <b>type</b>
3405   * <p>
3406   * Description: <b>Invole at the type level?</b><br>
3407   * Type: <b>token</b><br>
3408   * Path: <b>OperationDefinition.type</b><br>
3409   * </p>
3410   */
3411  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
3412
3413 /**
3414   * Search parameter: <b>version</b>
3415   * <p>
3416   * Description: <b>The business version of the operation definition</b><br>
3417   * Type: <b>token</b><br>
3418   * Path: <b>OperationDefinition.version</b><br>
3419   * </p>
3420   */
3421  @SearchParamDefinition(name="version", path="OperationDefinition.version", description="The business version of the operation definition", type="token" )
3422  public static final String SP_VERSION = "version";
3423 /**
3424   * <b>Fluent Client</b> search parameter constant for <b>version</b>
3425   * <p>
3426   * Description: <b>The business version of the operation definition</b><br>
3427   * Type: <b>token</b><br>
3428   * Path: <b>OperationDefinition.version</b><br>
3429   * </p>
3430   */
3431  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
3432
3433 /**
3434   * Search parameter: <b>url</b>
3435   * <p>
3436   * Description: <b>The uri that identifies the operation definition</b><br>
3437   * Type: <b>uri</b><br>
3438   * Path: <b>OperationDefinition.url</b><br>
3439   * </p>
3440   */
3441  @SearchParamDefinition(name="url", path="OperationDefinition.url", description="The uri that identifies the operation definition", type="uri" )
3442  public static final String SP_URL = "url";
3443 /**
3444   * <b>Fluent Client</b> search parameter constant for <b>url</b>
3445   * <p>
3446   * Description: <b>The uri that identifies the operation definition</b><br>
3447   * Type: <b>uri</b><br>
3448   * Path: <b>OperationDefinition.url</b><br>
3449   * </p>
3450   */
3451  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
3452
3453 /**
3454   * Search parameter: <b>system</b>
3455   * <p>
3456   * Description: <b>Invoke at the system level?</b><br>
3457   * Type: <b>token</b><br>
3458   * Path: <b>OperationDefinition.system</b><br>
3459   * </p>
3460   */
3461  @SearchParamDefinition(name="system", path="OperationDefinition.system", description="Invoke at the system level?", type="token" )
3462  public static final String SP_SYSTEM = "system";
3463 /**
3464   * <b>Fluent Client</b> search parameter constant for <b>system</b>
3465   * <p>
3466   * Description: <b>Invoke at the system level?</b><br>
3467   * Type: <b>token</b><br>
3468   * Path: <b>OperationDefinition.system</b><br>
3469   * </p>
3470   */
3471  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SYSTEM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SYSTEM);
3472
3473 /**
3474   * Search parameter: <b>name</b>
3475   * <p>
3476   * Description: <b>Computationally friendly name of the operation definition</b><br>
3477   * Type: <b>string</b><br>
3478   * Path: <b>OperationDefinition.name</b><br>
3479   * </p>
3480   */
3481  @SearchParamDefinition(name="name", path="OperationDefinition.name", description="Computationally friendly name of the operation definition", type="string" )
3482  public static final String SP_NAME = "name";
3483 /**
3484   * <b>Fluent Client</b> search parameter constant for <b>name</b>
3485   * <p>
3486   * Description: <b>Computationally friendly name of the operation definition</b><br>
3487   * Type: <b>string</b><br>
3488   * Path: <b>OperationDefinition.name</b><br>
3489   * </p>
3490   */
3491  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
3492
3493 /**
3494   * Search parameter: <b>publisher</b>
3495   * <p>
3496   * Description: <b>Name of the publisher of the operation definition</b><br>
3497   * Type: <b>string</b><br>
3498   * Path: <b>OperationDefinition.publisher</b><br>
3499   * </p>
3500   */
3501  @SearchParamDefinition(name="publisher", path="OperationDefinition.publisher", description="Name of the publisher of the operation definition", type="string" )
3502  public static final String SP_PUBLISHER = "publisher";
3503 /**
3504   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
3505   * <p>
3506   * Description: <b>Name of the publisher of the operation definition</b><br>
3507   * Type: <b>string</b><br>
3508   * Path: <b>OperationDefinition.publisher</b><br>
3509   * </p>
3510   */
3511  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
3512
3513 /**
3514   * Search parameter: <b>param-profile</b>
3515   * <p>
3516   * Description: <b>Profile on the type</b><br>
3517   * Type: <b>reference</b><br>
3518   * Path: <b>OperationDefinition.parameter.profile</b><br>
3519   * </p>
3520   */
3521  @SearchParamDefinition(name="param-profile", path="OperationDefinition.parameter.profile", description="Profile on the type", type="reference", target={StructureDefinition.class } )
3522  public static final String SP_PARAM_PROFILE = "param-profile";
3523 /**
3524   * <b>Fluent Client</b> search parameter constant for <b>param-profile</b>
3525   * <p>
3526   * Description: <b>Profile on the type</b><br>
3527   * Type: <b>reference</b><br>
3528   * Path: <b>OperationDefinition.parameter.profile</b><br>
3529   * </p>
3530   */
3531  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PARAM_PROFILE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_PARAM_PROFILE);
3532
3533/**
3534   * Constant for fluent queries to be used to add include statements. Specifies
3535   * the path value of "<b>OperationDefinition:param-profile</b>".
3536   */
3537  public static final ca.uhn.fhir.model.api.Include INCLUDE_PARAM_PROFILE = new ca.uhn.fhir.model.api.Include("OperationDefinition:param-profile").toLocked();
3538
3539 /**
3540   * Search parameter: <b>status</b>
3541   * <p>
3542   * Description: <b>The current status of the operation definition</b><br>
3543   * Type: <b>token</b><br>
3544   * Path: <b>OperationDefinition.status</b><br>
3545   * </p>
3546   */
3547  @SearchParamDefinition(name="status", path="OperationDefinition.status", description="The current status of the operation definition", type="token" )
3548  public static final String SP_STATUS = "status";
3549 /**
3550   * <b>Fluent Client</b> search parameter constant for <b>status</b>
3551   * <p>
3552   * Description: <b>The current status of the operation definition</b><br>
3553   * Type: <b>token</b><br>
3554   * Path: <b>OperationDefinition.status</b><br>
3555   * </p>
3556   */
3557  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
3558
3559 /**
3560   * Search parameter: <b>base</b>
3561   * <p>
3562   * Description: <b>Marks this as a profile of the base</b><br>
3563   * Type: <b>reference</b><br>
3564   * Path: <b>OperationDefinition.base</b><br>
3565   * </p>
3566   */
3567  @SearchParamDefinition(name="base", path="OperationDefinition.base", description="Marks this as a profile of the base", type="reference", target={OperationDefinition.class } )
3568  public static final String SP_BASE = "base";
3569 /**
3570   * <b>Fluent Client</b> search parameter constant for <b>base</b>
3571   * <p>
3572   * Description: <b>Marks this as a profile of the base</b><br>
3573   * Type: <b>reference</b><br>
3574   * Path: <b>OperationDefinition.base</b><br>
3575   * </p>
3576   */
3577  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASE);
3578
3579/**
3580   * Constant for fluent queries to be used to add include statements. Specifies
3581   * the path value of "<b>OperationDefinition:base</b>".
3582   */
3583  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASE = new ca.uhn.fhir.model.api.Include("OperationDefinition:base").toLocked();
3584
3585
3586}