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