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