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