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