001package org.hl7.fhir.r4.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
035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1
036
037import java.util.*;
038
039import org.hl7.fhir.utilities.Utilities;
040import org.hl7.fhir.r4.model.Enumerations.*;
041import ca.uhn.fhir.model.api.annotation.ResourceDef;
042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
043import ca.uhn.fhir.model.api.annotation.Child;
044import ca.uhn.fhir.model.api.annotation.ChildOrder;
045import ca.uhn.fhir.model.api.annotation.Description;
046import ca.uhn.fhir.model.api.annotation.Block;
047import org.hl7.fhir.instance.model.api.*;
048import org.hl7.fhir.exceptions.FHIRException;
049/**
050 * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction).
051 */
052@ResourceDef(name="OperationDefinition", profile="http://hl7.org/fhir/StructureDefinition/OperationDefinition")
053@ChildOrder(names={"url", "version", "name", "title", "status", "kind", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "affectsState", "code", "comment", "base", "resource", "system", "type", "instance", "inputProfile", "outputProfile", "parameter", "overload"})
054public class OperationDefinition extends MetadataResource {
055
056    public enum OperationKind {
057        /**
058         * This operation is invoked as an operation.
059         */
060        OPERATION, 
061        /**
062         * This operation is a named query, invoked using the search mechanism.
063         */
064        QUERY, 
065        /**
066         * added to help the parsers with the generic types
067         */
068        NULL;
069        public static OperationKind fromCode(String codeString) throws FHIRException {
070            if (codeString == null || "".equals(codeString))
071                return null;
072        if ("operation".equals(codeString))
073          return OPERATION;
074        if ("query".equals(codeString))
075          return QUERY;
076        if (Configuration.isAcceptInvalidEnums())
077          return null;
078        else
079          throw new FHIRException("Unknown OperationKind code '"+codeString+"'");
080        }
081        public String toCode() {
082          switch (this) {
083            case OPERATION: return "operation";
084            case QUERY: return "query";
085            default: return "?";
086          }
087        }
088        public String getSystem() {
089          switch (this) {
090            case OPERATION: return "http://hl7.org/fhir/operation-kind";
091            case QUERY: return "http://hl7.org/fhir/operation-kind";
092            default: return "?";
093          }
094        }
095        public String getDefinition() {
096          switch (this) {
097            case OPERATION: return "This operation is invoked as an operation.";
098            case QUERY: return "This operation is a named query, invoked using the search mechanism.";
099            default: return "?";
100          }
101        }
102        public String getDisplay() {
103          switch (this) {
104            case OPERATION: return "Operation";
105            case QUERY: return "Query";
106            default: return "?";
107          }
108        }
109    }
110
111  public static class OperationKindEnumFactory implements EnumFactory<OperationKind> {
112    public OperationKind fromCode(String codeString) throws IllegalArgumentException {
113      if (codeString == null || "".equals(codeString))
114            if (codeString == null || "".equals(codeString))
115                return null;
116        if ("operation".equals(codeString))
117          return OperationKind.OPERATION;
118        if ("query".equals(codeString))
119          return OperationKind.QUERY;
120        throw new IllegalArgumentException("Unknown OperationKind code '"+codeString+"'");
121        }
122        public Enumeration<OperationKind> fromType(Base code) throws FHIRException {
123          if (code == null)
124            return null;
125          if (code.isEmpty())
126            return new Enumeration<OperationKind>(this);
127          String codeString = ((PrimitiveType) code).asStringValue();
128          if (codeString == null || "".equals(codeString))
129            return null;
130        if ("operation".equals(codeString))
131          return new Enumeration<OperationKind>(this, OperationKind.OPERATION);
132        if ("query".equals(codeString))
133          return new Enumeration<OperationKind>(this, OperationKind.QUERY);
134        throw new FHIRException("Unknown OperationKind code '"+codeString+"'");
135        }
136    public String toCode(OperationKind code) {
137      if (code == OperationKind.OPERATION)
138        return "operation";
139      if (code == OperationKind.QUERY)
140        return "query";
141      return "?";
142      }
143    public String toSystem(OperationKind code) {
144      return code.getSystem();
145      }
146    }
147
148    public enum OperationParameterUse {
149        /**
150         * This is an input parameter.
151         */
152        IN, 
153        /**
154         * This is an output parameter.
155         */
156        OUT, 
157        /**
158         * added to help the parsers with the generic types
159         */
160        NULL;
161        public static OperationParameterUse fromCode(String codeString) throws FHIRException {
162            if (codeString == null || "".equals(codeString))
163                return null;
164        if ("in".equals(codeString))
165          return IN;
166        if ("out".equals(codeString))
167          return OUT;
168        if (Configuration.isAcceptInvalidEnums())
169          return null;
170        else
171          throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
172        }
173        public String toCode() {
174          switch (this) {
175            case IN: return "in";
176            case OUT: return "out";
177            default: return "?";
178          }
179        }
180        public String getSystem() {
181          switch (this) {
182            case IN: return "http://hl7.org/fhir/operation-parameter-use";
183            case OUT: return "http://hl7.org/fhir/operation-parameter-use";
184            default: return "?";
185          }
186        }
187        public String getDefinition() {
188          switch (this) {
189            case IN: return "This is an input parameter.";
190            case OUT: return "This is an output parameter.";
191            default: return "?";
192          }
193        }
194        public String getDisplay() {
195          switch (this) {
196            case IN: return "In";
197            case OUT: return "Out";
198            default: return "?";
199          }
200        }
201    }
202
203  public static class OperationParameterUseEnumFactory implements EnumFactory<OperationParameterUse> {
204    public OperationParameterUse fromCode(String codeString) throws IllegalArgumentException {
205      if (codeString == null || "".equals(codeString))
206            if (codeString == null || "".equals(codeString))
207                return null;
208        if ("in".equals(codeString))
209          return OperationParameterUse.IN;
210        if ("out".equals(codeString))
211          return OperationParameterUse.OUT;
212        throw new IllegalArgumentException("Unknown OperationParameterUse code '"+codeString+"'");
213        }
214        public Enumeration<OperationParameterUse> fromType(Base code) throws FHIRException {
215          if (code == null)
216            return null;
217          if (code.isEmpty())
218            return new Enumeration<OperationParameterUse>(this);
219          String codeString = ((PrimitiveType) code).asStringValue();
220          if (codeString == null || "".equals(codeString))
221            return null;
222        if ("in".equals(codeString))
223          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.IN);
224        if ("out".equals(codeString))
225          return new Enumeration<OperationParameterUse>(this, OperationParameterUse.OUT);
226        throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'");
227        }
228    public String toCode(OperationParameterUse code) {
229      if (code == OperationParameterUse.IN)
230        return "in";
231      if (code == OperationParameterUse.OUT)
232        return "out";
233      return "?";
234      }
235    public String toSystem(OperationParameterUse code) {
236      return code.getSystem();
237      }
238    }
239
240    @Block()
241    public static class OperationDefinitionParameterComponent extends BackboneElement implements IBaseBackboneElement {
242        /**
243         * The name of used to identify the parameter.
244         */
245        @Child(name = "name", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
246        @Description(shortDefinition="Name in Parameters.parameter.name or in URL", formalDefinition="The name of used to identify the parameter." )
247        protected CodeType name;
248
249        /**
250         * Whether this is an input or an output parameter.
251         */
252        @Child(name = "use", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
253        @Description(shortDefinition="in | out", formalDefinition="Whether this is an input or an output parameter." )
254        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/operation-parameter-use")
255        protected Enumeration<OperationParameterUse> use;
256
257        /**
258         * The minimum number of times this parameter SHALL appear in the request or response.
259         */
260        @Child(name = "min", type = {IntegerType.class}, order=3, min=1, max=1, modifier=false, summary=false)
261        @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this parameter SHALL appear in the request or response." )
262        protected IntegerType min;
263
264        /**
265         * The maximum number of times this element is permitted to appear in the request or response.
266         */
267        @Child(name = "max", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=false)
268        @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the request or response." )
269        protected StringType max;
270
271        /**
272         * Describes the meaning or use of this parameter.
273         */
274        @Child(name = "documentation", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false)
275        @Description(shortDefinition="Description of meaning/use", formalDefinition="Describes the meaning or use of this parameter." )
276        protected StringType documentation;
277
278        /**
279         * The type for this parameter.
280         */
281        @Child(name = "type", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false)
282        @Description(shortDefinition="What type this parameter has", formalDefinition="The type for this parameter." )
283        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/all-types")
284        protected CodeType type;
285
286        /**
287         * Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.
288         */
289        @Child(name = "targetProfile", type = {CanonicalType.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
290        @Description(shortDefinition="If type is Reference | canonical, allowed targets", formalDefinition="Used when the type is \"Reference\" or \"canonical\", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide." )
291        protected List<CanonicalType> targetProfile;
292
293        /**
294         * How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.
295         */
296        @Child(name = "searchType", type = {CodeType.class}, order=8, min=0, max=1, modifier=false, summary=false)
297        @Description(shortDefinition="number | date | string | token | reference | composite | quantity | uri | special", formalDefinition="How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'." )
298        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-param-type")
299        protected Enumeration<SearchParamType> searchType;
300
301        /**
302         * Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).
303         */
304        @Child(name = "binding", type = {}, order=9, min=0, max=1, modifier=false, summary=false)
305        @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this parameter is coded (code, Coding, CodeableConcept)." )
306        protected OperationDefinitionParameterBindingComponent binding;
307
308        /**
309         * Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.
310         */
311        @Child(name = "referencedFrom", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
312        @Description(shortDefinition="References to this parameter", formalDefinition="Identifies other resource parameters within the operation invocation that are expected to resolve to this resource." )
313        protected List<OperationDefinitionParameterReferencedFromComponent> referencedFrom;
314
315        /**
316         * The parts of a nested Parameter.
317         */
318        @Child(name = "part", type = {OperationDefinitionParameterComponent.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
319        @Description(shortDefinition="Parts of a nested Parameter", formalDefinition="The parts of a nested Parameter." )
320        protected List<OperationDefinitionParameterComponent> part;
321
322        private static final long serialVersionUID = 1715661531L;
323
324    /**
325     * Constructor
326     */
327      public OperationDefinitionParameterComponent() {
328        super();
329      }
330
331    /**
332     * Constructor
333     */
334      public OperationDefinitionParameterComponent(CodeType name, Enumeration<OperationParameterUse> use, IntegerType min, StringType max) {
335        super();
336        this.name = name;
337        this.use = use;
338        this.min = min;
339        this.max = max;
340      }
341
342        /**
343         * @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
344         */
345        public CodeType getNameElement() { 
346          if (this.name == null)
347            if (Configuration.errorOnAutoCreate())
348              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.name");
349            else if (Configuration.doAutoCreate())
350              this.name = new CodeType(); // bb
351          return this.name;
352        }
353
354        public boolean hasNameElement() { 
355          return this.name != null && !this.name.isEmpty();
356        }
357
358        public boolean hasName() { 
359          return this.name != null && !this.name.isEmpty();
360        }
361
362        /**
363         * @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
364         */
365        public OperationDefinitionParameterComponent setNameElement(CodeType value) { 
366          this.name = value;
367          return this;
368        }
369
370        /**
371         * @return The name of used to identify the parameter.
372         */
373        public String getName() { 
374          return this.name == null ? null : this.name.getValue();
375        }
376
377        /**
378         * @param value The name of used to identify the parameter.
379         */
380        public OperationDefinitionParameterComponent setName(String value) { 
381            if (this.name == null)
382              this.name = new CodeType();
383            this.name.setValue(value);
384          return this;
385        }
386
387        /**
388         * @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
389         */
390        public Enumeration<OperationParameterUse> getUseElement() { 
391          if (this.use == null)
392            if (Configuration.errorOnAutoCreate())
393              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.use");
394            else if (Configuration.doAutoCreate())
395              this.use = new Enumeration<OperationParameterUse>(new OperationParameterUseEnumFactory()); // bb
396          return this.use;
397        }
398
399        public boolean hasUseElement() { 
400          return this.use != null && !this.use.isEmpty();
401        }
402
403        public boolean hasUse() { 
404          return this.use != null && !this.use.isEmpty();
405        }
406
407        /**
408         * @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
409         */
410        public OperationDefinitionParameterComponent setUseElement(Enumeration<OperationParameterUse> value) { 
411          this.use = value;
412          return this;
413        }
414
415        /**
416         * @return Whether this is an input or an output parameter.
417         */
418        public OperationParameterUse getUse() { 
419          return this.use == null ? null : this.use.getValue();
420        }
421
422        /**
423         * @param value Whether this is an input or an output parameter.
424         */
425        public OperationDefinitionParameterComponent setUse(OperationParameterUse value) { 
426            if (this.use == null)
427              this.use = new Enumeration<OperationParameterUse>(new OperationParameterUseEnumFactory());
428            this.use.setValue(value);
429          return this;
430        }
431
432        /**
433         * @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
434         */
435        public IntegerType getMinElement() { 
436          if (this.min == null)
437            if (Configuration.errorOnAutoCreate())
438              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.min");
439            else if (Configuration.doAutoCreate())
440              this.min = new IntegerType(); // bb
441          return this.min;
442        }
443
444        public boolean hasMinElement() { 
445          return this.min != null && !this.min.isEmpty();
446        }
447
448        public boolean hasMin() { 
449          return this.min != null && !this.min.isEmpty();
450        }
451
452        /**
453         * @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
454         */
455        public OperationDefinitionParameterComponent setMinElement(IntegerType value) { 
456          this.min = value;
457          return this;
458        }
459
460        /**
461         * @return The minimum number of times this parameter SHALL appear in the request or response.
462         */
463        public int getMin() { 
464          return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue();
465        }
466
467        /**
468         * @param value The minimum number of times this parameter SHALL appear in the request or response.
469         */
470        public OperationDefinitionParameterComponent setMin(int value) { 
471            if (this.min == null)
472              this.min = new IntegerType();
473            this.min.setValue(value);
474          return this;
475        }
476
477        /**
478         * @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
479         */
480        public StringType getMaxElement() { 
481          if (this.max == null)
482            if (Configuration.errorOnAutoCreate())
483              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.max");
484            else if (Configuration.doAutoCreate())
485              this.max = new StringType(); // bb
486          return this.max;
487        }
488
489        public boolean hasMaxElement() { 
490          return this.max != null && !this.max.isEmpty();
491        }
492
493        public boolean hasMax() { 
494          return this.max != null && !this.max.isEmpty();
495        }
496
497        /**
498         * @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
499         */
500        public OperationDefinitionParameterComponent setMaxElement(StringType value) { 
501          this.max = value;
502          return this;
503        }
504
505        /**
506         * @return The maximum number of times this element is permitted to appear in the request or response.
507         */
508        public String getMax() { 
509          return this.max == null ? null : this.max.getValue();
510        }
511
512        /**
513         * @param value The maximum number of times this element is permitted to appear in the request or response.
514         */
515        public OperationDefinitionParameterComponent setMax(String value) { 
516            if (this.max == null)
517              this.max = new StringType();
518            this.max.setValue(value);
519          return this;
520        }
521
522        /**
523         * @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
524         */
525        public StringType getDocumentationElement() { 
526          if (this.documentation == null)
527            if (Configuration.errorOnAutoCreate())
528              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.documentation");
529            else if (Configuration.doAutoCreate())
530              this.documentation = new StringType(); // bb
531          return this.documentation;
532        }
533
534        public boolean hasDocumentationElement() { 
535          return this.documentation != null && !this.documentation.isEmpty();
536        }
537
538        public boolean hasDocumentation() { 
539          return this.documentation != null && !this.documentation.isEmpty();
540        }
541
542        /**
543         * @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
544         */
545        public OperationDefinitionParameterComponent setDocumentationElement(StringType value) { 
546          this.documentation = value;
547          return this;
548        }
549
550        /**
551         * @return Describes the meaning or use of this parameter.
552         */
553        public String getDocumentation() { 
554          return this.documentation == null ? null : this.documentation.getValue();
555        }
556
557        /**
558         * @param value Describes the meaning or use of this parameter.
559         */
560        public OperationDefinitionParameterComponent setDocumentation(String value) { 
561          if (Utilities.noString(value))
562            this.documentation = null;
563          else {
564            if (this.documentation == null)
565              this.documentation = new StringType();
566            this.documentation.setValue(value);
567          }
568          return this;
569        }
570
571        /**
572         * @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
573         */
574        public CodeType getTypeElement() { 
575          if (this.type == null)
576            if (Configuration.errorOnAutoCreate())
577              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.type");
578            else if (Configuration.doAutoCreate())
579              this.type = new CodeType(); // bb
580          return this.type;
581        }
582
583        public boolean hasTypeElement() { 
584          return this.type != null && !this.type.isEmpty();
585        }
586
587        public boolean hasType() { 
588          return this.type != null && !this.type.isEmpty();
589        }
590
591        /**
592         * @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
593         */
594        public OperationDefinitionParameterComponent setTypeElement(CodeType value) { 
595          this.type = value;
596          return this;
597        }
598
599        /**
600         * @return The type for this parameter.
601         */
602        public String getType() { 
603          return this.type == null ? null : this.type.getValue();
604        }
605
606        /**
607         * @param value The type for this parameter.
608         */
609        public OperationDefinitionParameterComponent setType(String value) { 
610          if (Utilities.noString(value))
611            this.type = null;
612          else {
613            if (this.type == null)
614              this.type = new CodeType();
615            this.type.setValue(value);
616          }
617          return this;
618        }
619
620        /**
621         * @return {@link #targetProfile} (Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.)
622         */
623        public List<CanonicalType> getTargetProfile() { 
624          if (this.targetProfile == null)
625            this.targetProfile = new ArrayList<CanonicalType>();
626          return this.targetProfile;
627        }
628
629        /**
630         * @return Returns a reference to <code>this</code> for easy method chaining
631         */
632        public OperationDefinitionParameterComponent setTargetProfile(List<CanonicalType> theTargetProfile) { 
633          this.targetProfile = theTargetProfile;
634          return this;
635        }
636
637        public boolean hasTargetProfile() { 
638          if (this.targetProfile == null)
639            return false;
640          for (CanonicalType item : this.targetProfile)
641            if (!item.isEmpty())
642              return true;
643          return false;
644        }
645
646        /**
647         * @return {@link #targetProfile} (Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.)
648         */
649        public CanonicalType addTargetProfileElement() {//2 
650          CanonicalType t = new CanonicalType();
651          if (this.targetProfile == null)
652            this.targetProfile = new ArrayList<CanonicalType>();
653          this.targetProfile.add(t);
654          return t;
655        }
656
657        /**
658         * @param value {@link #targetProfile} (Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.)
659         */
660        public OperationDefinitionParameterComponent addTargetProfile(String value) { //1
661          CanonicalType t = new CanonicalType();
662          t.setValue(value);
663          if (this.targetProfile == null)
664            this.targetProfile = new ArrayList<CanonicalType>();
665          this.targetProfile.add(t);
666          return this;
667        }
668
669        /**
670         * @param value {@link #targetProfile} (Used when the type is "Reference" or "canonical", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.)
671         */
672        public boolean hasTargetProfile(String value) { 
673          if (this.targetProfile == null)
674            return false;
675          for (CanonicalType v : this.targetProfile)
676            if (v.getValue().equals(value)) // canonical(StructureDefinition)
677              return true;
678          return false;
679        }
680
681        /**
682         * @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
683         */
684        public Enumeration<SearchParamType> getSearchTypeElement() { 
685          if (this.searchType == null)
686            if (Configuration.errorOnAutoCreate())
687              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.searchType");
688            else if (Configuration.doAutoCreate())
689              this.searchType = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory()); // bb
690          return this.searchType;
691        }
692
693        public boolean hasSearchTypeElement() { 
694          return this.searchType != null && !this.searchType.isEmpty();
695        }
696
697        public boolean hasSearchType() { 
698          return this.searchType != null && !this.searchType.isEmpty();
699        }
700
701        /**
702         * @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
703         */
704        public OperationDefinitionParameterComponent setSearchTypeElement(Enumeration<SearchParamType> value) { 
705          this.searchType = value;
706          return this;
707        }
708
709        /**
710         * @return How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.
711         */
712        public SearchParamType getSearchType() { 
713          return this.searchType == null ? null : this.searchType.getValue();
714        }
715
716        /**
717         * @param value How the parameter is understood as a search parameter. This is only used if the parameter type is 'string'.
718         */
719        public OperationDefinitionParameterComponent setSearchType(SearchParamType value) { 
720          if (value == null)
721            this.searchType = null;
722          else {
723            if (this.searchType == null)
724              this.searchType = new Enumeration<SearchParamType>(new SearchParamTypeEnumFactory());
725            this.searchType.setValue(value);
726          }
727          return this;
728        }
729
730        /**
731         * @return {@link #binding} (Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).)
732         */
733        public OperationDefinitionParameterBindingComponent getBinding() { 
734          if (this.binding == null)
735            if (Configuration.errorOnAutoCreate())
736              throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.binding");
737            else if (Configuration.doAutoCreate())
738              this.binding = new OperationDefinitionParameterBindingComponent(); // cc
739          return this.binding;
740        }
741
742        public boolean hasBinding() { 
743          return this.binding != null && !this.binding.isEmpty();
744        }
745
746        /**
747         * @param value {@link #binding} (Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).)
748         */
749        public OperationDefinitionParameterComponent setBinding(OperationDefinitionParameterBindingComponent value) { 
750          this.binding = value;
751          return this;
752        }
753
754        /**
755         * @return {@link #referencedFrom} (Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.)
756         */
757        public List<OperationDefinitionParameterReferencedFromComponent> getReferencedFrom() { 
758          if (this.referencedFrom == null)
759            this.referencedFrom = new ArrayList<OperationDefinitionParameterReferencedFromComponent>();
760          return this.referencedFrom;
761        }
762
763        /**
764         * @return Returns a reference to <code>this</code> for easy method chaining
765         */
766        public OperationDefinitionParameterComponent setReferencedFrom(List<OperationDefinitionParameterReferencedFromComponent> theReferencedFrom) { 
767          this.referencedFrom = theReferencedFrom;
768          return this;
769        }
770
771        public boolean hasReferencedFrom() { 
772          if (this.referencedFrom == null)
773            return false;
774          for (OperationDefinitionParameterReferencedFromComponent item : this.referencedFrom)
775            if (!item.isEmpty())
776              return true;
777          return false;
778        }
779
780        public OperationDefinitionParameterReferencedFromComponent addReferencedFrom() { //3
781          OperationDefinitionParameterReferencedFromComponent t = new OperationDefinitionParameterReferencedFromComponent();
782          if (this.referencedFrom == null)
783            this.referencedFrom = new ArrayList<OperationDefinitionParameterReferencedFromComponent>();
784          this.referencedFrom.add(t);
785          return t;
786        }
787
788        public OperationDefinitionParameterComponent addReferencedFrom(OperationDefinitionParameterReferencedFromComponent t) { //3
789          if (t == null)
790            return this;
791          if (this.referencedFrom == null)
792            this.referencedFrom = new ArrayList<OperationDefinitionParameterReferencedFromComponent>();
793          this.referencedFrom.add(t);
794          return this;
795        }
796
797        /**
798         * @return The first repetition of repeating field {@link #referencedFrom}, creating it if it does not already exist
799         */
800        public OperationDefinitionParameterReferencedFromComponent getReferencedFromFirstRep() { 
801          if (getReferencedFrom().isEmpty()) {
802            addReferencedFrom();
803          }
804          return getReferencedFrom().get(0);
805        }
806
807        /**
808         * @return {@link #part} (The parts of a nested Parameter.)
809         */
810        public List<OperationDefinitionParameterComponent> getPart() { 
811          if (this.part == null)
812            this.part = new ArrayList<OperationDefinitionParameterComponent>();
813          return this.part;
814        }
815
816        /**
817         * @return Returns a reference to <code>this</code> for easy method chaining
818         */
819        public OperationDefinitionParameterComponent setPart(List<OperationDefinitionParameterComponent> thePart) { 
820          this.part = thePart;
821          return this;
822        }
823
824        public boolean hasPart() { 
825          if (this.part == null)
826            return false;
827          for (OperationDefinitionParameterComponent item : this.part)
828            if (!item.isEmpty())
829              return true;
830          return false;
831        }
832
833        public OperationDefinitionParameterComponent addPart() { //3
834          OperationDefinitionParameterComponent t = new OperationDefinitionParameterComponent();
835          if (this.part == null)
836            this.part = new ArrayList<OperationDefinitionParameterComponent>();
837          this.part.add(t);
838          return t;
839        }
840
841        public OperationDefinitionParameterComponent addPart(OperationDefinitionParameterComponent t) { //3
842          if (t == null)
843            return this;
844          if (this.part == null)
845            this.part = new ArrayList<OperationDefinitionParameterComponent>();
846          this.part.add(t);
847          return this;
848        }
849
850        /**
851         * @return The first repetition of repeating field {@link #part}, creating it if it does not already exist
852         */
853        public OperationDefinitionParameterComponent getPartFirstRep() { 
854          if (getPart().isEmpty()) {
855            addPart();
856          }
857          return getPart().get(0);
858        }
859
860        protected void listChildren(List<Property> children) {
861          super.listChildren(children);
862          children.add(new Property("name", "code", "The name of used to identify the parameter.", 0, 1, name));
863          children.add(new Property("use", "code", "Whether this is an input or an output parameter.", 0, 1, use));
864          children.add(new Property("min", "integer", "The minimum number of times this parameter SHALL appear in the request or response.", 0, 1, min));
865          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));
866          children.add(new Property("documentation", "string", "Describes the meaning or use of this parameter.", 0, 1, documentation));
867          children.add(new Property("type", "code", "The type for this parameter.", 0, 1, type));
868          children.add(new Property("targetProfile", "canonical(StructureDefinition)", "Used when the type is \"Reference\" or \"canonical\", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, targetProfile));
869          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));
870          children.add(new Property("binding", "", "Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).", 0, 1, binding));
871          children.add(new Property("referencedFrom", "", "Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.", 0, java.lang.Integer.MAX_VALUE, referencedFrom));
872          children.add(new Property("part", "@OperationDefinition.parameter", "The parts of a nested Parameter.", 0, java.lang.Integer.MAX_VALUE, part));
873        }
874
875        @Override
876        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
877          switch (_hash) {
878          case 3373707: /*name*/  return new Property("name", "code", "The name of used to identify the parameter.", 0, 1, name);
879          case 116103: /*use*/  return new Property("use", "code", "Whether this is an input or an output parameter.", 0, 1, use);
880          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);
881          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);
882          case 1587405498: /*documentation*/  return new Property("documentation", "string", "Describes the meaning or use of this parameter.", 0, 1, documentation);
883          case 3575610: /*type*/  return new Property("type", "code", "The type for this parameter.", 0, 1, type);
884          case 1994521304: /*targetProfile*/  return new Property("targetProfile", "canonical(StructureDefinition)", "Used when the type is \"Reference\" or \"canonical\", and identifies a profile structure or implementation Guide that applies to the target of the reference this parameter refers to. If any profiles are specified, then the content must conform to at least one of them. The URL can be a local reference - to a contained StructureDefinition, or a reference to another StructureDefinition or Implementation Guide by a canonical URL. When an implementation guide is specified, the target resource SHALL conform to at least one profile defined in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, targetProfile);
885          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);
886          case -108220795: /*binding*/  return new Property("binding", "", "Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).", 0, 1, binding);
887          case -1896721981: /*referencedFrom*/  return new Property("referencedFrom", "", "Identifies other resource parameters within the operation invocation that are expected to resolve to this resource.", 0, java.lang.Integer.MAX_VALUE, referencedFrom);
888          case 3433459: /*part*/  return new Property("part", "@OperationDefinition.parameter", "The parts of a nested Parameter.", 0, java.lang.Integer.MAX_VALUE, part);
889          default: return super.getNamedProperty(_hash, _name, _checkValid);
890          }
891
892        }
893
894      @Override
895      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
896        switch (hash) {
897        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // CodeType
898        case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<OperationParameterUse>
899        case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // IntegerType
900        case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
901        case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
902        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
903        case 1994521304: /*targetProfile*/ return this.targetProfile == null ? new Base[0] : this.targetProfile.toArray(new Base[this.targetProfile.size()]); // CanonicalType
904        case -710454014: /*searchType*/ return this.searchType == null ? new Base[0] : new Base[] {this.searchType}; // Enumeration<SearchParamType>
905        case -108220795: /*binding*/ return this.binding == null ? new Base[0] : new Base[] {this.binding}; // OperationDefinitionParameterBindingComponent
906        case -1896721981: /*referencedFrom*/ return this.referencedFrom == null ? new Base[0] : this.referencedFrom.toArray(new Base[this.referencedFrom.size()]); // OperationDefinitionParameterReferencedFromComponent
907        case 3433459: /*part*/ return this.part == null ? new Base[0] : this.part.toArray(new Base[this.part.size()]); // OperationDefinitionParameterComponent
908        default: return super.getProperty(hash, name, checkValid);
909        }
910
911      }
912
913      @Override
914      public Base setProperty(int hash, String name, Base value) throws FHIRException {
915        switch (hash) {
916        case 3373707: // name
917          this.name = castToCode(value); // CodeType
918          return value;
919        case 116103: // use
920          value = new OperationParameterUseEnumFactory().fromType(castToCode(value));
921          this.use = (Enumeration) value; // Enumeration<OperationParameterUse>
922          return value;
923        case 108114: // min
924          this.min = castToInteger(value); // IntegerType
925          return value;
926        case 107876: // max
927          this.max = castToString(value); // StringType
928          return value;
929        case 1587405498: // documentation
930          this.documentation = castToString(value); // StringType
931          return value;
932        case 3575610: // type
933          this.type = castToCode(value); // CodeType
934          return value;
935        case 1994521304: // targetProfile
936          this.getTargetProfile().add(castToCanonical(value)); // CanonicalType
937          return value;
938        case -710454014: // searchType
939          value = new SearchParamTypeEnumFactory().fromType(castToCode(value));
940          this.searchType = (Enumeration) value; // Enumeration<SearchParamType>
941          return value;
942        case -108220795: // binding
943          this.binding = (OperationDefinitionParameterBindingComponent) value; // OperationDefinitionParameterBindingComponent
944          return value;
945        case -1896721981: // referencedFrom
946          this.getReferencedFrom().add((OperationDefinitionParameterReferencedFromComponent) value); // OperationDefinitionParameterReferencedFromComponent
947          return value;
948        case 3433459: // part
949          this.getPart().add((OperationDefinitionParameterComponent) value); // OperationDefinitionParameterComponent
950          return value;
951        default: return super.setProperty(hash, name, value);
952        }
953
954      }
955
956      @Override
957      public Base setProperty(String name, Base value) throws FHIRException {
958        if (name.equals("name")) {
959          this.name = castToCode(value); // CodeType
960        } else if (name.equals("use")) {
961          value = new OperationParameterUseEnumFactory().fromType(castToCode(value));
962          this.use = (Enumeration) value; // Enumeration<OperationParameterUse>
963        } else if (name.equals("min")) {
964          this.min = castToInteger(value); // IntegerType
965        } else if (name.equals("max")) {
966          this.max = castToString(value); // StringType
967        } else if (name.equals("documentation")) {
968          this.documentation = castToString(value); // StringType
969        } else if (name.equals("type")) {
970          this.type = castToCode(value); // CodeType
971        } else if (name.equals("targetProfile")) {
972          this.getTargetProfile().add(castToCanonical(value));
973        } else if (name.equals("searchType")) {
974          value = new SearchParamTypeEnumFactory().fromType(castToCode(value));
975          this.searchType = (Enumeration) value; // Enumeration<SearchParamType>
976        } else if (name.equals("binding")) {
977          this.binding = (OperationDefinitionParameterBindingComponent) value; // OperationDefinitionParameterBindingComponent
978        } else if (name.equals("referencedFrom")) {
979          this.getReferencedFrom().add((OperationDefinitionParameterReferencedFromComponent) value);
980        } else if (name.equals("part")) {
981          this.getPart().add((OperationDefinitionParameterComponent) value);
982        } else
983          return super.setProperty(name, value);
984        return value;
985      }
986
987      @Override
988      public Base makeProperty(int hash, String name) throws FHIRException {
989        switch (hash) {
990        case 3373707:  return getNameElement();
991        case 116103:  return getUseElement();
992        case 108114:  return getMinElement();
993        case 107876:  return getMaxElement();
994        case 1587405498:  return getDocumentationElement();
995        case 3575610:  return getTypeElement();
996        case 1994521304:  return addTargetProfileElement();
997        case -710454014:  return getSearchTypeElement();
998        case -108220795:  return getBinding(); 
999        case -1896721981:  return addReferencedFrom(); 
1000        case 3433459:  return addPart(); 
1001        default: return super.makeProperty(hash, name);
1002        }
1003
1004      }
1005
1006      @Override
1007      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1008        switch (hash) {
1009        case 3373707: /*name*/ return new String[] {"code"};
1010        case 116103: /*use*/ return new String[] {"code"};
1011        case 108114: /*min*/ return new String[] {"integer"};
1012        case 107876: /*max*/ return new String[] {"string"};
1013        case 1587405498: /*documentation*/ return new String[] {"string"};
1014        case 3575610: /*type*/ return new String[] {"code"};
1015        case 1994521304: /*targetProfile*/ return new String[] {"canonical"};
1016        case -710454014: /*searchType*/ return new String[] {"code"};
1017        case -108220795: /*binding*/ return new String[] {};
1018        case -1896721981: /*referencedFrom*/ return new String[] {};
1019        case 3433459: /*part*/ return new String[] {"@OperationDefinition.parameter"};
1020        default: return super.getTypesForProperty(hash, name);
1021        }
1022
1023      }
1024
1025      @Override
1026      public Base addChild(String name) throws FHIRException {
1027        if (name.equals("name")) {
1028          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name");
1029        }
1030        else if (name.equals("use")) {
1031          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.use");
1032        }
1033        else if (name.equals("min")) {
1034          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.min");
1035        }
1036        else if (name.equals("max")) {
1037          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.max");
1038        }
1039        else if (name.equals("documentation")) {
1040          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.documentation");
1041        }
1042        else if (name.equals("type")) {
1043          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.type");
1044        }
1045        else if (name.equals("targetProfile")) {
1046          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.targetProfile");
1047        }
1048        else if (name.equals("searchType")) {
1049          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.searchType");
1050        }
1051        else if (name.equals("binding")) {
1052          this.binding = new OperationDefinitionParameterBindingComponent();
1053          return this.binding;
1054        }
1055        else if (name.equals("referencedFrom")) {
1056          return addReferencedFrom();
1057        }
1058        else if (name.equals("part")) {
1059          return addPart();
1060        }
1061        else
1062          return super.addChild(name);
1063      }
1064
1065      public OperationDefinitionParameterComponent copy() {
1066        OperationDefinitionParameterComponent dst = new OperationDefinitionParameterComponent();
1067        copyValues(dst);
1068        return dst;
1069      }
1070
1071      public void copyValues(OperationDefinitionParameterComponent dst) {
1072        super.copyValues(dst);
1073        dst.name = name == null ? null : name.copy();
1074        dst.use = use == null ? null : use.copy();
1075        dst.min = min == null ? null : min.copy();
1076        dst.max = max == null ? null : max.copy();
1077        dst.documentation = documentation == null ? null : documentation.copy();
1078        dst.type = type == null ? null : type.copy();
1079        if (targetProfile != null) {
1080          dst.targetProfile = new ArrayList<CanonicalType>();
1081          for (CanonicalType i : targetProfile)
1082            dst.targetProfile.add(i.copy());
1083        };
1084        dst.searchType = searchType == null ? null : searchType.copy();
1085        dst.binding = binding == null ? null : binding.copy();
1086        if (referencedFrom != null) {
1087          dst.referencedFrom = new ArrayList<OperationDefinitionParameterReferencedFromComponent>();
1088          for (OperationDefinitionParameterReferencedFromComponent i : referencedFrom)
1089            dst.referencedFrom.add(i.copy());
1090        };
1091        if (part != null) {
1092          dst.part = new ArrayList<OperationDefinitionParameterComponent>();
1093          for (OperationDefinitionParameterComponent i : part)
1094            dst.part.add(i.copy());
1095        };
1096      }
1097
1098      @Override
1099      public boolean equalsDeep(Base other_) {
1100        if (!super.equalsDeep(other_))
1101          return false;
1102        if (!(other_ instanceof OperationDefinitionParameterComponent))
1103          return false;
1104        OperationDefinitionParameterComponent o = (OperationDefinitionParameterComponent) other_;
1105        return compareDeep(name, o.name, true) && compareDeep(use, o.use, true) && compareDeep(min, o.min, true)
1106           && compareDeep(max, o.max, true) && compareDeep(documentation, o.documentation, true) && compareDeep(type, o.type, true)
1107           && compareDeep(targetProfile, o.targetProfile, true) && compareDeep(searchType, o.searchType, true)
1108           && compareDeep(binding, o.binding, true) && compareDeep(referencedFrom, o.referencedFrom, true)
1109           && compareDeep(part, o.part, true);
1110      }
1111
1112      @Override
1113      public boolean equalsShallow(Base other_) {
1114        if (!super.equalsShallow(other_))
1115          return false;
1116        if (!(other_ instanceof OperationDefinitionParameterComponent))
1117          return false;
1118        OperationDefinitionParameterComponent o = (OperationDefinitionParameterComponent) other_;
1119        return compareValues(name, o.name, true) && compareValues(use, o.use, true) && compareValues(min, o.min, true)
1120           && compareValues(max, o.max, true) && compareValues(documentation, o.documentation, true) && compareValues(type, o.type, true)
1121           && compareValues(searchType, o.searchType, true);
1122      }
1123
1124      public boolean isEmpty() {
1125        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, use, min, max, documentation
1126          , type, targetProfile, searchType, binding, referencedFrom, part);
1127      }
1128
1129  public String fhirType() {
1130    return "OperationDefinition.parameter";
1131
1132  }
1133
1134  }
1135
1136    @Block()
1137    public static class OperationDefinitionParameterBindingComponent extends BackboneElement implements IBaseBackboneElement {
1138        /**
1139         * 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.
1140         */
1141        @Child(name = "strength", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1142        @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." )
1143        @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/binding-strength")
1144        protected Enumeration<BindingStrength> strength;
1145
1146        /**
1147         * Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.
1148         */
1149        @Child(name = "valueSet", type = {CanonicalType.class}, order=2, min=1, max=1, modifier=false, summary=false)
1150        @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." )
1151        protected CanonicalType valueSet;
1152
1153        private static final long serialVersionUID = -2048653907L;
1154
1155    /**
1156     * Constructor
1157     */
1158      public OperationDefinitionParameterBindingComponent() {
1159        super();
1160      }
1161
1162    /**
1163     * Constructor
1164     */
1165      public OperationDefinitionParameterBindingComponent(Enumeration<BindingStrength> strength, CanonicalType valueSet) {
1166        super();
1167        this.strength = strength;
1168        this.valueSet = valueSet;
1169      }
1170
1171        /**
1172         * @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
1173         */
1174        public Enumeration<BindingStrength> getStrengthElement() { 
1175          if (this.strength == null)
1176            if (Configuration.errorOnAutoCreate())
1177              throw new Error("Attempt to auto-create OperationDefinitionParameterBindingComponent.strength");
1178            else if (Configuration.doAutoCreate())
1179              this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory()); // bb
1180          return this.strength;
1181        }
1182
1183        public boolean hasStrengthElement() { 
1184          return this.strength != null && !this.strength.isEmpty();
1185        }
1186
1187        public boolean hasStrength() { 
1188          return this.strength != null && !this.strength.isEmpty();
1189        }
1190
1191        /**
1192         * @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
1193         */
1194        public OperationDefinitionParameterBindingComponent setStrengthElement(Enumeration<BindingStrength> value) { 
1195          this.strength = value;
1196          return this;
1197        }
1198
1199        /**
1200         * @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.
1201         */
1202        public BindingStrength getStrength() { 
1203          return this.strength == null ? null : this.strength.getValue();
1204        }
1205
1206        /**
1207         * @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.
1208         */
1209        public OperationDefinitionParameterBindingComponent setStrength(BindingStrength value) { 
1210            if (this.strength == null)
1211              this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory());
1212            this.strength.setValue(value);
1213          return this;
1214        }
1215
1216        /**
1217         * @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.). This is the underlying object with id, value and extensions. The accessor "getValueSet" gives direct access to the value
1218         */
1219        public CanonicalType getValueSetElement() { 
1220          if (this.valueSet == null)
1221            if (Configuration.errorOnAutoCreate())
1222              throw new Error("Attempt to auto-create OperationDefinitionParameterBindingComponent.valueSet");
1223            else if (Configuration.doAutoCreate())
1224              this.valueSet = new CanonicalType(); // bb
1225          return this.valueSet;
1226        }
1227
1228        public boolean hasValueSetElement() { 
1229          return this.valueSet != null && !this.valueSet.isEmpty();
1230        }
1231
1232        public boolean hasValueSet() { 
1233          return this.valueSet != null && !this.valueSet.isEmpty();
1234        }
1235
1236        /**
1237         * @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.). This is the underlying object with id, value and extensions. The accessor "getValueSet" gives direct access to the value
1238         */
1239        public OperationDefinitionParameterBindingComponent setValueSetElement(CanonicalType value) { 
1240          this.valueSet = value;
1241          return this;
1242        }
1243
1244        /**
1245         * @return Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.
1246         */
1247        public String getValueSet() { 
1248          return this.valueSet == null ? null : this.valueSet.getValue();
1249        }
1250
1251        /**
1252         * @param value Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.
1253         */
1254        public OperationDefinitionParameterBindingComponent setValueSet(String value) { 
1255            if (this.valueSet == null)
1256              this.valueSet = new CanonicalType();
1257            this.valueSet.setValue(value);
1258          return this;
1259        }
1260
1261        protected void listChildren(List<Property> children) {
1262          super.listChildren(children);
1263          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));
1264          children.add(new Property("valueSet", "canonical(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));
1265        }
1266
1267        @Override
1268        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1269          switch (_hash) {
1270          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);
1271          case -1410174671: /*valueSet*/  return new Property("valueSet", "canonical(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);
1272          default: return super.getNamedProperty(_hash, _name, _checkValid);
1273          }
1274
1275        }
1276
1277      @Override
1278      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1279        switch (hash) {
1280        case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // Enumeration<BindingStrength>
1281        case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // CanonicalType
1282        default: return super.getProperty(hash, name, checkValid);
1283        }
1284
1285      }
1286
1287      @Override
1288      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1289        switch (hash) {
1290        case 1791316033: // strength
1291          value = new BindingStrengthEnumFactory().fromType(castToCode(value));
1292          this.strength = (Enumeration) value; // Enumeration<BindingStrength>
1293          return value;
1294        case -1410174671: // valueSet
1295          this.valueSet = castToCanonical(value); // CanonicalType
1296          return value;
1297        default: return super.setProperty(hash, name, value);
1298        }
1299
1300      }
1301
1302      @Override
1303      public Base setProperty(String name, Base value) throws FHIRException {
1304        if (name.equals("strength")) {
1305          value = new BindingStrengthEnumFactory().fromType(castToCode(value));
1306          this.strength = (Enumeration) value; // Enumeration<BindingStrength>
1307        } else if (name.equals("valueSet")) {
1308          this.valueSet = castToCanonical(value); // CanonicalType
1309        } else
1310          return super.setProperty(name, value);
1311        return value;
1312      }
1313
1314      @Override
1315      public Base makeProperty(int hash, String name) throws FHIRException {
1316        switch (hash) {
1317        case 1791316033:  return getStrengthElement();
1318        case -1410174671:  return getValueSetElement();
1319        default: return super.makeProperty(hash, name);
1320        }
1321
1322      }
1323
1324      @Override
1325      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1326        switch (hash) {
1327        case 1791316033: /*strength*/ return new String[] {"code"};
1328        case -1410174671: /*valueSet*/ return new String[] {"canonical"};
1329        default: return super.getTypesForProperty(hash, name);
1330        }
1331
1332      }
1333
1334      @Override
1335      public Base addChild(String name) throws FHIRException {
1336        if (name.equals("strength")) {
1337          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.strength");
1338        }
1339        else if (name.equals("valueSet")) {
1340          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.valueSet");
1341        }
1342        else
1343          return super.addChild(name);
1344      }
1345
1346      public OperationDefinitionParameterBindingComponent copy() {
1347        OperationDefinitionParameterBindingComponent dst = new OperationDefinitionParameterBindingComponent();
1348        copyValues(dst);
1349        return dst;
1350      }
1351
1352      public void copyValues(OperationDefinitionParameterBindingComponent dst) {
1353        super.copyValues(dst);
1354        dst.strength = strength == null ? null : strength.copy();
1355        dst.valueSet = valueSet == null ? null : valueSet.copy();
1356      }
1357
1358      @Override
1359      public boolean equalsDeep(Base other_) {
1360        if (!super.equalsDeep(other_))
1361          return false;
1362        if (!(other_ instanceof OperationDefinitionParameterBindingComponent))
1363          return false;
1364        OperationDefinitionParameterBindingComponent o = (OperationDefinitionParameterBindingComponent) other_;
1365        return compareDeep(strength, o.strength, true) && compareDeep(valueSet, o.valueSet, true);
1366      }
1367
1368      @Override
1369      public boolean equalsShallow(Base other_) {
1370        if (!super.equalsShallow(other_))
1371          return false;
1372        if (!(other_ instanceof OperationDefinitionParameterBindingComponent))
1373          return false;
1374        OperationDefinitionParameterBindingComponent o = (OperationDefinitionParameterBindingComponent) other_;
1375        return compareValues(strength, o.strength, true);
1376      }
1377
1378      public boolean isEmpty() {
1379        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(strength, valueSet);
1380      }
1381
1382  public String fhirType() {
1383    return "OperationDefinition.parameter.binding";
1384
1385  }
1386
1387  }
1388
1389    @Block()
1390    public static class OperationDefinitionParameterReferencedFromComponent extends BackboneElement implements IBaseBackboneElement {
1391        /**
1392         * The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.
1393         */
1394        @Child(name = "source", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false)
1395        @Description(shortDefinition="Referencing parameter", formalDefinition="The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource." )
1396        protected StringType source;
1397
1398        /**
1399         * The id of the element in the referencing resource that is expected to resolve to this resource.
1400         */
1401        @Child(name = "sourceId", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1402        @Description(shortDefinition="Element id of reference", formalDefinition="The id of the element in the referencing resource that is expected to resolve to this resource." )
1403        protected StringType sourceId;
1404
1405        private static final long serialVersionUID = -104239783L;
1406
1407    /**
1408     * Constructor
1409     */
1410      public OperationDefinitionParameterReferencedFromComponent() {
1411        super();
1412      }
1413
1414    /**
1415     * Constructor
1416     */
1417      public OperationDefinitionParameterReferencedFromComponent(StringType source) {
1418        super();
1419        this.source = source;
1420      }
1421
1422        /**
1423         * @return {@link #source} (The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
1424         */
1425        public StringType getSourceElement() { 
1426          if (this.source == null)
1427            if (Configuration.errorOnAutoCreate())
1428              throw new Error("Attempt to auto-create OperationDefinitionParameterReferencedFromComponent.source");
1429            else if (Configuration.doAutoCreate())
1430              this.source = new StringType(); // bb
1431          return this.source;
1432        }
1433
1434        public boolean hasSourceElement() { 
1435          return this.source != null && !this.source.isEmpty();
1436        }
1437
1438        public boolean hasSource() { 
1439          return this.source != null && !this.source.isEmpty();
1440        }
1441
1442        /**
1443         * @param value {@link #source} (The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value
1444         */
1445        public OperationDefinitionParameterReferencedFromComponent setSourceElement(StringType value) { 
1446          this.source = value;
1447          return this;
1448        }
1449
1450        /**
1451         * @return The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.
1452         */
1453        public String getSource() { 
1454          return this.source == null ? null : this.source.getValue();
1455        }
1456
1457        /**
1458         * @param value The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.
1459         */
1460        public OperationDefinitionParameterReferencedFromComponent setSource(String value) { 
1461            if (this.source == null)
1462              this.source = new StringType();
1463            this.source.setValue(value);
1464          return this;
1465        }
1466
1467        /**
1468         * @return {@link #sourceId} (The id of the element in the referencing resource that is expected to resolve to this resource.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
1469         */
1470        public StringType getSourceIdElement() { 
1471          if (this.sourceId == null)
1472            if (Configuration.errorOnAutoCreate())
1473              throw new Error("Attempt to auto-create OperationDefinitionParameterReferencedFromComponent.sourceId");
1474            else if (Configuration.doAutoCreate())
1475              this.sourceId = new StringType(); // bb
1476          return this.sourceId;
1477        }
1478
1479        public boolean hasSourceIdElement() { 
1480          return this.sourceId != null && !this.sourceId.isEmpty();
1481        }
1482
1483        public boolean hasSourceId() { 
1484          return this.sourceId != null && !this.sourceId.isEmpty();
1485        }
1486
1487        /**
1488         * @param value {@link #sourceId} (The id of the element in the referencing resource that is expected to resolve to this resource.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value
1489         */
1490        public OperationDefinitionParameterReferencedFromComponent setSourceIdElement(StringType value) { 
1491          this.sourceId = value;
1492          return this;
1493        }
1494
1495        /**
1496         * @return The id of the element in the referencing resource that is expected to resolve to this resource.
1497         */
1498        public String getSourceId() { 
1499          return this.sourceId == null ? null : this.sourceId.getValue();
1500        }
1501
1502        /**
1503         * @param value The id of the element in the referencing resource that is expected to resolve to this resource.
1504         */
1505        public OperationDefinitionParameterReferencedFromComponent setSourceId(String value) { 
1506          if (Utilities.noString(value))
1507            this.sourceId = null;
1508          else {
1509            if (this.sourceId == null)
1510              this.sourceId = new StringType();
1511            this.sourceId.setValue(value);
1512          }
1513          return this;
1514        }
1515
1516        protected void listChildren(List<Property> children) {
1517          super.listChildren(children);
1518          children.add(new Property("source", "string", "The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.", 0, 1, source));
1519          children.add(new Property("sourceId", "string", "The id of the element in the referencing resource that is expected to resolve to this resource.", 0, 1, sourceId));
1520        }
1521
1522        @Override
1523        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1524          switch (_hash) {
1525          case -896505829: /*source*/  return new Property("source", "string", "The name of the parameter or dot-separated path of parameter names pointing to the resource parameter that is expected to contain a reference to this resource.", 0, 1, source);
1526          case 1746327190: /*sourceId*/  return new Property("sourceId", "string", "The id of the element in the referencing resource that is expected to resolve to this resource.", 0, 1, sourceId);
1527          default: return super.getNamedProperty(_hash, _name, _checkValid);
1528          }
1529
1530        }
1531
1532      @Override
1533      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1534        switch (hash) {
1535        case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // StringType
1536        case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // StringType
1537        default: return super.getProperty(hash, name, checkValid);
1538        }
1539
1540      }
1541
1542      @Override
1543      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1544        switch (hash) {
1545        case -896505829: // source
1546          this.source = castToString(value); // StringType
1547          return value;
1548        case 1746327190: // sourceId
1549          this.sourceId = castToString(value); // StringType
1550          return value;
1551        default: return super.setProperty(hash, name, value);
1552        }
1553
1554      }
1555
1556      @Override
1557      public Base setProperty(String name, Base value) throws FHIRException {
1558        if (name.equals("source")) {
1559          this.source = castToString(value); // StringType
1560        } else if (name.equals("sourceId")) {
1561          this.sourceId = castToString(value); // StringType
1562        } else
1563          return super.setProperty(name, value);
1564        return value;
1565      }
1566
1567      @Override
1568      public Base makeProperty(int hash, String name) throws FHIRException {
1569        switch (hash) {
1570        case -896505829:  return getSourceElement();
1571        case 1746327190:  return getSourceIdElement();
1572        default: return super.makeProperty(hash, name);
1573        }
1574
1575      }
1576
1577      @Override
1578      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1579        switch (hash) {
1580        case -896505829: /*source*/ return new String[] {"string"};
1581        case 1746327190: /*sourceId*/ return new String[] {"string"};
1582        default: return super.getTypesForProperty(hash, name);
1583        }
1584
1585      }
1586
1587      @Override
1588      public Base addChild(String name) throws FHIRException {
1589        if (name.equals("source")) {
1590          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.source");
1591        }
1592        else if (name.equals("sourceId")) {
1593          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.sourceId");
1594        }
1595        else
1596          return super.addChild(name);
1597      }
1598
1599      public OperationDefinitionParameterReferencedFromComponent copy() {
1600        OperationDefinitionParameterReferencedFromComponent dst = new OperationDefinitionParameterReferencedFromComponent();
1601        copyValues(dst);
1602        return dst;
1603      }
1604
1605      public void copyValues(OperationDefinitionParameterReferencedFromComponent dst) {
1606        super.copyValues(dst);
1607        dst.source = source == null ? null : source.copy();
1608        dst.sourceId = sourceId == null ? null : sourceId.copy();
1609      }
1610
1611      @Override
1612      public boolean equalsDeep(Base other_) {
1613        if (!super.equalsDeep(other_))
1614          return false;
1615        if (!(other_ instanceof OperationDefinitionParameterReferencedFromComponent))
1616          return false;
1617        OperationDefinitionParameterReferencedFromComponent o = (OperationDefinitionParameterReferencedFromComponent) other_;
1618        return compareDeep(source, o.source, true) && compareDeep(sourceId, o.sourceId, true);
1619      }
1620
1621      @Override
1622      public boolean equalsShallow(Base other_) {
1623        if (!super.equalsShallow(other_))
1624          return false;
1625        if (!(other_ instanceof OperationDefinitionParameterReferencedFromComponent))
1626          return false;
1627        OperationDefinitionParameterReferencedFromComponent o = (OperationDefinitionParameterReferencedFromComponent) other_;
1628        return compareValues(source, o.source, true) && compareValues(sourceId, o.sourceId, true);
1629      }
1630
1631      public boolean isEmpty() {
1632        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(source, sourceId);
1633      }
1634
1635  public String fhirType() {
1636    return "OperationDefinition.parameter.referencedFrom";
1637
1638  }
1639
1640  }
1641
1642    @Block()
1643    public static class OperationDefinitionOverloadComponent extends BackboneElement implements IBaseBackboneElement {
1644        /**
1645         * Name of parameter to include in overload.
1646         */
1647        @Child(name = "parameterName", type = {StringType.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1648        @Description(shortDefinition="Name of parameter to include in overload", formalDefinition="Name of parameter to include in overload." )
1649        protected List<StringType> parameterName;
1650
1651        /**
1652         * Comments to go on overload.
1653         */
1654        @Child(name = "comment", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
1655        @Description(shortDefinition="Comments to go on overload", formalDefinition="Comments to go on overload." )
1656        protected StringType comment;
1657
1658        private static final long serialVersionUID = -907948545L;
1659
1660    /**
1661     * Constructor
1662     */
1663      public OperationDefinitionOverloadComponent() {
1664        super();
1665      }
1666
1667        /**
1668         * @return {@link #parameterName} (Name of parameter to include in overload.)
1669         */
1670        public List<StringType> getParameterName() { 
1671          if (this.parameterName == null)
1672            this.parameterName = new ArrayList<StringType>();
1673          return this.parameterName;
1674        }
1675
1676        /**
1677         * @return Returns a reference to <code>this</code> for easy method chaining
1678         */
1679        public OperationDefinitionOverloadComponent setParameterName(List<StringType> theParameterName) { 
1680          this.parameterName = theParameterName;
1681          return this;
1682        }
1683
1684        public boolean hasParameterName() { 
1685          if (this.parameterName == null)
1686            return false;
1687          for (StringType item : this.parameterName)
1688            if (!item.isEmpty())
1689              return true;
1690          return false;
1691        }
1692
1693        /**
1694         * @return {@link #parameterName} (Name of parameter to include in overload.)
1695         */
1696        public StringType addParameterNameElement() {//2 
1697          StringType t = new StringType();
1698          if (this.parameterName == null)
1699            this.parameterName = new ArrayList<StringType>();
1700          this.parameterName.add(t);
1701          return t;
1702        }
1703
1704        /**
1705         * @param value {@link #parameterName} (Name of parameter to include in overload.)
1706         */
1707        public OperationDefinitionOverloadComponent addParameterName(String value) { //1
1708          StringType t = new StringType();
1709          t.setValue(value);
1710          if (this.parameterName == null)
1711            this.parameterName = new ArrayList<StringType>();
1712          this.parameterName.add(t);
1713          return this;
1714        }
1715
1716        /**
1717         * @param value {@link #parameterName} (Name of parameter to include in overload.)
1718         */
1719        public boolean hasParameterName(String value) { 
1720          if (this.parameterName == null)
1721            return false;
1722          for (StringType v : this.parameterName)
1723            if (v.getValue().equals(value)) // string
1724              return true;
1725          return false;
1726        }
1727
1728        /**
1729         * @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
1730         */
1731        public StringType getCommentElement() { 
1732          if (this.comment == null)
1733            if (Configuration.errorOnAutoCreate())
1734              throw new Error("Attempt to auto-create OperationDefinitionOverloadComponent.comment");
1735            else if (Configuration.doAutoCreate())
1736              this.comment = new StringType(); // bb
1737          return this.comment;
1738        }
1739
1740        public boolean hasCommentElement() { 
1741          return this.comment != null && !this.comment.isEmpty();
1742        }
1743
1744        public boolean hasComment() { 
1745          return this.comment != null && !this.comment.isEmpty();
1746        }
1747
1748        /**
1749         * @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
1750         */
1751        public OperationDefinitionOverloadComponent setCommentElement(StringType value) { 
1752          this.comment = value;
1753          return this;
1754        }
1755
1756        /**
1757         * @return Comments to go on overload.
1758         */
1759        public String getComment() { 
1760          return this.comment == null ? null : this.comment.getValue();
1761        }
1762
1763        /**
1764         * @param value Comments to go on overload.
1765         */
1766        public OperationDefinitionOverloadComponent setComment(String value) { 
1767          if (Utilities.noString(value))
1768            this.comment = null;
1769          else {
1770            if (this.comment == null)
1771              this.comment = new StringType();
1772            this.comment.setValue(value);
1773          }
1774          return this;
1775        }
1776
1777        protected void listChildren(List<Property> children) {
1778          super.listChildren(children);
1779          children.add(new Property("parameterName", "string", "Name of parameter to include in overload.", 0, java.lang.Integer.MAX_VALUE, parameterName));
1780          children.add(new Property("comment", "string", "Comments to go on overload.", 0, 1, comment));
1781        }
1782
1783        @Override
1784        public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
1785          switch (_hash) {
1786          case -379607596: /*parameterName*/  return new Property("parameterName", "string", "Name of parameter to include in overload.", 0, java.lang.Integer.MAX_VALUE, parameterName);
1787          case 950398559: /*comment*/  return new Property("comment", "string", "Comments to go on overload.", 0, 1, comment);
1788          default: return super.getNamedProperty(_hash, _name, _checkValid);
1789          }
1790
1791        }
1792
1793      @Override
1794      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
1795        switch (hash) {
1796        case -379607596: /*parameterName*/ return this.parameterName == null ? new Base[0] : this.parameterName.toArray(new Base[this.parameterName.size()]); // StringType
1797        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // StringType
1798        default: return super.getProperty(hash, name, checkValid);
1799        }
1800
1801      }
1802
1803      @Override
1804      public Base setProperty(int hash, String name, Base value) throws FHIRException {
1805        switch (hash) {
1806        case -379607596: // parameterName
1807          this.getParameterName().add(castToString(value)); // StringType
1808          return value;
1809        case 950398559: // comment
1810          this.comment = castToString(value); // StringType
1811          return value;
1812        default: return super.setProperty(hash, name, value);
1813        }
1814
1815      }
1816
1817      @Override
1818      public Base setProperty(String name, Base value) throws FHIRException {
1819        if (name.equals("parameterName")) {
1820          this.getParameterName().add(castToString(value));
1821        } else if (name.equals("comment")) {
1822          this.comment = castToString(value); // StringType
1823        } else
1824          return super.setProperty(name, value);
1825        return value;
1826      }
1827
1828      @Override
1829      public Base makeProperty(int hash, String name) throws FHIRException {
1830        switch (hash) {
1831        case -379607596:  return addParameterNameElement();
1832        case 950398559:  return getCommentElement();
1833        default: return super.makeProperty(hash, name);
1834        }
1835
1836      }
1837
1838      @Override
1839      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
1840        switch (hash) {
1841        case -379607596: /*parameterName*/ return new String[] {"string"};
1842        case 950398559: /*comment*/ return new String[] {"string"};
1843        default: return super.getTypesForProperty(hash, name);
1844        }
1845
1846      }
1847
1848      @Override
1849      public Base addChild(String name) throws FHIRException {
1850        if (name.equals("parameterName")) {
1851          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.parameterName");
1852        }
1853        else if (name.equals("comment")) {
1854          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.comment");
1855        }
1856        else
1857          return super.addChild(name);
1858      }
1859
1860      public OperationDefinitionOverloadComponent copy() {
1861        OperationDefinitionOverloadComponent dst = new OperationDefinitionOverloadComponent();
1862        copyValues(dst);
1863        return dst;
1864      }
1865
1866      public void copyValues(OperationDefinitionOverloadComponent dst) {
1867        super.copyValues(dst);
1868        if (parameterName != null) {
1869          dst.parameterName = new ArrayList<StringType>();
1870          for (StringType i : parameterName)
1871            dst.parameterName.add(i.copy());
1872        };
1873        dst.comment = comment == null ? null : comment.copy();
1874      }
1875
1876      @Override
1877      public boolean equalsDeep(Base other_) {
1878        if (!super.equalsDeep(other_))
1879          return false;
1880        if (!(other_ instanceof OperationDefinitionOverloadComponent))
1881          return false;
1882        OperationDefinitionOverloadComponent o = (OperationDefinitionOverloadComponent) other_;
1883        return compareDeep(parameterName, o.parameterName, true) && compareDeep(comment, o.comment, true)
1884          ;
1885      }
1886
1887      @Override
1888      public boolean equalsShallow(Base other_) {
1889        if (!super.equalsShallow(other_))
1890          return false;
1891        if (!(other_ instanceof OperationDefinitionOverloadComponent))
1892          return false;
1893        OperationDefinitionOverloadComponent o = (OperationDefinitionOverloadComponent) other_;
1894        return compareValues(parameterName, o.parameterName, true) && compareValues(comment, o.comment, true)
1895          ;
1896      }
1897
1898      public boolean isEmpty() {
1899        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(parameterName, comment);
1900      }
1901
1902  public String fhirType() {
1903    return "OperationDefinition.overload";
1904
1905  }
1906
1907  }
1908
1909    /**
1910     * Whether this is an operation or a named query.
1911     */
1912    @Child(name = "kind", type = {CodeType.class}, order=0, min=1, max=1, modifier=false, summary=true)
1913    @Description(shortDefinition="operation | query", formalDefinition="Whether this is an operation or a named query." )
1914    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/operation-kind")
1915    protected Enumeration<OperationKind> kind;
1916
1917    /**
1918     * Explanation of why this operation definition is needed and why it has been designed as it has.
1919     */
1920    @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false)
1921    @Description(shortDefinition="Why this operation definition is defined", formalDefinition="Explanation of why this operation definition is needed and why it has been designed as it has." )
1922    protected MarkdownType purpose;
1923
1924    /**
1925     * Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.
1926     */
1927    @Child(name = "affectsState", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=true)
1928    @Description(shortDefinition="Whether content is changed by the operation", formalDefinition="Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'." )
1929    protected BooleanType affectsState;
1930
1931    /**
1932     * The name used to invoke the operation.
1933     */
1934    @Child(name = "code", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true)
1935    @Description(shortDefinition="Name used to invoke the operation", formalDefinition="The name used to invoke the operation." )
1936    protected CodeType code;
1937
1938    /**
1939     * Additional information about how to use this operation or named query.
1940     */
1941    @Child(name = "comment", type = {MarkdownType.class}, order=4, min=0, max=1, modifier=false, summary=false)
1942    @Description(shortDefinition="Additional information about use", formalDefinition="Additional information about how to use this operation or named query." )
1943    protected MarkdownType comment;
1944
1945    /**
1946     * Indicates that this operation definition is a constraining profile on the base.
1947     */
1948    @Child(name = "base", type = {CanonicalType.class}, order=5, min=0, max=1, modifier=false, summary=true)
1949    @Description(shortDefinition="Marks this as a profile of the base", formalDefinition="Indicates that this operation definition is a constraining profile on the base." )
1950    protected CanonicalType base;
1951
1952    /**
1953     * The types on which this operation can be executed.
1954     */
1955    @Child(name = "resource", type = {CodeType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
1956    @Description(shortDefinition="Types this operation applies to", formalDefinition="The types on which this operation can be executed." )
1957    @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types")
1958    protected List<CodeType> resource;
1959
1960    /**
1961     * 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).
1962     */
1963    @Child(name = "system", type = {BooleanType.class}, order=7, min=1, max=1, modifier=false, summary=true)
1964    @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)." )
1965    protected BooleanType system;
1966
1967    /**
1968     * 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).
1969     */
1970    @Child(name = "type", type = {BooleanType.class}, order=8, min=1, max=1, modifier=false, summary=true)
1971    @Description(shortDefinition="Invoke 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)." )
1972    protected BooleanType type;
1973
1974    /**
1975     * Indicates whether this operation can be invoked on a particular instance of one of the given types.
1976     */
1977    @Child(name = "instance", type = {BooleanType.class}, order=9, min=1, max=1, modifier=false, summary=true)
1978    @Description(shortDefinition="Invoke on an instance?", formalDefinition="Indicates whether this operation can be invoked on a particular instance of one of the given types." )
1979    protected BooleanType instance;
1980
1981    /**
1982     * Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.
1983     */
1984    @Child(name = "inputProfile", type = {CanonicalType.class}, order=10, min=0, max=1, modifier=false, summary=false)
1985    @Description(shortDefinition="Validation information for in parameters", formalDefinition="Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole." )
1986    protected CanonicalType inputProfile;
1987
1988    /**
1989     * Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.
1990     */
1991    @Child(name = "outputProfile", type = {CanonicalType.class}, order=11, min=0, max=1, modifier=false, summary=false)
1992    @Description(shortDefinition="Validation information for out parameters", formalDefinition="Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource." )
1993    protected CanonicalType outputProfile;
1994
1995    /**
1996     * The parameters for the operation/query.
1997     */
1998    @Child(name = "parameter", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
1999    @Description(shortDefinition="Parameters for the operation/query", formalDefinition="The parameters for the operation/query." )
2000    protected List<OperationDefinitionParameterComponent> parameter;
2001
2002    /**
2003     * Defines an appropriate combination of parameters to use when invoking this operation, to help code generators when generating overloaded parameter sets for this operation.
2004     */
2005    @Child(name = "overload", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
2006    @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." )
2007    protected List<OperationDefinitionOverloadComponent> overload;
2008
2009    private static final long serialVersionUID = 149113671L;
2010
2011  /**
2012   * Constructor
2013   */
2014    public OperationDefinition() {
2015      super();
2016    }
2017
2018  /**
2019   * Constructor
2020   */
2021    public OperationDefinition(StringType name, Enumeration<PublicationStatus> status, Enumeration<OperationKind> kind, CodeType code, BooleanType system, BooleanType type, BooleanType instance) {
2022      super();
2023      this.name = name;
2024      this.status = status;
2025      this.kind = kind;
2026      this.code = code;
2027      this.system = system;
2028      this.type = type;
2029      this.instance = instance;
2030    }
2031
2032    /**
2033     * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2034     */
2035    public UriType getUrlElement() { 
2036      if (this.url == null)
2037        if (Configuration.errorOnAutoCreate())
2038          throw new Error("Attempt to auto-create OperationDefinition.url");
2039        else if (Configuration.doAutoCreate())
2040          this.url = new UriType(); // bb
2041      return this.url;
2042    }
2043
2044    public boolean hasUrlElement() { 
2045      return this.url != null && !this.url.isEmpty();
2046    }
2047
2048    public boolean hasUrl() { 
2049      return this.url != null && !this.url.isEmpty();
2050    }
2051
2052    /**
2053     * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
2054     */
2055    public OperationDefinition setUrlElement(UriType value) { 
2056      this.url = value;
2057      return this;
2058    }
2059
2060    /**
2061     * @return An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.
2062     */
2063    public String getUrl() { 
2064      return this.url == null ? null : this.url.getValue();
2065    }
2066
2067    /**
2068     * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.
2069     */
2070    public OperationDefinition setUrl(String value) { 
2071      if (Utilities.noString(value))
2072        this.url = null;
2073      else {
2074        if (this.url == null)
2075          this.url = new UriType();
2076        this.url.setValue(value);
2077      }
2078      return this;
2079    }
2080
2081    /**
2082     * @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
2083     */
2084    public StringType getVersionElement() { 
2085      if (this.version == null)
2086        if (Configuration.errorOnAutoCreate())
2087          throw new Error("Attempt to auto-create OperationDefinition.version");
2088        else if (Configuration.doAutoCreate())
2089          this.version = new StringType(); // bb
2090      return this.version;
2091    }
2092
2093    public boolean hasVersionElement() { 
2094      return this.version != null && !this.version.isEmpty();
2095    }
2096
2097    public boolean hasVersion() { 
2098      return this.version != null && !this.version.isEmpty();
2099    }
2100
2101    /**
2102     * @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
2103     */
2104    public OperationDefinition setVersionElement(StringType value) { 
2105      this.version = value;
2106      return this;
2107    }
2108
2109    /**
2110     * @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.
2111     */
2112    public String getVersion() { 
2113      return this.version == null ? null : this.version.getValue();
2114    }
2115
2116    /**
2117     * @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.
2118     */
2119    public OperationDefinition setVersion(String value) { 
2120      if (Utilities.noString(value))
2121        this.version = null;
2122      else {
2123        if (this.version == null)
2124          this.version = new StringType();
2125        this.version.setValue(value);
2126      }
2127      return this;
2128    }
2129
2130    /**
2131     * @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
2132     */
2133    public StringType getNameElement() { 
2134      if (this.name == null)
2135        if (Configuration.errorOnAutoCreate())
2136          throw new Error("Attempt to auto-create OperationDefinition.name");
2137        else if (Configuration.doAutoCreate())
2138          this.name = new StringType(); // bb
2139      return this.name;
2140    }
2141
2142    public boolean hasNameElement() { 
2143      return this.name != null && !this.name.isEmpty();
2144    }
2145
2146    public boolean hasName() { 
2147      return this.name != null && !this.name.isEmpty();
2148    }
2149
2150    /**
2151     * @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
2152     */
2153    public OperationDefinition setNameElement(StringType value) { 
2154      this.name = value;
2155      return this;
2156    }
2157
2158    /**
2159     * @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.
2160     */
2161    public String getName() { 
2162      return this.name == null ? null : this.name.getValue();
2163    }
2164
2165    /**
2166     * @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.
2167     */
2168    public OperationDefinition setName(String value) { 
2169        if (this.name == null)
2170          this.name = new StringType();
2171        this.name.setValue(value);
2172      return this;
2173    }
2174
2175    /**
2176     * @return {@link #title} (A short, descriptive, user-friendly title for the operation definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2177     */
2178    public StringType getTitleElement() { 
2179      if (this.title == null)
2180        if (Configuration.errorOnAutoCreate())
2181          throw new Error("Attempt to auto-create OperationDefinition.title");
2182        else if (Configuration.doAutoCreate())
2183          this.title = new StringType(); // bb
2184      return this.title;
2185    }
2186
2187    public boolean hasTitleElement() { 
2188      return this.title != null && !this.title.isEmpty();
2189    }
2190
2191    public boolean hasTitle() { 
2192      return this.title != null && !this.title.isEmpty();
2193    }
2194
2195    /**
2196     * @param value {@link #title} (A short, descriptive, user-friendly title for the operation definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
2197     */
2198    public OperationDefinition setTitleElement(StringType value) { 
2199      this.title = value;
2200      return this;
2201    }
2202
2203    /**
2204     * @return A short, descriptive, user-friendly title for the operation definition.
2205     */
2206    public String getTitle() { 
2207      return this.title == null ? null : this.title.getValue();
2208    }
2209
2210    /**
2211     * @param value A short, descriptive, user-friendly title for the operation definition.
2212     */
2213    public OperationDefinition setTitle(String value) { 
2214      if (Utilities.noString(value))
2215        this.title = null;
2216      else {
2217        if (this.title == null)
2218          this.title = new StringType();
2219        this.title.setValue(value);
2220      }
2221      return this;
2222    }
2223
2224    /**
2225     * @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
2226     */
2227    public Enumeration<PublicationStatus> getStatusElement() { 
2228      if (this.status == null)
2229        if (Configuration.errorOnAutoCreate())
2230          throw new Error("Attempt to auto-create OperationDefinition.status");
2231        else if (Configuration.doAutoCreate())
2232          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb
2233      return this.status;
2234    }
2235
2236    public boolean hasStatusElement() { 
2237      return this.status != null && !this.status.isEmpty();
2238    }
2239
2240    public boolean hasStatus() { 
2241      return this.status != null && !this.status.isEmpty();
2242    }
2243
2244    /**
2245     * @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
2246     */
2247    public OperationDefinition setStatusElement(Enumeration<PublicationStatus> value) { 
2248      this.status = value;
2249      return this;
2250    }
2251
2252    /**
2253     * @return The status of this operation definition. Enables tracking the life-cycle of the content.
2254     */
2255    public PublicationStatus getStatus() { 
2256      return this.status == null ? null : this.status.getValue();
2257    }
2258
2259    /**
2260     * @param value The status of this operation definition. Enables tracking the life-cycle of the content.
2261     */
2262    public OperationDefinition setStatus(PublicationStatus value) { 
2263        if (this.status == null)
2264          this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory());
2265        this.status.setValue(value);
2266      return this;
2267    }
2268
2269    /**
2270     * @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
2271     */
2272    public Enumeration<OperationKind> getKindElement() { 
2273      if (this.kind == null)
2274        if (Configuration.errorOnAutoCreate())
2275          throw new Error("Attempt to auto-create OperationDefinition.kind");
2276        else if (Configuration.doAutoCreate())
2277          this.kind = new Enumeration<OperationKind>(new OperationKindEnumFactory()); // bb
2278      return this.kind;
2279    }
2280
2281    public boolean hasKindElement() { 
2282      return this.kind != null && !this.kind.isEmpty();
2283    }
2284
2285    public boolean hasKind() { 
2286      return this.kind != null && !this.kind.isEmpty();
2287    }
2288
2289    /**
2290     * @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
2291     */
2292    public OperationDefinition setKindElement(Enumeration<OperationKind> value) { 
2293      this.kind = value;
2294      return this;
2295    }
2296
2297    /**
2298     * @return Whether this is an operation or a named query.
2299     */
2300    public OperationKind getKind() { 
2301      return this.kind == null ? null : this.kind.getValue();
2302    }
2303
2304    /**
2305     * @param value Whether this is an operation or a named query.
2306     */
2307    public OperationDefinition setKind(OperationKind value) { 
2308        if (this.kind == null)
2309          this.kind = new Enumeration<OperationKind>(new OperationKindEnumFactory());
2310        this.kind.setValue(value);
2311      return this;
2312    }
2313
2314    /**
2315     * @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
2316     */
2317    public BooleanType getExperimentalElement() { 
2318      if (this.experimental == null)
2319        if (Configuration.errorOnAutoCreate())
2320          throw new Error("Attempt to auto-create OperationDefinition.experimental");
2321        else if (Configuration.doAutoCreate())
2322          this.experimental = new BooleanType(); // bb
2323      return this.experimental;
2324    }
2325
2326    public boolean hasExperimentalElement() { 
2327      return this.experimental != null && !this.experimental.isEmpty();
2328    }
2329
2330    public boolean hasExperimental() { 
2331      return this.experimental != null && !this.experimental.isEmpty();
2332    }
2333
2334    /**
2335     * @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
2336     */
2337    public OperationDefinition setExperimentalElement(BooleanType value) { 
2338      this.experimental = value;
2339      return this;
2340    }
2341
2342    /**
2343     * @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.
2344     */
2345    public boolean getExperimental() { 
2346      return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue();
2347    }
2348
2349    /**
2350     * @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.
2351     */
2352    public OperationDefinition setExperimental(boolean value) { 
2353        if (this.experimental == null)
2354          this.experimental = new BooleanType();
2355        this.experimental.setValue(value);
2356      return this;
2357    }
2358
2359    /**
2360     * @return {@link #date} (The date  (and optionally time) when the operation definition was published. The date must change 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
2361     */
2362    public DateTimeType getDateElement() { 
2363      if (this.date == null)
2364        if (Configuration.errorOnAutoCreate())
2365          throw new Error("Attempt to auto-create OperationDefinition.date");
2366        else if (Configuration.doAutoCreate())
2367          this.date = new DateTimeType(); // bb
2368      return this.date;
2369    }
2370
2371    public boolean hasDateElement() { 
2372      return this.date != null && !this.date.isEmpty();
2373    }
2374
2375    public boolean hasDate() { 
2376      return this.date != null && !this.date.isEmpty();
2377    }
2378
2379    /**
2380     * @param value {@link #date} (The date  (and optionally time) when the operation definition was published. The date must change 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
2381     */
2382    public OperationDefinition setDateElement(DateTimeType value) { 
2383      this.date = value;
2384      return this;
2385    }
2386
2387    /**
2388     * @return The date  (and optionally time) when the operation definition was published. The date must change 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.
2389     */
2390    public Date getDate() { 
2391      return this.date == null ? null : this.date.getValue();
2392    }
2393
2394    /**
2395     * @param value The date  (and optionally time) when the operation definition was published. The date must change 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.
2396     */
2397    public OperationDefinition setDate(Date value) { 
2398      if (value == null)
2399        this.date = null;
2400      else {
2401        if (this.date == null)
2402          this.date = new DateTimeType();
2403        this.date.setValue(value);
2404      }
2405      return this;
2406    }
2407
2408    /**
2409     * @return {@link #publisher} (The name of the organization or individual that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2410     */
2411    public StringType getPublisherElement() { 
2412      if (this.publisher == null)
2413        if (Configuration.errorOnAutoCreate())
2414          throw new Error("Attempt to auto-create OperationDefinition.publisher");
2415        else if (Configuration.doAutoCreate())
2416          this.publisher = new StringType(); // bb
2417      return this.publisher;
2418    }
2419
2420    public boolean hasPublisherElement() { 
2421      return this.publisher != null && !this.publisher.isEmpty();
2422    }
2423
2424    public boolean hasPublisher() { 
2425      return this.publisher != null && !this.publisher.isEmpty();
2426    }
2427
2428    /**
2429     * @param value {@link #publisher} (The name of the organization or individual that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value
2430     */
2431    public OperationDefinition setPublisherElement(StringType value) { 
2432      this.publisher = value;
2433      return this;
2434    }
2435
2436    /**
2437     * @return The name of the organization or individual that published the operation definition.
2438     */
2439    public String getPublisher() { 
2440      return this.publisher == null ? null : this.publisher.getValue();
2441    }
2442
2443    /**
2444     * @param value The name of the organization or individual that published the operation definition.
2445     */
2446    public OperationDefinition setPublisher(String value) { 
2447      if (Utilities.noString(value))
2448        this.publisher = null;
2449      else {
2450        if (this.publisher == null)
2451          this.publisher = new StringType();
2452        this.publisher.setValue(value);
2453      }
2454      return this;
2455    }
2456
2457    /**
2458     * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.)
2459     */
2460    public List<ContactDetail> getContact() { 
2461      if (this.contact == null)
2462        this.contact = new ArrayList<ContactDetail>();
2463      return this.contact;
2464    }
2465
2466    /**
2467     * @return Returns a reference to <code>this</code> for easy method chaining
2468     */
2469    public OperationDefinition setContact(List<ContactDetail> theContact) { 
2470      this.contact = theContact;
2471      return this;
2472    }
2473
2474    public boolean hasContact() { 
2475      if (this.contact == null)
2476        return false;
2477      for (ContactDetail item : this.contact)
2478        if (!item.isEmpty())
2479          return true;
2480      return false;
2481    }
2482
2483    public ContactDetail addContact() { //3
2484      ContactDetail t = new ContactDetail();
2485      if (this.contact == null)
2486        this.contact = new ArrayList<ContactDetail>();
2487      this.contact.add(t);
2488      return t;
2489    }
2490
2491    public OperationDefinition addContact(ContactDetail t) { //3
2492      if (t == null)
2493        return this;
2494      if (this.contact == null)
2495        this.contact = new ArrayList<ContactDetail>();
2496      this.contact.add(t);
2497      return this;
2498    }
2499
2500    /**
2501     * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
2502     */
2503    public ContactDetail getContactFirstRep() { 
2504      if (getContact().isEmpty()) {
2505        addContact();
2506      }
2507      return getContact().get(0);
2508    }
2509
2510    /**
2511     * @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
2512     */
2513    public MarkdownType getDescriptionElement() { 
2514      if (this.description == null)
2515        if (Configuration.errorOnAutoCreate())
2516          throw new Error("Attempt to auto-create OperationDefinition.description");
2517        else if (Configuration.doAutoCreate())
2518          this.description = new MarkdownType(); // bb
2519      return this.description;
2520    }
2521
2522    public boolean hasDescriptionElement() { 
2523      return this.description != null && !this.description.isEmpty();
2524    }
2525
2526    public boolean hasDescription() { 
2527      return this.description != null && !this.description.isEmpty();
2528    }
2529
2530    /**
2531     * @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
2532     */
2533    public OperationDefinition setDescriptionElement(MarkdownType value) { 
2534      this.description = value;
2535      return this;
2536    }
2537
2538    /**
2539     * @return A free text natural language description of the operation definition from a consumer's perspective.
2540     */
2541    public String getDescription() { 
2542      return this.description == null ? null : this.description.getValue();
2543    }
2544
2545    /**
2546     * @param value A free text natural language description of the operation definition from a consumer's perspective.
2547     */
2548    public OperationDefinition setDescription(String value) { 
2549      if (value == null)
2550        this.description = null;
2551      else {
2552        if (this.description == null)
2553          this.description = new MarkdownType();
2554        this.description.setValue(value);
2555      }
2556      return this;
2557    }
2558
2559    /**
2560     * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition instances.)
2561     */
2562    public List<UsageContext> getUseContext() { 
2563      if (this.useContext == null)
2564        this.useContext = new ArrayList<UsageContext>();
2565      return this.useContext;
2566    }
2567
2568    /**
2569     * @return Returns a reference to <code>this</code> for easy method chaining
2570     */
2571    public OperationDefinition setUseContext(List<UsageContext> theUseContext) { 
2572      this.useContext = theUseContext;
2573      return this;
2574    }
2575
2576    public boolean hasUseContext() { 
2577      if (this.useContext == null)
2578        return false;
2579      for (UsageContext item : this.useContext)
2580        if (!item.isEmpty())
2581          return true;
2582      return false;
2583    }
2584
2585    public UsageContext addUseContext() { //3
2586      UsageContext t = new UsageContext();
2587      if (this.useContext == null)
2588        this.useContext = new ArrayList<UsageContext>();
2589      this.useContext.add(t);
2590      return t;
2591    }
2592
2593    public OperationDefinition addUseContext(UsageContext t) { //3
2594      if (t == null)
2595        return this;
2596      if (this.useContext == null)
2597        this.useContext = new ArrayList<UsageContext>();
2598      this.useContext.add(t);
2599      return this;
2600    }
2601
2602    /**
2603     * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist
2604     */
2605    public UsageContext getUseContextFirstRep() { 
2606      if (getUseContext().isEmpty()) {
2607        addUseContext();
2608      }
2609      return getUseContext().get(0);
2610    }
2611
2612    /**
2613     * @return {@link #jurisdiction} (A legal or geographic region in which the operation definition is intended to be used.)
2614     */
2615    public List<CodeableConcept> getJurisdiction() { 
2616      if (this.jurisdiction == null)
2617        this.jurisdiction = new ArrayList<CodeableConcept>();
2618      return this.jurisdiction;
2619    }
2620
2621    /**
2622     * @return Returns a reference to <code>this</code> for easy method chaining
2623     */
2624    public OperationDefinition setJurisdiction(List<CodeableConcept> theJurisdiction) { 
2625      this.jurisdiction = theJurisdiction;
2626      return this;
2627    }
2628
2629    public boolean hasJurisdiction() { 
2630      if (this.jurisdiction == null)
2631        return false;
2632      for (CodeableConcept item : this.jurisdiction)
2633        if (!item.isEmpty())
2634          return true;
2635      return false;
2636    }
2637
2638    public CodeableConcept addJurisdiction() { //3
2639      CodeableConcept t = new CodeableConcept();
2640      if (this.jurisdiction == null)
2641        this.jurisdiction = new ArrayList<CodeableConcept>();
2642      this.jurisdiction.add(t);
2643      return t;
2644    }
2645
2646    public OperationDefinition addJurisdiction(CodeableConcept t) { //3
2647      if (t == null)
2648        return this;
2649      if (this.jurisdiction == null)
2650        this.jurisdiction = new ArrayList<CodeableConcept>();
2651      this.jurisdiction.add(t);
2652      return this;
2653    }
2654
2655    /**
2656     * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist
2657     */
2658    public CodeableConcept getJurisdictionFirstRep() { 
2659      if (getJurisdiction().isEmpty()) {
2660        addJurisdiction();
2661      }
2662      return getJurisdiction().get(0);
2663    }
2664
2665    /**
2666     * @return {@link #purpose} (Explanation 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
2667     */
2668    public MarkdownType getPurposeElement() { 
2669      if (this.purpose == null)
2670        if (Configuration.errorOnAutoCreate())
2671          throw new Error("Attempt to auto-create OperationDefinition.purpose");
2672        else if (Configuration.doAutoCreate())
2673          this.purpose = new MarkdownType(); // bb
2674      return this.purpose;
2675    }
2676
2677    public boolean hasPurposeElement() { 
2678      return this.purpose != null && !this.purpose.isEmpty();
2679    }
2680
2681    public boolean hasPurpose() { 
2682      return this.purpose != null && !this.purpose.isEmpty();
2683    }
2684
2685    /**
2686     * @param value {@link #purpose} (Explanation 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
2687     */
2688    public OperationDefinition setPurposeElement(MarkdownType value) { 
2689      this.purpose = value;
2690      return this;
2691    }
2692
2693    /**
2694     * @return Explanation of why this operation definition is needed and why it has been designed as it has.
2695     */
2696    public String getPurpose() { 
2697      return this.purpose == null ? null : this.purpose.getValue();
2698    }
2699
2700    /**
2701     * @param value Explanation of why this operation definition is needed and why it has been designed as it has.
2702     */
2703    public OperationDefinition setPurpose(String value) { 
2704      if (value == null)
2705        this.purpose = null;
2706      else {
2707        if (this.purpose == null)
2708          this.purpose = new MarkdownType();
2709        this.purpose.setValue(value);
2710      }
2711      return this;
2712    }
2713
2714    /**
2715     * @return {@link #affectsState} (Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.). This is the underlying object with id, value and extensions. The accessor "getAffectsState" gives direct access to the value
2716     */
2717    public BooleanType getAffectsStateElement() { 
2718      if (this.affectsState == null)
2719        if (Configuration.errorOnAutoCreate())
2720          throw new Error("Attempt to auto-create OperationDefinition.affectsState");
2721        else if (Configuration.doAutoCreate())
2722          this.affectsState = new BooleanType(); // bb
2723      return this.affectsState;
2724    }
2725
2726    public boolean hasAffectsStateElement() { 
2727      return this.affectsState != null && !this.affectsState.isEmpty();
2728    }
2729
2730    public boolean hasAffectsState() { 
2731      return this.affectsState != null && !this.affectsState.isEmpty();
2732    }
2733
2734    /**
2735     * @param value {@link #affectsState} (Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.). This is the underlying object with id, value and extensions. The accessor "getAffectsState" gives direct access to the value
2736     */
2737    public OperationDefinition setAffectsStateElement(BooleanType value) { 
2738      this.affectsState = value;
2739      return this;
2740    }
2741
2742    /**
2743     * @return Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.
2744     */
2745    public boolean getAffectsState() { 
2746      return this.affectsState == null || this.affectsState.isEmpty() ? false : this.affectsState.getValue();
2747    }
2748
2749    /**
2750     * @param value Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.
2751     */
2752    public OperationDefinition setAffectsState(boolean value) { 
2753        if (this.affectsState == null)
2754          this.affectsState = new BooleanType();
2755        this.affectsState.setValue(value);
2756      return this;
2757    }
2758
2759    /**
2760     * @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
2761     */
2762    public CodeType getCodeElement() { 
2763      if (this.code == null)
2764        if (Configuration.errorOnAutoCreate())
2765          throw new Error("Attempt to auto-create OperationDefinition.code");
2766        else if (Configuration.doAutoCreate())
2767          this.code = new CodeType(); // bb
2768      return this.code;
2769    }
2770
2771    public boolean hasCodeElement() { 
2772      return this.code != null && !this.code.isEmpty();
2773    }
2774
2775    public boolean hasCode() { 
2776      return this.code != null && !this.code.isEmpty();
2777    }
2778
2779    /**
2780     * @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
2781     */
2782    public OperationDefinition setCodeElement(CodeType value) { 
2783      this.code = value;
2784      return this;
2785    }
2786
2787    /**
2788     * @return The name used to invoke the operation.
2789     */
2790    public String getCode() { 
2791      return this.code == null ? null : this.code.getValue();
2792    }
2793
2794    /**
2795     * @param value The name used to invoke the operation.
2796     */
2797    public OperationDefinition setCode(String value) { 
2798        if (this.code == null)
2799          this.code = new CodeType();
2800        this.code.setValue(value);
2801      return this;
2802    }
2803
2804    /**
2805     * @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
2806     */
2807    public MarkdownType getCommentElement() { 
2808      if (this.comment == null)
2809        if (Configuration.errorOnAutoCreate())
2810          throw new Error("Attempt to auto-create OperationDefinition.comment");
2811        else if (Configuration.doAutoCreate())
2812          this.comment = new MarkdownType(); // bb
2813      return this.comment;
2814    }
2815
2816    public boolean hasCommentElement() { 
2817      return this.comment != null && !this.comment.isEmpty();
2818    }
2819
2820    public boolean hasComment() { 
2821      return this.comment != null && !this.comment.isEmpty();
2822    }
2823
2824    /**
2825     * @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
2826     */
2827    public OperationDefinition setCommentElement(MarkdownType value) { 
2828      this.comment = value;
2829      return this;
2830    }
2831
2832    /**
2833     * @return Additional information about how to use this operation or named query.
2834     */
2835    public String getComment() { 
2836      return this.comment == null ? null : this.comment.getValue();
2837    }
2838
2839    /**
2840     * @param value Additional information about how to use this operation or named query.
2841     */
2842    public OperationDefinition setComment(String value) { 
2843      if (value == null)
2844        this.comment = null;
2845      else {
2846        if (this.comment == null)
2847          this.comment = new MarkdownType();
2848        this.comment.setValue(value);
2849      }
2850      return this;
2851    }
2852
2853    /**
2854     * @return {@link #base} (Indicates that this operation definition is a constraining profile on the base.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value
2855     */
2856    public CanonicalType getBaseElement() { 
2857      if (this.base == null)
2858        if (Configuration.errorOnAutoCreate())
2859          throw new Error("Attempt to auto-create OperationDefinition.base");
2860        else if (Configuration.doAutoCreate())
2861          this.base = new CanonicalType(); // bb
2862      return this.base;
2863    }
2864
2865    public boolean hasBaseElement() { 
2866      return this.base != null && !this.base.isEmpty();
2867    }
2868
2869    public boolean hasBase() { 
2870      return this.base != null && !this.base.isEmpty();
2871    }
2872
2873    /**
2874     * @param value {@link #base} (Indicates that this operation definition is a constraining profile on the base.). This is the underlying object with id, value and extensions. The accessor "getBase" gives direct access to the value
2875     */
2876    public OperationDefinition setBaseElement(CanonicalType value) { 
2877      this.base = value;
2878      return this;
2879    }
2880
2881    /**
2882     * @return Indicates that this operation definition is a constraining profile on the base.
2883     */
2884    public String getBase() { 
2885      return this.base == null ? null : this.base.getValue();
2886    }
2887
2888    /**
2889     * @param value Indicates that this operation definition is a constraining profile on the base.
2890     */
2891    public OperationDefinition setBase(String value) { 
2892      if (Utilities.noString(value))
2893        this.base = null;
2894      else {
2895        if (this.base == null)
2896          this.base = new CanonicalType();
2897        this.base.setValue(value);
2898      }
2899      return this;
2900    }
2901
2902    /**
2903     * @return {@link #resource} (The types on which this operation can be executed.)
2904     */
2905    public List<CodeType> getResource() { 
2906      if (this.resource == null)
2907        this.resource = new ArrayList<CodeType>();
2908      return this.resource;
2909    }
2910
2911    /**
2912     * @return Returns a reference to <code>this</code> for easy method chaining
2913     */
2914    public OperationDefinition setResource(List<CodeType> theResource) { 
2915      this.resource = theResource;
2916      return this;
2917    }
2918
2919    public boolean hasResource() { 
2920      if (this.resource == null)
2921        return false;
2922      for (CodeType item : this.resource)
2923        if (!item.isEmpty())
2924          return true;
2925      return false;
2926    }
2927
2928    /**
2929     * @return {@link #resource} (The types on which this operation can be executed.)
2930     */
2931    public CodeType addResourceElement() {//2 
2932      CodeType t = new CodeType();
2933      if (this.resource == null)
2934        this.resource = new ArrayList<CodeType>();
2935      this.resource.add(t);
2936      return t;
2937    }
2938
2939    /**
2940     * @param value {@link #resource} (The types on which this operation can be executed.)
2941     */
2942    public OperationDefinition addResource(String value) { //1
2943      CodeType t = new CodeType();
2944      t.setValue(value);
2945      if (this.resource == null)
2946        this.resource = new ArrayList<CodeType>();
2947      this.resource.add(t);
2948      return this;
2949    }
2950
2951    /**
2952     * @param value {@link #resource} (The types on which this operation can be executed.)
2953     */
2954    public boolean hasResource(String value) { 
2955      if (this.resource == null)
2956        return false;
2957      for (CodeType v : this.resource)
2958        if (v.getValue().equals(value)) // code
2959          return true;
2960      return false;
2961    }
2962
2963    /**
2964     * @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
2965     */
2966    public BooleanType getSystemElement() { 
2967      if (this.system == null)
2968        if (Configuration.errorOnAutoCreate())
2969          throw new Error("Attempt to auto-create OperationDefinition.system");
2970        else if (Configuration.doAutoCreate())
2971          this.system = new BooleanType(); // bb
2972      return this.system;
2973    }
2974
2975    public boolean hasSystemElement() { 
2976      return this.system != null && !this.system.isEmpty();
2977    }
2978
2979    public boolean hasSystem() { 
2980      return this.system != null && !this.system.isEmpty();
2981    }
2982
2983    /**
2984     * @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
2985     */
2986    public OperationDefinition setSystemElement(BooleanType value) { 
2987      this.system = value;
2988      return this;
2989    }
2990
2991    /**
2992     * @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).
2993     */
2994    public boolean getSystem() { 
2995      return this.system == null || this.system.isEmpty() ? false : this.system.getValue();
2996    }
2997
2998    /**
2999     * @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).
3000     */
3001    public OperationDefinition setSystem(boolean value) { 
3002        if (this.system == null)
3003          this.system = new BooleanType();
3004        this.system.setValue(value);
3005      return this;
3006    }
3007
3008    /**
3009     * @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
3010     */
3011    public BooleanType getTypeElement() { 
3012      if (this.type == null)
3013        if (Configuration.errorOnAutoCreate())
3014          throw new Error("Attempt to auto-create OperationDefinition.type");
3015        else if (Configuration.doAutoCreate())
3016          this.type = new BooleanType(); // bb
3017      return this.type;
3018    }
3019
3020    public boolean hasTypeElement() { 
3021      return this.type != null && !this.type.isEmpty();
3022    }
3023
3024    public boolean hasType() { 
3025      return this.type != null && !this.type.isEmpty();
3026    }
3027
3028    /**
3029     * @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
3030     */
3031    public OperationDefinition setTypeElement(BooleanType value) { 
3032      this.type = value;
3033      return this;
3034    }
3035
3036    /**
3037     * @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).
3038     */
3039    public boolean getType() { 
3040      return this.type == null || this.type.isEmpty() ? false : this.type.getValue();
3041    }
3042
3043    /**
3044     * @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).
3045     */
3046    public OperationDefinition setType(boolean value) { 
3047        if (this.type == null)
3048          this.type = new BooleanType();
3049        this.type.setValue(value);
3050      return this;
3051    }
3052
3053    /**
3054     * @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
3055     */
3056    public BooleanType getInstanceElement() { 
3057      if (this.instance == null)
3058        if (Configuration.errorOnAutoCreate())
3059          throw new Error("Attempt to auto-create OperationDefinition.instance");
3060        else if (Configuration.doAutoCreate())
3061          this.instance = new BooleanType(); // bb
3062      return this.instance;
3063    }
3064
3065    public boolean hasInstanceElement() { 
3066      return this.instance != null && !this.instance.isEmpty();
3067    }
3068
3069    public boolean hasInstance() { 
3070      return this.instance != null && !this.instance.isEmpty();
3071    }
3072
3073    /**
3074     * @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
3075     */
3076    public OperationDefinition setInstanceElement(BooleanType value) { 
3077      this.instance = value;
3078      return this;
3079    }
3080
3081    /**
3082     * @return Indicates whether this operation can be invoked on a particular instance of one of the given types.
3083     */
3084    public boolean getInstance() { 
3085      return this.instance == null || this.instance.isEmpty() ? false : this.instance.getValue();
3086    }
3087
3088    /**
3089     * @param value Indicates whether this operation can be invoked on a particular instance of one of the given types.
3090     */
3091    public OperationDefinition setInstance(boolean value) { 
3092        if (this.instance == null)
3093          this.instance = new BooleanType();
3094        this.instance.setValue(value);
3095      return this;
3096    }
3097
3098    /**
3099     * @return {@link #inputProfile} (Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.). This is the underlying object with id, value and extensions. The accessor "getInputProfile" gives direct access to the value
3100     */
3101    public CanonicalType getInputProfileElement() { 
3102      if (this.inputProfile == null)
3103        if (Configuration.errorOnAutoCreate())
3104          throw new Error("Attempt to auto-create OperationDefinition.inputProfile");
3105        else if (Configuration.doAutoCreate())
3106          this.inputProfile = new CanonicalType(); // bb
3107      return this.inputProfile;
3108    }
3109
3110    public boolean hasInputProfileElement() { 
3111      return this.inputProfile != null && !this.inputProfile.isEmpty();
3112    }
3113
3114    public boolean hasInputProfile() { 
3115      return this.inputProfile != null && !this.inputProfile.isEmpty();
3116    }
3117
3118    /**
3119     * @param value {@link #inputProfile} (Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.). This is the underlying object with id, value and extensions. The accessor "getInputProfile" gives direct access to the value
3120     */
3121    public OperationDefinition setInputProfileElement(CanonicalType value) { 
3122      this.inputProfile = value;
3123      return this;
3124    }
3125
3126    /**
3127     * @return Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.
3128     */
3129    public String getInputProfile() { 
3130      return this.inputProfile == null ? null : this.inputProfile.getValue();
3131    }
3132
3133    /**
3134     * @param value Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.
3135     */
3136    public OperationDefinition setInputProfile(String value) { 
3137      if (Utilities.noString(value))
3138        this.inputProfile = null;
3139      else {
3140        if (this.inputProfile == null)
3141          this.inputProfile = new CanonicalType();
3142        this.inputProfile.setValue(value);
3143      }
3144      return this;
3145    }
3146
3147    /**
3148     * @return {@link #outputProfile} (Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.). This is the underlying object with id, value and extensions. The accessor "getOutputProfile" gives direct access to the value
3149     */
3150    public CanonicalType getOutputProfileElement() { 
3151      if (this.outputProfile == null)
3152        if (Configuration.errorOnAutoCreate())
3153          throw new Error("Attempt to auto-create OperationDefinition.outputProfile");
3154        else if (Configuration.doAutoCreate())
3155          this.outputProfile = new CanonicalType(); // bb
3156      return this.outputProfile;
3157    }
3158
3159    public boolean hasOutputProfileElement() { 
3160      return this.outputProfile != null && !this.outputProfile.isEmpty();
3161    }
3162
3163    public boolean hasOutputProfile() { 
3164      return this.outputProfile != null && !this.outputProfile.isEmpty();
3165    }
3166
3167    /**
3168     * @param value {@link #outputProfile} (Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.). This is the underlying object with id, value and extensions. The accessor "getOutputProfile" gives direct access to the value
3169     */
3170    public OperationDefinition setOutputProfileElement(CanonicalType value) { 
3171      this.outputProfile = value;
3172      return this;
3173    }
3174
3175    /**
3176     * @return Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.
3177     */
3178    public String getOutputProfile() { 
3179      return this.outputProfile == null ? null : this.outputProfile.getValue();
3180    }
3181
3182    /**
3183     * @param value Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.
3184     */
3185    public OperationDefinition setOutputProfile(String value) { 
3186      if (Utilities.noString(value))
3187        this.outputProfile = null;
3188      else {
3189        if (this.outputProfile == null)
3190          this.outputProfile = new CanonicalType();
3191        this.outputProfile.setValue(value);
3192      }
3193      return this;
3194    }
3195
3196    /**
3197     * @return {@link #parameter} (The parameters for the operation/query.)
3198     */
3199    public List<OperationDefinitionParameterComponent> getParameter() { 
3200      if (this.parameter == null)
3201        this.parameter = new ArrayList<OperationDefinitionParameterComponent>();
3202      return this.parameter;
3203    }
3204
3205    /**
3206     * @return Returns a reference to <code>this</code> for easy method chaining
3207     */
3208    public OperationDefinition setParameter(List<OperationDefinitionParameterComponent> theParameter) { 
3209      this.parameter = theParameter;
3210      return this;
3211    }
3212
3213    public boolean hasParameter() { 
3214      if (this.parameter == null)
3215        return false;
3216      for (OperationDefinitionParameterComponent item : this.parameter)
3217        if (!item.isEmpty())
3218          return true;
3219      return false;
3220    }
3221
3222    public OperationDefinitionParameterComponent addParameter() { //3
3223      OperationDefinitionParameterComponent t = new OperationDefinitionParameterComponent();
3224      if (this.parameter == null)
3225        this.parameter = new ArrayList<OperationDefinitionParameterComponent>();
3226      this.parameter.add(t);
3227      return t;
3228    }
3229
3230    public OperationDefinition addParameter(OperationDefinitionParameterComponent t) { //3
3231      if (t == null)
3232        return this;
3233      if (this.parameter == null)
3234        this.parameter = new ArrayList<OperationDefinitionParameterComponent>();
3235      this.parameter.add(t);
3236      return this;
3237    }
3238
3239    /**
3240     * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist
3241     */
3242    public OperationDefinitionParameterComponent getParameterFirstRep() { 
3243      if (getParameter().isEmpty()) {
3244        addParameter();
3245      }
3246      return getParameter().get(0);
3247    }
3248
3249    /**
3250     * @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.)
3251     */
3252    public List<OperationDefinitionOverloadComponent> getOverload() { 
3253      if (this.overload == null)
3254        this.overload = new ArrayList<OperationDefinitionOverloadComponent>();
3255      return this.overload;
3256    }
3257
3258    /**
3259     * @return Returns a reference to <code>this</code> for easy method chaining
3260     */
3261    public OperationDefinition setOverload(List<OperationDefinitionOverloadComponent> theOverload) { 
3262      this.overload = theOverload;
3263      return this;
3264    }
3265
3266    public boolean hasOverload() { 
3267      if (this.overload == null)
3268        return false;
3269      for (OperationDefinitionOverloadComponent item : this.overload)
3270        if (!item.isEmpty())
3271          return true;
3272      return false;
3273    }
3274
3275    public OperationDefinitionOverloadComponent addOverload() { //3
3276      OperationDefinitionOverloadComponent t = new OperationDefinitionOverloadComponent();
3277      if (this.overload == null)
3278        this.overload = new ArrayList<OperationDefinitionOverloadComponent>();
3279      this.overload.add(t);
3280      return t;
3281    }
3282
3283    public OperationDefinition addOverload(OperationDefinitionOverloadComponent t) { //3
3284      if (t == null)
3285        return this;
3286      if (this.overload == null)
3287        this.overload = new ArrayList<OperationDefinitionOverloadComponent>();
3288      this.overload.add(t);
3289      return this;
3290    }
3291
3292    /**
3293     * @return The first repetition of repeating field {@link #overload}, creating it if it does not already exist
3294     */
3295    public OperationDefinitionOverloadComponent getOverloadFirstRep() { 
3296      if (getOverload().isEmpty()) {
3297        addOverload();
3298      }
3299      return getOverload().get(0);
3300    }
3301
3302      protected void listChildren(List<Property> children) {
3303        super.listChildren(children);
3304        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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.", 0, 1, url));
3305        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));
3306        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));
3307        children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the operation definition.", 0, 1, title));
3308        children.add(new Property("status", "code", "The status of this operation definition. Enables tracking the life-cycle of the content.", 0, 1, status));
3309        children.add(new Property("kind", "code", "Whether this is an operation or a named query.", 0, 1, kind));
3310        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));
3311        children.add(new Property("date", "dateTime", "The date  (and optionally time) when the operation definition was published. The date must change 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));
3312        children.add(new Property("publisher", "string", "The name of the organization or individual that published the operation definition.", 0, 1, publisher));
3313        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));
3314        children.add(new Property("description", "markdown", "A free text natural language description of the operation definition from a consumer's perspective.", 0, 1, description));
3315        children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext));
3316        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));
3317        children.add(new Property("purpose", "markdown", "Explanation of why this operation definition is needed and why it has been designed as it has.", 0, 1, purpose));
3318        children.add(new Property("affectsState", "boolean", "Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.", 0, 1, affectsState));
3319        children.add(new Property("code", "code", "The name used to invoke the operation.", 0, 1, code));
3320        children.add(new Property("comment", "markdown", "Additional information about how to use this operation or named query.", 0, 1, comment));
3321        children.add(new Property("base", "canonical(OperationDefinition)", "Indicates that this operation definition is a constraining profile on the base.", 0, 1, base));
3322        children.add(new Property("resource", "code", "The types on which this operation can be executed.", 0, java.lang.Integer.MAX_VALUE, resource));
3323        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));
3324        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));
3325        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));
3326        children.add(new Property("inputProfile", "canonical(StructureDefinition)", "Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.", 0, 1, inputProfile));
3327        children.add(new Property("outputProfile", "canonical(StructureDefinition)", "Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.", 0, 1, outputProfile));
3328        children.add(new Property("parameter", "", "The parameters for the operation/query.", 0, java.lang.Integer.MAX_VALUE, parameter));
3329        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));
3330      }
3331
3332      @Override
3333      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
3334        switch (_hash) {
3335        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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers.", 0, 1, url);
3336        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);
3337        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);
3338        case 110371416: /*title*/  return new Property("title", "string", "A short, descriptive, user-friendly title for the operation definition.", 0, 1, title);
3339        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);
3340        case 3292052: /*kind*/  return new Property("kind", "code", "Whether this is an operation or a named query.", 0, 1, kind);
3341        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);
3342        case 3076014: /*date*/  return new Property("date", "dateTime", "The date  (and optionally time) when the operation definition was published. The date must change 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);
3343        case 1447404028: /*publisher*/  return new Property("publisher", "string", "The name of the organization or individual that published the operation definition.", 0, 1, publisher);
3344        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);
3345        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);
3346        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 contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate operation definition instances.", 0, java.lang.Integer.MAX_VALUE, useContext);
3347        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);
3348        case -220463842: /*purpose*/  return new Property("purpose", "markdown", "Explanation of why this operation definition is needed and why it has been designed as it has.", 0, 1, purpose);
3349        case -14805197: /*affectsState*/  return new Property("affectsState", "boolean", "Whether the operation affects state. Side effects such as producing audit trail entries do not count as 'affecting  state'.", 0, 1, affectsState);
3350        case 3059181: /*code*/  return new Property("code", "code", "The name used to invoke the operation.", 0, 1, code);
3351        case 950398559: /*comment*/  return new Property("comment", "markdown", "Additional information about how to use this operation or named query.", 0, 1, comment);
3352        case 3016401: /*base*/  return new Property("base", "canonical(OperationDefinition)", "Indicates that this operation definition is a constraining profile on the base.", 0, 1, base);
3353        case -341064690: /*resource*/  return new Property("resource", "code", "The types on which this operation can be executed.", 0, java.lang.Integer.MAX_VALUE, resource);
3354        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);
3355        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);
3356        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);
3357        case 676942463: /*inputProfile*/  return new Property("inputProfile", "canonical(StructureDefinition)", "Additional validation information for the in parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource as a whole.", 0, 1, inputProfile);
3358        case 1826166120: /*outputProfile*/  return new Property("outputProfile", "canonical(StructureDefinition)", "Additional validation information for the out parameters - a single profile that covers all the parameters. The profile is a constraint on the parameters resource.", 0, 1, outputProfile);
3359        case 1954460585: /*parameter*/  return new Property("parameter", "", "The parameters for the operation/query.", 0, java.lang.Integer.MAX_VALUE, parameter);
3360        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);
3361        default: return super.getNamedProperty(_hash, _name, _checkValid);
3362        }
3363
3364      }
3365
3366      @Override
3367      public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
3368        switch (hash) {
3369        case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
3370        case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
3371        case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
3372        case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
3373        case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus>
3374        case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<OperationKind>
3375        case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
3376        case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType
3377        case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
3378        case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail
3379        case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType
3380        case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext
3381        case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept
3382        case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType
3383        case -14805197: /*affectsState*/ return this.affectsState == null ? new Base[0] : new Base[] {this.affectsState}; // BooleanType
3384        case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
3385        case 950398559: /*comment*/ return this.comment == null ? new Base[0] : new Base[] {this.comment}; // MarkdownType
3386        case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // CanonicalType
3387        case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // CodeType
3388        case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // BooleanType
3389        case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // BooleanType
3390        case 555127957: /*instance*/ return this.instance == null ? new Base[0] : new Base[] {this.instance}; // BooleanType
3391        case 676942463: /*inputProfile*/ return this.inputProfile == null ? new Base[0] : new Base[] {this.inputProfile}; // CanonicalType
3392        case 1826166120: /*outputProfile*/ return this.outputProfile == null ? new Base[0] : new Base[] {this.outputProfile}; // CanonicalType
3393        case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // OperationDefinitionParameterComponent
3394        case 529823674: /*overload*/ return this.overload == null ? new Base[0] : this.overload.toArray(new Base[this.overload.size()]); // OperationDefinitionOverloadComponent
3395        default: return super.getProperty(hash, name, checkValid);
3396        }
3397
3398      }
3399
3400      @Override
3401      public Base setProperty(int hash, String name, Base value) throws FHIRException {
3402        switch (hash) {
3403        case 116079: // url
3404          this.url = castToUri(value); // UriType
3405          return value;
3406        case 351608024: // version
3407          this.version = castToString(value); // StringType
3408          return value;
3409        case 3373707: // name
3410          this.name = castToString(value); // StringType
3411          return value;
3412        case 110371416: // title
3413          this.title = castToString(value); // StringType
3414          return value;
3415        case -892481550: // status
3416          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
3417          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3418          return value;
3419        case 3292052: // kind
3420          value = new OperationKindEnumFactory().fromType(castToCode(value));
3421          this.kind = (Enumeration) value; // Enumeration<OperationKind>
3422          return value;
3423        case -404562712: // experimental
3424          this.experimental = castToBoolean(value); // BooleanType
3425          return value;
3426        case 3076014: // date
3427          this.date = castToDateTime(value); // DateTimeType
3428          return value;
3429        case 1447404028: // publisher
3430          this.publisher = castToString(value); // StringType
3431          return value;
3432        case 951526432: // contact
3433          this.getContact().add(castToContactDetail(value)); // ContactDetail
3434          return value;
3435        case -1724546052: // description
3436          this.description = castToMarkdown(value); // MarkdownType
3437          return value;
3438        case -669707736: // useContext
3439          this.getUseContext().add(castToUsageContext(value)); // UsageContext
3440          return value;
3441        case -507075711: // jurisdiction
3442          this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept
3443          return value;
3444        case -220463842: // purpose
3445          this.purpose = castToMarkdown(value); // MarkdownType
3446          return value;
3447        case -14805197: // affectsState
3448          this.affectsState = castToBoolean(value); // BooleanType
3449          return value;
3450        case 3059181: // code
3451          this.code = castToCode(value); // CodeType
3452          return value;
3453        case 950398559: // comment
3454          this.comment = castToMarkdown(value); // MarkdownType
3455          return value;
3456        case 3016401: // base
3457          this.base = castToCanonical(value); // CanonicalType
3458          return value;
3459        case -341064690: // resource
3460          this.getResource().add(castToCode(value)); // CodeType
3461          return value;
3462        case -887328209: // system
3463          this.system = castToBoolean(value); // BooleanType
3464          return value;
3465        case 3575610: // type
3466          this.type = castToBoolean(value); // BooleanType
3467          return value;
3468        case 555127957: // instance
3469          this.instance = castToBoolean(value); // BooleanType
3470          return value;
3471        case 676942463: // inputProfile
3472          this.inputProfile = castToCanonical(value); // CanonicalType
3473          return value;
3474        case 1826166120: // outputProfile
3475          this.outputProfile = castToCanonical(value); // CanonicalType
3476          return value;
3477        case 1954460585: // parameter
3478          this.getParameter().add((OperationDefinitionParameterComponent) value); // OperationDefinitionParameterComponent
3479          return value;
3480        case 529823674: // overload
3481          this.getOverload().add((OperationDefinitionOverloadComponent) value); // OperationDefinitionOverloadComponent
3482          return value;
3483        default: return super.setProperty(hash, name, value);
3484        }
3485
3486      }
3487
3488      @Override
3489      public Base setProperty(String name, Base value) throws FHIRException {
3490        if (name.equals("url")) {
3491          this.url = castToUri(value); // UriType
3492        } else if (name.equals("version")) {
3493          this.version = castToString(value); // StringType
3494        } else if (name.equals("name")) {
3495          this.name = castToString(value); // StringType
3496        } else if (name.equals("title")) {
3497          this.title = castToString(value); // StringType
3498        } else if (name.equals("status")) {
3499          value = new PublicationStatusEnumFactory().fromType(castToCode(value));
3500          this.status = (Enumeration) value; // Enumeration<PublicationStatus>
3501        } else if (name.equals("kind")) {
3502          value = new OperationKindEnumFactory().fromType(castToCode(value));
3503          this.kind = (Enumeration) value; // Enumeration<OperationKind>
3504        } else if (name.equals("experimental")) {
3505          this.experimental = castToBoolean(value); // BooleanType
3506        } else if (name.equals("date")) {
3507          this.date = castToDateTime(value); // DateTimeType
3508        } else if (name.equals("publisher")) {
3509          this.publisher = castToString(value); // StringType
3510        } else if (name.equals("contact")) {
3511          this.getContact().add(castToContactDetail(value));
3512        } else if (name.equals("description")) {
3513          this.description = castToMarkdown(value); // MarkdownType
3514        } else if (name.equals("useContext")) {
3515          this.getUseContext().add(castToUsageContext(value));
3516        } else if (name.equals("jurisdiction")) {
3517          this.getJurisdiction().add(castToCodeableConcept(value));
3518        } else if (name.equals("purpose")) {
3519          this.purpose = castToMarkdown(value); // MarkdownType
3520        } else if (name.equals("affectsState")) {
3521          this.affectsState = castToBoolean(value); // BooleanType
3522        } else if (name.equals("code")) {
3523          this.code = castToCode(value); // CodeType
3524        } else if (name.equals("comment")) {
3525          this.comment = castToMarkdown(value); // MarkdownType
3526        } else if (name.equals("base")) {
3527          this.base = castToCanonical(value); // CanonicalType
3528        } else if (name.equals("resource")) {
3529          this.getResource().add(castToCode(value));
3530        } else if (name.equals("system")) {
3531          this.system = castToBoolean(value); // BooleanType
3532        } else if (name.equals("type")) {
3533          this.type = castToBoolean(value); // BooleanType
3534        } else if (name.equals("instance")) {
3535          this.instance = castToBoolean(value); // BooleanType
3536        } else if (name.equals("inputProfile")) {
3537          this.inputProfile = castToCanonical(value); // CanonicalType
3538        } else if (name.equals("outputProfile")) {
3539          this.outputProfile = castToCanonical(value); // CanonicalType
3540        } else if (name.equals("parameter")) {
3541          this.getParameter().add((OperationDefinitionParameterComponent) value);
3542        } else if (name.equals("overload")) {
3543          this.getOverload().add((OperationDefinitionOverloadComponent) value);
3544        } else
3545          return super.setProperty(name, value);
3546        return value;
3547      }
3548
3549      @Override
3550      public Base makeProperty(int hash, String name) throws FHIRException {
3551        switch (hash) {
3552        case 116079:  return getUrlElement();
3553        case 351608024:  return getVersionElement();
3554        case 3373707:  return getNameElement();
3555        case 110371416:  return getTitleElement();
3556        case -892481550:  return getStatusElement();
3557        case 3292052:  return getKindElement();
3558        case -404562712:  return getExperimentalElement();
3559        case 3076014:  return getDateElement();
3560        case 1447404028:  return getPublisherElement();
3561        case 951526432:  return addContact(); 
3562        case -1724546052:  return getDescriptionElement();
3563        case -669707736:  return addUseContext(); 
3564        case -507075711:  return addJurisdiction(); 
3565        case -220463842:  return getPurposeElement();
3566        case -14805197:  return getAffectsStateElement();
3567        case 3059181:  return getCodeElement();
3568        case 950398559:  return getCommentElement();
3569        case 3016401:  return getBaseElement();
3570        case -341064690:  return addResourceElement();
3571        case -887328209:  return getSystemElement();
3572        case 3575610:  return getTypeElement();
3573        case 555127957:  return getInstanceElement();
3574        case 676942463:  return getInputProfileElement();
3575        case 1826166120:  return getOutputProfileElement();
3576        case 1954460585:  return addParameter(); 
3577        case 529823674:  return addOverload(); 
3578        default: return super.makeProperty(hash, name);
3579        }
3580
3581      }
3582
3583      @Override
3584      public String[] getTypesForProperty(int hash, String name) throws FHIRException {
3585        switch (hash) {
3586        case 116079: /*url*/ return new String[] {"uri"};
3587        case 351608024: /*version*/ return new String[] {"string"};
3588        case 3373707: /*name*/ return new String[] {"string"};
3589        case 110371416: /*title*/ return new String[] {"string"};
3590        case -892481550: /*status*/ return new String[] {"code"};
3591        case 3292052: /*kind*/ return new String[] {"code"};
3592        case -404562712: /*experimental*/ return new String[] {"boolean"};
3593        case 3076014: /*date*/ return new String[] {"dateTime"};
3594        case 1447404028: /*publisher*/ return new String[] {"string"};
3595        case 951526432: /*contact*/ return new String[] {"ContactDetail"};
3596        case -1724546052: /*description*/ return new String[] {"markdown"};
3597        case -669707736: /*useContext*/ return new String[] {"UsageContext"};
3598        case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"};
3599        case -220463842: /*purpose*/ return new String[] {"markdown"};
3600        case -14805197: /*affectsState*/ return new String[] {"boolean"};
3601        case 3059181: /*code*/ return new String[] {"code"};
3602        case 950398559: /*comment*/ return new String[] {"markdown"};
3603        case 3016401: /*base*/ return new String[] {"canonical"};
3604        case -341064690: /*resource*/ return new String[] {"code"};
3605        case -887328209: /*system*/ return new String[] {"boolean"};
3606        case 3575610: /*type*/ return new String[] {"boolean"};
3607        case 555127957: /*instance*/ return new String[] {"boolean"};
3608        case 676942463: /*inputProfile*/ return new String[] {"canonical"};
3609        case 1826166120: /*outputProfile*/ return new String[] {"canonical"};
3610        case 1954460585: /*parameter*/ return new String[] {};
3611        case 529823674: /*overload*/ return new String[] {};
3612        default: return super.getTypesForProperty(hash, name);
3613        }
3614
3615      }
3616
3617      @Override
3618      public Base addChild(String name) throws FHIRException {
3619        if (name.equals("url")) {
3620          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.url");
3621        }
3622        else if (name.equals("version")) {
3623          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.version");
3624        }
3625        else if (name.equals("name")) {
3626          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name");
3627        }
3628        else if (name.equals("title")) {
3629          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.title");
3630        }
3631        else if (name.equals("status")) {
3632          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.status");
3633        }
3634        else if (name.equals("kind")) {
3635          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.kind");
3636        }
3637        else if (name.equals("experimental")) {
3638          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.experimental");
3639        }
3640        else if (name.equals("date")) {
3641          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.date");
3642        }
3643        else if (name.equals("publisher")) {
3644          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.publisher");
3645        }
3646        else if (name.equals("contact")) {
3647          return addContact();
3648        }
3649        else if (name.equals("description")) {
3650          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.description");
3651        }
3652        else if (name.equals("useContext")) {
3653          return addUseContext();
3654        }
3655        else if (name.equals("jurisdiction")) {
3656          return addJurisdiction();
3657        }
3658        else if (name.equals("purpose")) {
3659          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.purpose");
3660        }
3661        else if (name.equals("affectsState")) {
3662          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.affectsState");
3663        }
3664        else if (name.equals("code")) {
3665          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.code");
3666        }
3667        else if (name.equals("comment")) {
3668          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.comment");
3669        }
3670        else if (name.equals("base")) {
3671          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.base");
3672        }
3673        else if (name.equals("resource")) {
3674          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.resource");
3675        }
3676        else if (name.equals("system")) {
3677          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.system");
3678        }
3679        else if (name.equals("type")) {
3680          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.type");
3681        }
3682        else if (name.equals("instance")) {
3683          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.instance");
3684        }
3685        else if (name.equals("inputProfile")) {
3686          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.inputProfile");
3687        }
3688        else if (name.equals("outputProfile")) {
3689          throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.outputProfile");
3690        }
3691        else if (name.equals("parameter")) {
3692          return addParameter();
3693        }
3694        else if (name.equals("overload")) {
3695          return addOverload();
3696        }
3697        else
3698          return super.addChild(name);
3699      }
3700
3701  public String fhirType() {
3702    return "OperationDefinition";
3703
3704  }
3705
3706      public OperationDefinition copy() {
3707        OperationDefinition dst = new OperationDefinition();
3708        copyValues(dst);
3709        return dst;
3710      }
3711
3712      public void copyValues(OperationDefinition dst) {
3713        super.copyValues(dst);
3714        dst.url = url == null ? null : url.copy();
3715        dst.version = version == null ? null : version.copy();
3716        dst.name = name == null ? null : name.copy();
3717        dst.title = title == null ? null : title.copy();
3718        dst.status = status == null ? null : status.copy();
3719        dst.kind = kind == null ? null : kind.copy();
3720        dst.experimental = experimental == null ? null : experimental.copy();
3721        dst.date = date == null ? null : date.copy();
3722        dst.publisher = publisher == null ? null : publisher.copy();
3723        if (contact != null) {
3724          dst.contact = new ArrayList<ContactDetail>();
3725          for (ContactDetail i : contact)
3726            dst.contact.add(i.copy());
3727        };
3728        dst.description = description == null ? null : description.copy();
3729        if (useContext != null) {
3730          dst.useContext = new ArrayList<UsageContext>();
3731          for (UsageContext i : useContext)
3732            dst.useContext.add(i.copy());
3733        };
3734        if (jurisdiction != null) {
3735          dst.jurisdiction = new ArrayList<CodeableConcept>();
3736          for (CodeableConcept i : jurisdiction)
3737            dst.jurisdiction.add(i.copy());
3738        };
3739        dst.purpose = purpose == null ? null : purpose.copy();
3740        dst.affectsState = affectsState == null ? null : affectsState.copy();
3741        dst.code = code == null ? null : code.copy();
3742        dst.comment = comment == null ? null : comment.copy();
3743        dst.base = base == null ? null : base.copy();
3744        if (resource != null) {
3745          dst.resource = new ArrayList<CodeType>();
3746          for (CodeType i : resource)
3747            dst.resource.add(i.copy());
3748        };
3749        dst.system = system == null ? null : system.copy();
3750        dst.type = type == null ? null : type.copy();
3751        dst.instance = instance == null ? null : instance.copy();
3752        dst.inputProfile = inputProfile == null ? null : inputProfile.copy();
3753        dst.outputProfile = outputProfile == null ? null : outputProfile.copy();
3754        if (parameter != null) {
3755          dst.parameter = new ArrayList<OperationDefinitionParameterComponent>();
3756          for (OperationDefinitionParameterComponent i : parameter)
3757            dst.parameter.add(i.copy());
3758        };
3759        if (overload != null) {
3760          dst.overload = new ArrayList<OperationDefinitionOverloadComponent>();
3761          for (OperationDefinitionOverloadComponent i : overload)
3762            dst.overload.add(i.copy());
3763        };
3764      }
3765
3766      protected OperationDefinition typedCopy() {
3767        return copy();
3768      }
3769
3770      @Override
3771      public boolean equalsDeep(Base other_) {
3772        if (!super.equalsDeep(other_))
3773          return false;
3774        if (!(other_ instanceof OperationDefinition))
3775          return false;
3776        OperationDefinition o = (OperationDefinition) other_;
3777        return compareDeep(kind, o.kind, true) && compareDeep(purpose, o.purpose, true) && compareDeep(affectsState, o.affectsState, true)
3778           && compareDeep(code, o.code, true) && compareDeep(comment, o.comment, true) && compareDeep(base, o.base, true)
3779           && compareDeep(resource, o.resource, true) && compareDeep(system, o.system, true) && compareDeep(type, o.type, true)
3780           && compareDeep(instance, o.instance, true) && compareDeep(inputProfile, o.inputProfile, true) && compareDeep(outputProfile, o.outputProfile, true)
3781           && compareDeep(parameter, o.parameter, true) && compareDeep(overload, o.overload, true);
3782      }
3783
3784      @Override
3785      public boolean equalsShallow(Base other_) {
3786        if (!super.equalsShallow(other_))
3787          return false;
3788        if (!(other_ instanceof OperationDefinition))
3789          return false;
3790        OperationDefinition o = (OperationDefinition) other_;
3791        return compareValues(kind, o.kind, true) && compareValues(purpose, o.purpose, true) && compareValues(affectsState, o.affectsState, true)
3792           && compareValues(code, o.code, true) && compareValues(comment, o.comment, true) && compareValues(resource, o.resource, true)
3793           && compareValues(system, o.system, true) && compareValues(type, o.type, true) && compareValues(instance, o.instance, true)
3794          ;
3795      }
3796
3797      public boolean isEmpty() {
3798        return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, purpose, affectsState
3799          , code, comment, base, resource, system, type, instance, inputProfile, outputProfile
3800          , parameter, overload);
3801      }
3802
3803  @Override
3804  public ResourceType getResourceType() {
3805    return ResourceType.OperationDefinition;
3806   }
3807
3808 /**
3809   * Search parameter: <b>date</b>
3810   * <p>
3811   * Description: <b>The operation definition publication date</b><br>
3812   * Type: <b>date</b><br>
3813   * Path: <b>OperationDefinition.date</b><br>
3814   * </p>
3815   */
3816  @SearchParamDefinition(name="date", path="OperationDefinition.date", description="The operation definition publication date", type="date" )
3817  public static final String SP_DATE = "date";
3818 /**
3819   * <b>Fluent Client</b> search parameter constant for <b>date</b>
3820   * <p>
3821   * Description: <b>The operation definition publication date</b><br>
3822   * Type: <b>date</b><br>
3823   * Path: <b>OperationDefinition.date</b><br>
3824   * </p>
3825   */
3826  public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE);
3827
3828 /**
3829   * Search parameter: <b>code</b>
3830   * <p>
3831   * Description: <b>Name used to invoke the operation</b><br>
3832   * Type: <b>token</b><br>
3833   * Path: <b>OperationDefinition.code</b><br>
3834   * </p>
3835   */
3836  @SearchParamDefinition(name="code", path="OperationDefinition.code", description="Name used to invoke the operation", type="token" )
3837  public static final String SP_CODE = "code";
3838 /**
3839   * <b>Fluent Client</b> search parameter constant for <b>code</b>
3840   * <p>
3841   * Description: <b>Name used to invoke the operation</b><br>
3842   * Type: <b>token</b><br>
3843   * Path: <b>OperationDefinition.code</b><br>
3844   * </p>
3845   */
3846  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CODE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CODE);
3847
3848 /**
3849   * Search parameter: <b>instance</b>
3850   * <p>
3851   * Description: <b>Invoke on an instance?</b><br>
3852   * Type: <b>token</b><br>
3853   * Path: <b>OperationDefinition.instance</b><br>
3854   * </p>
3855   */
3856  @SearchParamDefinition(name="instance", path="OperationDefinition.instance", description="Invoke on an instance?", type="token" )
3857  public static final String SP_INSTANCE = "instance";
3858 /**
3859   * <b>Fluent Client</b> search parameter constant for <b>instance</b>
3860   * <p>
3861   * Description: <b>Invoke on an instance?</b><br>
3862   * Type: <b>token</b><br>
3863   * Path: <b>OperationDefinition.instance</b><br>
3864   * </p>
3865   */
3866  public static final ca.uhn.fhir.rest.gclient.TokenClientParam INSTANCE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_INSTANCE);
3867
3868 /**
3869   * Search parameter: <b>context-type-value</b>
3870   * <p>
3871   * Description: <b>A use context type and value assigned to the operation definition</b><br>
3872   * Type: <b>composite</b><br>
3873   * Path: <b></b><br>
3874   * </p>
3875   */
3876  @SearchParamDefinition(name="context-type-value", path="OperationDefinition.useContext", description="A use context type and value assigned to the operation definition", type="composite", compositeOf={"context-type", "context"} )
3877  public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value";
3878 /**
3879   * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b>
3880   * <p>
3881   * Description: <b>A use context type and value assigned to the operation definition</b><br>
3882   * Type: <b>composite</b><br>
3883   * Path: <b></b><br>
3884   * </p>
3885   */
3886  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE);
3887
3888 /**
3889   * Search parameter: <b>kind</b>
3890   * <p>
3891   * Description: <b>operation | query</b><br>
3892   * Type: <b>token</b><br>
3893   * Path: <b>OperationDefinition.kind</b><br>
3894   * </p>
3895   */
3896  @SearchParamDefinition(name="kind", path="OperationDefinition.kind", description="operation | query", type="token" )
3897  public static final String SP_KIND = "kind";
3898 /**
3899   * <b>Fluent Client</b> search parameter constant for <b>kind</b>
3900   * <p>
3901   * Description: <b>operation | query</b><br>
3902   * Type: <b>token</b><br>
3903   * Path: <b>OperationDefinition.kind</b><br>
3904   * </p>
3905   */
3906  public static final ca.uhn.fhir.rest.gclient.TokenClientParam KIND = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_KIND);
3907
3908 /**
3909   * Search parameter: <b>jurisdiction</b>
3910   * <p>
3911   * Description: <b>Intended jurisdiction for the operation definition</b><br>
3912   * Type: <b>token</b><br>
3913   * Path: <b>OperationDefinition.jurisdiction</b><br>
3914   * </p>
3915   */
3916  @SearchParamDefinition(name="jurisdiction", path="OperationDefinition.jurisdiction", description="Intended jurisdiction for the operation definition", type="token" )
3917  public static final String SP_JURISDICTION = "jurisdiction";
3918 /**
3919   * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b>
3920   * <p>
3921   * Description: <b>Intended jurisdiction for the operation definition</b><br>
3922   * Type: <b>token</b><br>
3923   * Path: <b>OperationDefinition.jurisdiction</b><br>
3924   * </p>
3925   */
3926  public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION);
3927
3928 /**
3929   * Search parameter: <b>description</b>
3930   * <p>
3931   * Description: <b>The description of the operation definition</b><br>
3932   * Type: <b>string</b><br>
3933   * Path: <b>OperationDefinition.description</b><br>
3934   * </p>
3935   */
3936  @SearchParamDefinition(name="description", path="OperationDefinition.description", description="The description of the operation definition", type="string" )
3937  public static final String SP_DESCRIPTION = "description";
3938 /**
3939   * <b>Fluent Client</b> search parameter constant for <b>description</b>
3940   * <p>
3941   * Description: <b>The description of the operation definition</b><br>
3942   * Type: <b>string</b><br>
3943   * Path: <b>OperationDefinition.description</b><br>
3944   * </p>
3945   */
3946  public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION);
3947
3948 /**
3949   * Search parameter: <b>context-type</b>
3950   * <p>
3951   * Description: <b>A type of use context assigned to the operation definition</b><br>
3952   * Type: <b>token</b><br>
3953   * Path: <b>OperationDefinition.useContext.code</b><br>
3954   * </p>
3955   */
3956  @SearchParamDefinition(name="context-type", path="OperationDefinition.useContext.code", description="A type of use context assigned to the operation definition", type="token" )
3957  public static final String SP_CONTEXT_TYPE = "context-type";
3958 /**
3959   * <b>Fluent Client</b> search parameter constant for <b>context-type</b>
3960   * <p>
3961   * Description: <b>A type of use context assigned to the operation definition</b><br>
3962   * Type: <b>token</b><br>
3963   * Path: <b>OperationDefinition.useContext.code</b><br>
3964   * </p>
3965   */
3966  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE);
3967
3968 /**
3969   * Search parameter: <b>title</b>
3970   * <p>
3971   * Description: <b>The human-friendly name of the operation definition</b><br>
3972   * Type: <b>string</b><br>
3973   * Path: <b>OperationDefinition.title</b><br>
3974   * </p>
3975   */
3976  @SearchParamDefinition(name="title", path="OperationDefinition.title", description="The human-friendly name of the operation definition", type="string" )
3977  public static final String SP_TITLE = "title";
3978 /**
3979   * <b>Fluent Client</b> search parameter constant for <b>title</b>
3980   * <p>
3981   * Description: <b>The human-friendly name of the operation definition</b><br>
3982   * Type: <b>string</b><br>
3983   * Path: <b>OperationDefinition.title</b><br>
3984   * </p>
3985   */
3986  public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE);
3987
3988 /**
3989   * Search parameter: <b>type</b>
3990   * <p>
3991   * Description: <b>Invoke at the type level?</b><br>
3992   * Type: <b>token</b><br>
3993   * Path: <b>OperationDefinition.type</b><br>
3994   * </p>
3995   */
3996  @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invoke at the type level?", type="token" )
3997  public static final String SP_TYPE = "type";
3998 /**
3999   * <b>Fluent Client</b> search parameter constant for <b>type</b>
4000   * <p>
4001   * Description: <b>Invoke at the type level?</b><br>
4002   * Type: <b>token</b><br>
4003   * Path: <b>OperationDefinition.type</b><br>
4004   * </p>
4005   */
4006  public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE);
4007
4008 /**
4009   * Search parameter: <b>version</b>
4010   * <p>
4011   * Description: <b>The business version of the operation definition</b><br>
4012   * Type: <b>token</b><br>
4013   * Path: <b>OperationDefinition.version</b><br>
4014   * </p>
4015   */
4016  @SearchParamDefinition(name="version", path="OperationDefinition.version", description="The business version of the operation definition", type="token" )
4017  public static final String SP_VERSION = "version";
4018 /**
4019   * <b>Fluent Client</b> search parameter constant for <b>version</b>
4020   * <p>
4021   * Description: <b>The business version of the operation definition</b><br>
4022   * Type: <b>token</b><br>
4023   * Path: <b>OperationDefinition.version</b><br>
4024   * </p>
4025   */
4026  public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION);
4027
4028 /**
4029   * Search parameter: <b>url</b>
4030   * <p>
4031   * Description: <b>The uri that identifies the operation definition</b><br>
4032   * Type: <b>uri</b><br>
4033   * Path: <b>OperationDefinition.url</b><br>
4034   * </p>
4035   */
4036  @SearchParamDefinition(name="url", path="OperationDefinition.url", description="The uri that identifies the operation definition", type="uri" )
4037  public static final String SP_URL = "url";
4038 /**
4039   * <b>Fluent Client</b> search parameter constant for <b>url</b>
4040   * <p>
4041   * Description: <b>The uri that identifies the operation definition</b><br>
4042   * Type: <b>uri</b><br>
4043   * Path: <b>OperationDefinition.url</b><br>
4044   * </p>
4045   */
4046  public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL);
4047
4048 /**
4049   * Search parameter: <b>context-quantity</b>
4050   * <p>
4051   * Description: <b>A quantity- or range-valued use context assigned to the operation definition</b><br>
4052   * Type: <b>quantity</b><br>
4053   * Path: <b>OperationDefinition.useContext.valueQuantity, OperationDefinition.useContext.valueRange</b><br>
4054   * </p>
4055   */
4056  @SearchParamDefinition(name="context-quantity", path="(OperationDefinition.useContext.value as Quantity) | (OperationDefinition.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the operation definition", type="quantity" )
4057  public static final String SP_CONTEXT_QUANTITY = "context-quantity";
4058 /**
4059   * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b>
4060   * <p>
4061   * Description: <b>A quantity- or range-valued use context assigned to the operation definition</b><br>
4062   * Type: <b>quantity</b><br>
4063   * Path: <b>OperationDefinition.useContext.valueQuantity, OperationDefinition.useContext.valueRange</b><br>
4064   * </p>
4065   */
4066  public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY);
4067
4068 /**
4069   * Search parameter: <b>input-profile</b>
4070   * <p>
4071   * Description: <b>Validation information for in parameters</b><br>
4072   * Type: <b>reference</b><br>
4073   * Path: <b>OperationDefinition.inputProfile</b><br>
4074   * </p>
4075   */
4076  @SearchParamDefinition(name="input-profile", path="OperationDefinition.inputProfile", description="Validation information for in parameters", type="reference", target={StructureDefinition.class } )
4077  public static final String SP_INPUT_PROFILE = "input-profile";
4078 /**
4079   * <b>Fluent Client</b> search parameter constant for <b>input-profile</b>
4080   * <p>
4081   * Description: <b>Validation information for in parameters</b><br>
4082   * Type: <b>reference</b><br>
4083   * Path: <b>OperationDefinition.inputProfile</b><br>
4084   * </p>
4085   */
4086  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam INPUT_PROFILE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_INPUT_PROFILE);
4087
4088/**
4089   * Constant for fluent queries to be used to add include statements. Specifies
4090   * the path value of "<b>OperationDefinition:input-profile</b>".
4091   */
4092  public static final ca.uhn.fhir.model.api.Include INCLUDE_INPUT_PROFILE = new ca.uhn.fhir.model.api.Include("OperationDefinition:input-profile").toLocked();
4093
4094 /**
4095   * Search parameter: <b>output-profile</b>
4096   * <p>
4097   * Description: <b>Validation information for out parameters</b><br>
4098   * Type: <b>reference</b><br>
4099   * Path: <b>OperationDefinition.outputProfile</b><br>
4100   * </p>
4101   */
4102  @SearchParamDefinition(name="output-profile", path="OperationDefinition.outputProfile", description="Validation information for out parameters", type="reference", target={StructureDefinition.class } )
4103  public static final String SP_OUTPUT_PROFILE = "output-profile";
4104 /**
4105   * <b>Fluent Client</b> search parameter constant for <b>output-profile</b>
4106   * <p>
4107   * Description: <b>Validation information for out parameters</b><br>
4108   * Type: <b>reference</b><br>
4109   * Path: <b>OperationDefinition.outputProfile</b><br>
4110   * </p>
4111   */
4112  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OUTPUT_PROFILE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_OUTPUT_PROFILE);
4113
4114/**
4115   * Constant for fluent queries to be used to add include statements. Specifies
4116   * the path value of "<b>OperationDefinition:output-profile</b>".
4117   */
4118  public static final ca.uhn.fhir.model.api.Include INCLUDE_OUTPUT_PROFILE = new ca.uhn.fhir.model.api.Include("OperationDefinition:output-profile").toLocked();
4119
4120 /**
4121   * Search parameter: <b>system</b>
4122   * <p>
4123   * Description: <b>Invoke at the system level?</b><br>
4124   * Type: <b>token</b><br>
4125   * Path: <b>OperationDefinition.system</b><br>
4126   * </p>
4127   */
4128  @SearchParamDefinition(name="system", path="OperationDefinition.system", description="Invoke at the system level?", type="token" )
4129  public static final String SP_SYSTEM = "system";
4130 /**
4131   * <b>Fluent Client</b> search parameter constant for <b>system</b>
4132   * <p>
4133   * Description: <b>Invoke at the system level?</b><br>
4134   * Type: <b>token</b><br>
4135   * Path: <b>OperationDefinition.system</b><br>
4136   * </p>
4137   */
4138  public static final ca.uhn.fhir.rest.gclient.TokenClientParam SYSTEM = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_SYSTEM);
4139
4140 /**
4141   * Search parameter: <b>name</b>
4142   * <p>
4143   * Description: <b>Computationally friendly name of the operation definition</b><br>
4144   * Type: <b>string</b><br>
4145   * Path: <b>OperationDefinition.name</b><br>
4146   * </p>
4147   */
4148  @SearchParamDefinition(name="name", path="OperationDefinition.name", description="Computationally friendly name of the operation definition", type="string" )
4149  public static final String SP_NAME = "name";
4150 /**
4151   * <b>Fluent Client</b> search parameter constant for <b>name</b>
4152   * <p>
4153   * Description: <b>Computationally friendly name of the operation definition</b><br>
4154   * Type: <b>string</b><br>
4155   * Path: <b>OperationDefinition.name</b><br>
4156   * </p>
4157   */
4158  public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME);
4159
4160 /**
4161   * Search parameter: <b>context</b>
4162   * <p>
4163   * Description: <b>A use context assigned to the operation definition</b><br>
4164   * Type: <b>token</b><br>
4165   * Path: <b>OperationDefinition.useContext.valueCodeableConcept</b><br>
4166   * </p>
4167   */
4168  @SearchParamDefinition(name="context", path="(OperationDefinition.useContext.value as CodeableConcept)", description="A use context assigned to the operation definition", type="token" )
4169  public static final String SP_CONTEXT = "context";
4170 /**
4171   * <b>Fluent Client</b> search parameter constant for <b>context</b>
4172   * <p>
4173   * Description: <b>A use context assigned to the operation definition</b><br>
4174   * Type: <b>token</b><br>
4175   * Path: <b>OperationDefinition.useContext.valueCodeableConcept</b><br>
4176   * </p>
4177   */
4178  public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT);
4179
4180 /**
4181   * Search parameter: <b>publisher</b>
4182   * <p>
4183   * Description: <b>Name of the publisher of the operation definition</b><br>
4184   * Type: <b>string</b><br>
4185   * Path: <b>OperationDefinition.publisher</b><br>
4186   * </p>
4187   */
4188  @SearchParamDefinition(name="publisher", path="OperationDefinition.publisher", description="Name of the publisher of the operation definition", type="string" )
4189  public static final String SP_PUBLISHER = "publisher";
4190 /**
4191   * <b>Fluent Client</b> search parameter constant for <b>publisher</b>
4192   * <p>
4193   * Description: <b>Name of the publisher of the operation definition</b><br>
4194   * Type: <b>string</b><br>
4195   * Path: <b>OperationDefinition.publisher</b><br>
4196   * </p>
4197   */
4198  public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER);
4199
4200 /**
4201   * Search parameter: <b>context-type-quantity</b>
4202   * <p>
4203   * Description: <b>A use context type and quantity- or range-based value assigned to the operation definition</b><br>
4204   * Type: <b>composite</b><br>
4205   * Path: <b></b><br>
4206   * </p>
4207   */
4208  @SearchParamDefinition(name="context-type-quantity", path="OperationDefinition.useContext", description="A use context type and quantity- or range-based value assigned to the operation definition", type="composite", compositeOf={"context-type", "context-quantity"} )
4209  public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity";
4210 /**
4211   * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b>
4212   * <p>
4213   * Description: <b>A use context type and quantity- or range-based value assigned to the operation definition</b><br>
4214   * Type: <b>composite</b><br>
4215   * Path: <b></b><br>
4216   * </p>
4217   */
4218  public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY);
4219
4220 /**
4221   * Search parameter: <b>status</b>
4222   * <p>
4223   * Description: <b>The current status of the operation definition</b><br>
4224   * Type: <b>token</b><br>
4225   * Path: <b>OperationDefinition.status</b><br>
4226   * </p>
4227   */
4228  @SearchParamDefinition(name="status", path="OperationDefinition.status", description="The current status of the operation definition", type="token" )
4229  public static final String SP_STATUS = "status";
4230 /**
4231   * <b>Fluent Client</b> search parameter constant for <b>status</b>
4232   * <p>
4233   * Description: <b>The current status of the operation definition</b><br>
4234   * Type: <b>token</b><br>
4235   * Path: <b>OperationDefinition.status</b><br>
4236   * </p>
4237   */
4238  public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS);
4239
4240 /**
4241   * Search parameter: <b>base</b>
4242   * <p>
4243   * Description: <b>Marks this as a profile of the base</b><br>
4244   * Type: <b>reference</b><br>
4245   * Path: <b>OperationDefinition.base</b><br>
4246   * </p>
4247   */
4248  @SearchParamDefinition(name="base", path="OperationDefinition.base", description="Marks this as a profile of the base", type="reference", target={OperationDefinition.class } )
4249  public static final String SP_BASE = "base";
4250 /**
4251   * <b>Fluent Client</b> search parameter constant for <b>base</b>
4252   * <p>
4253   * Description: <b>Marks this as a profile of the base</b><br>
4254   * Type: <b>reference</b><br>
4255   * Path: <b>OperationDefinition.base</b><br>
4256   * </p>
4257   */
4258  public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_BASE);
4259
4260/**
4261   * Constant for fluent queries to be used to add include statements. Specifies
4262   * the path value of "<b>OperationDefinition:base</b>".
4263   */
4264  public static final ca.uhn.fhir.model.api.Include INCLUDE_BASE = new ca.uhn.fhir.model.api.Include("OperationDefinition:base").toLocked();
4265
4266
4267}