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