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