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