001package org.hl7.fhir.r5.model; 002 003 004/* 005 * #%L 006 * org.hl7.fhir.r5 007 * %% 008 * Copyright (C) 2014 - 2019 Health Level 7 009 * %% 010 * Licensed under the Apache License, Version 2.0 (the \"License\"); 011 * you may not use this file except in compliance with the License. 012 * You may obtain a copy of the License at 013 * 014 * http://www.apache.org/licenses/LICENSE-2.0 015 * 016 * Unless required by applicable law or agreed to in writing, software 017 * distributed under the License is distributed on an \"AS IS\" BASIS, 018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 019 * See the License for the specific language governing permissions and 020 * limitations under the License. 021 * #L% 022 */ 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, \ 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this \ 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, \ 034 this list of conditions and the following disclaimer in the documentation \ 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 049 POSSIBILITY OF SUCH DAMAGE. 050 */ 051 052// Generated on Tue, Dec 31, 2019 12:12+1100 for FHIR vcurrent 053 054import java.util.ArrayList; 055import java.util.Date; 056import java.util.List; 057import org.hl7.fhir.utilities.Utilities; 058import org.hl7.fhir.r5.model.Enumerations.*; 059import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 060import org.hl7.fhir.exceptions.FHIRException; 061import org.hl7.fhir.instance.model.api.ICompositeType; 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 070import org.hl7.fhir.instance.model.api.IBaseParameters; 071/** 072 * This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it. 073 */ 074@ResourceDef(name="Parameters", profile="http://hl7.org/fhir/StructureDefinition/Parameters") 075public class Parameters extends Resource implements IBaseParameters { 076 077 @Block() 078 public static class ParametersParameterComponent extends BackboneElement implements IBaseBackboneElement { 079 /** 080 * The name of the parameter (reference to the operation definition). 081 */ 082 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 083 @Description(shortDefinition="Name from the definition", formalDefinition="The name of the parameter (reference to the operation definition)." ) 084 protected StringType name; 085 086 /** 087 * If the parameter is a data type. 088 */ 089 @Child(name = "value", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, Contributor.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Dosage.class, Meta.class}, order=2, min=0, max=1, modifier=false, summary=true) 090 @Description(shortDefinition="If parameter is a data type", formalDefinition="If the parameter is a data type." ) 091 protected DataType value; 092 093 /** 094 * If the parameter is a whole resource. 095 */ 096 @Child(name = "resource", type = {Resource.class}, order=3, min=0, max=1, modifier=false, summary=true) 097 @Description(shortDefinition="If parameter is a whole resource", formalDefinition="If the parameter is a whole resource." ) 098 protected Resource resource; 099 100 /** 101 * A named part of a multi-part parameter. 102 */ 103 @Child(name = "part", type = {ParametersParameterComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 104 @Description(shortDefinition="Named part of a multi-part parameter", formalDefinition="A named part of a multi-part parameter." ) 105 protected List<ParametersParameterComponent> part; 106 107 private static final long serialVersionUID = -1755858390L; 108 109 /** 110 * Constructor 111 */ 112 public ParametersParameterComponent() { 113 super(); 114 } 115 116 /** 117 * Constructor 118 */ 119 public ParametersParameterComponent(String name) { 120 super(); 121 this.setName(name); 122 } 123 124 /** 125 * @return {@link #name} (The name of the parameter (reference to the operation definition).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 126 */ 127 public StringType getNameElement() { 128 if (this.name == null) 129 if (Configuration.errorOnAutoCreate()) 130 throw new Error("Attempt to auto-create ParametersParameterComponent.name"); 131 else if (Configuration.doAutoCreate()) 132 this.name = new StringType(); // bb 133 return this.name; 134 } 135 136 public boolean hasNameElement() { 137 return this.name != null && !this.name.isEmpty(); 138 } 139 140 public boolean hasName() { 141 return this.name != null && !this.name.isEmpty(); 142 } 143 144 /** 145 * @param value {@link #name} (The name of the parameter (reference to the operation definition).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 146 */ 147 public ParametersParameterComponent setNameElement(StringType value) { 148 this.name = value; 149 return this; 150 } 151 152 /** 153 * @return The name of the parameter (reference to the operation definition). 154 */ 155 public String getName() { 156 return this.name == null ? null : this.name.getValue(); 157 } 158 159 /** 160 * @param value The name of the parameter (reference to the operation definition). 161 */ 162 public ParametersParameterComponent setName(String value) { 163 if (this.name == null) 164 this.name = new StringType(); 165 this.name.setValue(value); 166 return this; 167 } 168 169 /** 170 * @return {@link #value} (If the parameter is a data type.) 171 */ 172 public DataType getValue() { 173 return this.value; 174 } 175 176 /** 177 * @return {@link #value} (If the parameter is a data type.) 178 */ 179 public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 180 if (this.value == null) 181 this.value = new Base64BinaryType(); 182 if (!(this.value instanceof Base64BinaryType)) 183 throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered"); 184 return (Base64BinaryType) this.value; 185 } 186 187 public boolean hasValueBase64BinaryType() { 188 return this != null && this.value instanceof Base64BinaryType; 189 } 190 191 /** 192 * @return {@link #value} (If the parameter is a data type.) 193 */ 194 public BooleanType getValueBooleanType() throws FHIRException { 195 if (this.value == null) 196 this.value = new BooleanType(); 197 if (!(this.value instanceof BooleanType)) 198 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 199 return (BooleanType) this.value; 200 } 201 202 public boolean hasValueBooleanType() { 203 return this != null && this.value instanceof BooleanType; 204 } 205 206 /** 207 * @return {@link #value} (If the parameter is a data type.) 208 */ 209 public CanonicalType getValueCanonicalType() throws FHIRException { 210 if (this.value == null) 211 this.value = new CanonicalType(); 212 if (!(this.value instanceof CanonicalType)) 213 throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered"); 214 return (CanonicalType) this.value; 215 } 216 217 public boolean hasValueCanonicalType() { 218 return this != null && this.value instanceof CanonicalType; 219 } 220 221 /** 222 * @return {@link #value} (If the parameter is a data type.) 223 */ 224 public CodeType getValueCodeType() throws FHIRException { 225 if (this.value == null) 226 this.value = new CodeType(); 227 if (!(this.value instanceof CodeType)) 228 throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered"); 229 return (CodeType) this.value; 230 } 231 232 public boolean hasValueCodeType() { 233 return this != null && this.value instanceof CodeType; 234 } 235 236 /** 237 * @return {@link #value} (If the parameter is a data type.) 238 */ 239 public DateType getValueDateType() throws FHIRException { 240 if (this.value == null) 241 this.value = new DateType(); 242 if (!(this.value instanceof DateType)) 243 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 244 return (DateType) this.value; 245 } 246 247 public boolean hasValueDateType() { 248 return this != null && this.value instanceof DateType; 249 } 250 251 /** 252 * @return {@link #value} (If the parameter is a data type.) 253 */ 254 public DateTimeType getValueDateTimeType() throws FHIRException { 255 if (this.value == null) 256 this.value = new DateTimeType(); 257 if (!(this.value instanceof DateTimeType)) 258 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 259 return (DateTimeType) this.value; 260 } 261 262 public boolean hasValueDateTimeType() { 263 return this != null && this.value instanceof DateTimeType; 264 } 265 266 /** 267 * @return {@link #value} (If the parameter is a data type.) 268 */ 269 public DecimalType getValueDecimalType() throws FHIRException { 270 if (this.value == null) 271 this.value = new DecimalType(); 272 if (!(this.value instanceof DecimalType)) 273 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); 274 return (DecimalType) this.value; 275 } 276 277 public boolean hasValueDecimalType() { 278 return this != null && this.value instanceof DecimalType; 279 } 280 281 /** 282 * @return {@link #value} (If the parameter is a data type.) 283 */ 284 public IdType getValueIdType() throws FHIRException { 285 if (this.value == null) 286 this.value = new IdType(); 287 if (!(this.value instanceof IdType)) 288 throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered"); 289 return (IdType) this.value; 290 } 291 292 public boolean hasValueIdType() { 293 return this != null && this.value instanceof IdType; 294 } 295 296 /** 297 * @return {@link #value} (If the parameter is a data type.) 298 */ 299 public InstantType getValueInstantType() throws FHIRException { 300 if (this.value == null) 301 this.value = new InstantType(); 302 if (!(this.value instanceof InstantType)) 303 throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered"); 304 return (InstantType) this.value; 305 } 306 307 public boolean hasValueInstantType() { 308 return this != null && this.value instanceof InstantType; 309 } 310 311 /** 312 * @return {@link #value} (If the parameter is a data type.) 313 */ 314 public IntegerType getValueIntegerType() throws FHIRException { 315 if (this.value == null) 316 this.value = new IntegerType(); 317 if (!(this.value instanceof IntegerType)) 318 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 319 return (IntegerType) this.value; 320 } 321 322 public boolean hasValueIntegerType() { 323 return this != null && this.value instanceof IntegerType; 324 } 325 326 /** 327 * @return {@link #value} (If the parameter is a data type.) 328 */ 329 public Integer64Type getValueInteger64Type() throws FHIRException { 330 if (this.value == null) 331 this.value = new Integer64Type(); 332 if (!(this.value instanceof Integer64Type)) 333 throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered"); 334 return (Integer64Type) this.value; 335 } 336 337 public boolean hasValueInteger64Type() { 338 return this != null && this.value instanceof Integer64Type; 339 } 340 341 /** 342 * @return {@link #value} (If the parameter is a data type.) 343 */ 344 public MarkdownType getValueMarkdownType() throws FHIRException { 345 if (this.value == null) 346 this.value = new MarkdownType(); 347 if (!(this.value instanceof MarkdownType)) 348 throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered"); 349 return (MarkdownType) this.value; 350 } 351 352 public boolean hasValueMarkdownType() { 353 return this != null && this.value instanceof MarkdownType; 354 } 355 356 /** 357 * @return {@link #value} (If the parameter is a data type.) 358 */ 359 public OidType getValueOidType() throws FHIRException { 360 if (this.value == null) 361 this.value = new OidType(); 362 if (!(this.value instanceof OidType)) 363 throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered"); 364 return (OidType) this.value; 365 } 366 367 public boolean hasValueOidType() { 368 return this != null && this.value instanceof OidType; 369 } 370 371 /** 372 * @return {@link #value} (If the parameter is a data type.) 373 */ 374 public PositiveIntType getValuePositiveIntType() throws FHIRException { 375 if (this.value == null) 376 this.value = new PositiveIntType(); 377 if (!(this.value instanceof PositiveIntType)) 378 throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered"); 379 return (PositiveIntType) this.value; 380 } 381 382 public boolean hasValuePositiveIntType() { 383 return this != null && this.value instanceof PositiveIntType; 384 } 385 386 /** 387 * @return {@link #value} (If the parameter is a data type.) 388 */ 389 public StringType getValueStringType() throws FHIRException { 390 if (this.value == null) 391 this.value = new StringType(); 392 if (!(this.value instanceof StringType)) 393 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 394 return (StringType) this.value; 395 } 396 397 public boolean hasValueStringType() { 398 return this != null && this.value instanceof StringType; 399 } 400 401 /** 402 * @return {@link #value} (If the parameter is a data type.) 403 */ 404 public TimeType getValueTimeType() throws FHIRException { 405 if (this.value == null) 406 this.value = new TimeType(); 407 if (!(this.value instanceof TimeType)) 408 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 409 return (TimeType) this.value; 410 } 411 412 public boolean hasValueTimeType() { 413 return this != null && this.value instanceof TimeType; 414 } 415 416 /** 417 * @return {@link #value} (If the parameter is a data type.) 418 */ 419 public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 420 if (this.value == null) 421 this.value = new UnsignedIntType(); 422 if (!(this.value instanceof UnsignedIntType)) 423 throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered"); 424 return (UnsignedIntType) this.value; 425 } 426 427 public boolean hasValueUnsignedIntType() { 428 return this != null && this.value instanceof UnsignedIntType; 429 } 430 431 /** 432 * @return {@link #value} (If the parameter is a data type.) 433 */ 434 public UriType getValueUriType() throws FHIRException { 435 if (this.value == null) 436 this.value = new UriType(); 437 if (!(this.value instanceof UriType)) 438 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); 439 return (UriType) this.value; 440 } 441 442 public boolean hasValueUriType() { 443 return this != null && this.value instanceof UriType; 444 } 445 446 /** 447 * @return {@link #value} (If the parameter is a data type.) 448 */ 449 public UrlType getValueUrlType() throws FHIRException { 450 if (this.value == null) 451 this.value = new UrlType(); 452 if (!(this.value instanceof UrlType)) 453 throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered"); 454 return (UrlType) this.value; 455 } 456 457 public boolean hasValueUrlType() { 458 return this != null && this.value instanceof UrlType; 459 } 460 461 /** 462 * @return {@link #value} (If the parameter is a data type.) 463 */ 464 public UuidType getValueUuidType() throws FHIRException { 465 if (this.value == null) 466 this.value = new UuidType(); 467 if (!(this.value instanceof UuidType)) 468 throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered"); 469 return (UuidType) this.value; 470 } 471 472 public boolean hasValueUuidType() { 473 return this != null && this.value instanceof UuidType; 474 } 475 476 /** 477 * @return {@link #value} (If the parameter is a data type.) 478 */ 479 public Address getValueAddress() throws FHIRException { 480 if (this.value == null) 481 this.value = new Address(); 482 if (!(this.value instanceof Address)) 483 throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered"); 484 return (Address) this.value; 485 } 486 487 public boolean hasValueAddress() { 488 return this != null && this.value instanceof Address; 489 } 490 491 /** 492 * @return {@link #value} (If the parameter is a data type.) 493 */ 494 public Age getValueAge() throws FHIRException { 495 if (this.value == null) 496 this.value = new Age(); 497 if (!(this.value instanceof Age)) 498 throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered"); 499 return (Age) this.value; 500 } 501 502 public boolean hasValueAge() { 503 return this != null && this.value instanceof Age; 504 } 505 506 /** 507 * @return {@link #value} (If the parameter is a data type.) 508 */ 509 public Annotation getValueAnnotation() throws FHIRException { 510 if (this.value == null) 511 this.value = new Annotation(); 512 if (!(this.value instanceof Annotation)) 513 throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered"); 514 return (Annotation) this.value; 515 } 516 517 public boolean hasValueAnnotation() { 518 return this != null && this.value instanceof Annotation; 519 } 520 521 /** 522 * @return {@link #value} (If the parameter is a data type.) 523 */ 524 public Attachment getValueAttachment() throws FHIRException { 525 if (this.value == null) 526 this.value = new Attachment(); 527 if (!(this.value instanceof Attachment)) 528 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 529 return (Attachment) this.value; 530 } 531 532 public boolean hasValueAttachment() { 533 return this != null && this.value instanceof Attachment; 534 } 535 536 /** 537 * @return {@link #value} (If the parameter is a data type.) 538 */ 539 public CodeableConcept getValueCodeableConcept() throws FHIRException { 540 if (this.value == null) 541 this.value = new CodeableConcept(); 542 if (!(this.value instanceof CodeableConcept)) 543 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 544 return (CodeableConcept) this.value; 545 } 546 547 public boolean hasValueCodeableConcept() { 548 return this != null && this.value instanceof CodeableConcept; 549 } 550 551 /** 552 * @return {@link #value} (If the parameter is a data type.) 553 */ 554 public Coding getValueCoding() throws FHIRException { 555 if (this.value == null) 556 this.value = new Coding(); 557 if (!(this.value instanceof Coding)) 558 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); 559 return (Coding) this.value; 560 } 561 562 public boolean hasValueCoding() { 563 return this != null && this.value instanceof Coding; 564 } 565 566 /** 567 * @return {@link #value} (If the parameter is a data type.) 568 */ 569 public ContactPoint getValueContactPoint() throws FHIRException { 570 if (this.value == null) 571 this.value = new ContactPoint(); 572 if (!(this.value instanceof ContactPoint)) 573 throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered"); 574 return (ContactPoint) this.value; 575 } 576 577 public boolean hasValueContactPoint() { 578 return this != null && this.value instanceof ContactPoint; 579 } 580 581 /** 582 * @return {@link #value} (If the parameter is a data type.) 583 */ 584 public Count getValueCount() throws FHIRException { 585 if (this.value == null) 586 this.value = new Count(); 587 if (!(this.value instanceof Count)) 588 throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered"); 589 return (Count) this.value; 590 } 591 592 public boolean hasValueCount() { 593 return this != null && this.value instanceof Count; 594 } 595 596 /** 597 * @return {@link #value} (If the parameter is a data type.) 598 */ 599 public Distance getValueDistance() throws FHIRException { 600 if (this.value == null) 601 this.value = new Distance(); 602 if (!(this.value instanceof Distance)) 603 throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered"); 604 return (Distance) this.value; 605 } 606 607 public boolean hasValueDistance() { 608 return this != null && this.value instanceof Distance; 609 } 610 611 /** 612 * @return {@link #value} (If the parameter is a data type.) 613 */ 614 public Duration getValueDuration() throws FHIRException { 615 if (this.value == null) 616 this.value = new Duration(); 617 if (!(this.value instanceof Duration)) 618 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered"); 619 return (Duration) this.value; 620 } 621 622 public boolean hasValueDuration() { 623 return this != null && this.value instanceof Duration; 624 } 625 626 /** 627 * @return {@link #value} (If the parameter is a data type.) 628 */ 629 public HumanName getValueHumanName() throws FHIRException { 630 if (this.value == null) 631 this.value = new HumanName(); 632 if (!(this.value instanceof HumanName)) 633 throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered"); 634 return (HumanName) this.value; 635 } 636 637 public boolean hasValueHumanName() { 638 return this != null && this.value instanceof HumanName; 639 } 640 641 /** 642 * @return {@link #value} (If the parameter is a data type.) 643 */ 644 public Identifier getValueIdentifier() throws FHIRException { 645 if (this.value == null) 646 this.value = new Identifier(); 647 if (!(this.value instanceof Identifier)) 648 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered"); 649 return (Identifier) this.value; 650 } 651 652 public boolean hasValueIdentifier() { 653 return this != null && this.value instanceof Identifier; 654 } 655 656 /** 657 * @return {@link #value} (If the parameter is a data type.) 658 */ 659 public Money getValueMoney() throws FHIRException { 660 if (this.value == null) 661 this.value = new Money(); 662 if (!(this.value instanceof Money)) 663 throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered"); 664 return (Money) this.value; 665 } 666 667 public boolean hasValueMoney() { 668 return this != null && this.value instanceof Money; 669 } 670 671 /** 672 * @return {@link #value} (If the parameter is a data type.) 673 */ 674 public Period getValuePeriod() throws FHIRException { 675 if (this.value == null) 676 this.value = new Period(); 677 if (!(this.value instanceof Period)) 678 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); 679 return (Period) this.value; 680 } 681 682 public boolean hasValuePeriod() { 683 return this != null && this.value instanceof Period; 684 } 685 686 /** 687 * @return {@link #value} (If the parameter is a data type.) 688 */ 689 public Quantity getValueQuantity() throws FHIRException { 690 if (this.value == null) 691 this.value = new Quantity(); 692 if (!(this.value instanceof Quantity)) 693 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 694 return (Quantity) this.value; 695 } 696 697 public boolean hasValueQuantity() { 698 return this != null && this.value instanceof Quantity; 699 } 700 701 /** 702 * @return {@link #value} (If the parameter is a data type.) 703 */ 704 public Range getValueRange() throws FHIRException { 705 if (this.value == null) 706 this.value = new Range(); 707 if (!(this.value instanceof Range)) 708 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); 709 return (Range) this.value; 710 } 711 712 public boolean hasValueRange() { 713 return this != null && this.value instanceof Range; 714 } 715 716 /** 717 * @return {@link #value} (If the parameter is a data type.) 718 */ 719 public Ratio getValueRatio() throws FHIRException { 720 if (this.value == null) 721 this.value = new Ratio(); 722 if (!(this.value instanceof Ratio)) 723 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered"); 724 return (Ratio) this.value; 725 } 726 727 public boolean hasValueRatio() { 728 return this != null && this.value instanceof Ratio; 729 } 730 731 /** 732 * @return {@link #value} (If the parameter is a data type.) 733 */ 734 public Reference getValueReference() throws FHIRException { 735 if (this.value == null) 736 this.value = new Reference(); 737 if (!(this.value instanceof Reference)) 738 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 739 return (Reference) this.value; 740 } 741 742 public boolean hasValueReference() { 743 return this != null && this.value instanceof Reference; 744 } 745 746 /** 747 * @return {@link #value} (If the parameter is a data type.) 748 */ 749 public SampledData getValueSampledData() throws FHIRException { 750 if (this.value == null) 751 this.value = new SampledData(); 752 if (!(this.value instanceof SampledData)) 753 throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered"); 754 return (SampledData) this.value; 755 } 756 757 public boolean hasValueSampledData() { 758 return this != null && this.value instanceof SampledData; 759 } 760 761 /** 762 * @return {@link #value} (If the parameter is a data type.) 763 */ 764 public Signature getValueSignature() throws FHIRException { 765 if (this.value == null) 766 this.value = new Signature(); 767 if (!(this.value instanceof Signature)) 768 throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered"); 769 return (Signature) this.value; 770 } 771 772 public boolean hasValueSignature() { 773 return this != null && this.value instanceof Signature; 774 } 775 776 /** 777 * @return {@link #value} (If the parameter is a data type.) 778 */ 779 public Timing getValueTiming() throws FHIRException { 780 if (this.value == null) 781 this.value = new Timing(); 782 if (!(this.value instanceof Timing)) 783 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered"); 784 return (Timing) this.value; 785 } 786 787 public boolean hasValueTiming() { 788 return this != null && this.value instanceof Timing; 789 } 790 791 /** 792 * @return {@link #value} (If the parameter is a data type.) 793 */ 794 public ContactDetail getValueContactDetail() throws FHIRException { 795 if (this.value == null) 796 this.value = new ContactDetail(); 797 if (!(this.value instanceof ContactDetail)) 798 throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered"); 799 return (ContactDetail) this.value; 800 } 801 802 public boolean hasValueContactDetail() { 803 return this != null && this.value instanceof ContactDetail; 804 } 805 806 /** 807 * @return {@link #value} (If the parameter is a data type.) 808 */ 809 public Contributor getValueContributor() throws FHIRException { 810 if (this.value == null) 811 this.value = new Contributor(); 812 if (!(this.value instanceof Contributor)) 813 throw new FHIRException("Type mismatch: the type Contributor was expected, but "+this.value.getClass().getName()+" was encountered"); 814 return (Contributor) this.value; 815 } 816 817 public boolean hasValueContributor() { 818 return this != null && this.value instanceof Contributor; 819 } 820 821 /** 822 * @return {@link #value} (If the parameter is a data type.) 823 */ 824 public DataRequirement getValueDataRequirement() throws FHIRException { 825 if (this.value == null) 826 this.value = new DataRequirement(); 827 if (!(this.value instanceof DataRequirement)) 828 throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered"); 829 return (DataRequirement) this.value; 830 } 831 832 public boolean hasValueDataRequirement() { 833 return this != null && this.value instanceof DataRequirement; 834 } 835 836 /** 837 * @return {@link #value} (If the parameter is a data type.) 838 */ 839 public Expression getValueExpression() throws FHIRException { 840 if (this.value == null) 841 this.value = new Expression(); 842 if (!(this.value instanceof Expression)) 843 throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered"); 844 return (Expression) this.value; 845 } 846 847 public boolean hasValueExpression() { 848 return this != null && this.value instanceof Expression; 849 } 850 851 /** 852 * @return {@link #value} (If the parameter is a data type.) 853 */ 854 public ParameterDefinition getValueParameterDefinition() throws FHIRException { 855 if (this.value == null) 856 this.value = new ParameterDefinition(); 857 if (!(this.value instanceof ParameterDefinition)) 858 throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered"); 859 return (ParameterDefinition) this.value; 860 } 861 862 public boolean hasValueParameterDefinition() { 863 return this != null && this.value instanceof ParameterDefinition; 864 } 865 866 /** 867 * @return {@link #value} (If the parameter is a data type.) 868 */ 869 public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 870 if (this.value == null) 871 this.value = new RelatedArtifact(); 872 if (!(this.value instanceof RelatedArtifact)) 873 throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered"); 874 return (RelatedArtifact) this.value; 875 } 876 877 public boolean hasValueRelatedArtifact() { 878 return this != null && this.value instanceof RelatedArtifact; 879 } 880 881 /** 882 * @return {@link #value} (If the parameter is a data type.) 883 */ 884 public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 885 if (this.value == null) 886 this.value = new TriggerDefinition(); 887 if (!(this.value instanceof TriggerDefinition)) 888 throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered"); 889 return (TriggerDefinition) this.value; 890 } 891 892 public boolean hasValueTriggerDefinition() { 893 return this != null && this.value instanceof TriggerDefinition; 894 } 895 896 /** 897 * @return {@link #value} (If the parameter is a data type.) 898 */ 899 public UsageContext getValueUsageContext() throws FHIRException { 900 if (this.value == null) 901 this.value = new UsageContext(); 902 if (!(this.value instanceof UsageContext)) 903 throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered"); 904 return (UsageContext) this.value; 905 } 906 907 public boolean hasValueUsageContext() { 908 return this != null && this.value instanceof UsageContext; 909 } 910 911 /** 912 * @return {@link #value} (If the parameter is a data type.) 913 */ 914 public Dosage getValueDosage() throws FHIRException { 915 if (this.value == null) 916 this.value = new Dosage(); 917 if (!(this.value instanceof Dosage)) 918 throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered"); 919 return (Dosage) this.value; 920 } 921 922 public boolean hasValueDosage() { 923 return this != null && this.value instanceof Dosage; 924 } 925 926 /** 927 * @return {@link #value} (If the parameter is a data type.) 928 */ 929 public Meta getValueMeta() throws FHIRException { 930 if (this.value == null) 931 this.value = new Meta(); 932 if (!(this.value instanceof Meta)) 933 throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered"); 934 return (Meta) this.value; 935 } 936 937 public boolean hasValueMeta() { 938 return this != null && this.value instanceof Meta; 939 } 940 941 public boolean hasValue() { 942 return this.value != null && !this.value.isEmpty(); 943 } 944 945 /** 946 * @param value {@link #value} (If the parameter is a data type.) 947 */ 948 public ParametersParameterComponent setValue(DataType value) { 949 if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof Contributor || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Dosage || value instanceof Meta)) 950 throw new Error("Not the right type for Parameters.parameter.value[x]: "+value.fhirType()); 951 this.value = value; 952 return this; 953 } 954 955 /** 956 * @return {@link #resource} (If the parameter is a whole resource.) 957 */ 958 public Resource getResource() { 959 return this.resource; 960 } 961 962 public boolean hasResource() { 963 return this.resource != null && !this.resource.isEmpty(); 964 } 965 966 /** 967 * @param value {@link #resource} (If the parameter is a whole resource.) 968 */ 969 public ParametersParameterComponent setResource(Resource value) { 970 this.resource = value; 971 return this; 972 } 973 974 /** 975 * @return {@link #part} (A named part of a multi-part parameter.) 976 */ 977 public List<ParametersParameterComponent> getPart() { 978 if (this.part == null) 979 this.part = new ArrayList<ParametersParameterComponent>(); 980 return this.part; 981 } 982 983 /** 984 * @return Returns a reference to <code>this</code> for easy method chaining 985 */ 986 public ParametersParameterComponent setPart(List<ParametersParameterComponent> thePart) { 987 this.part = thePart; 988 return this; 989 } 990 991 public boolean hasPart() { 992 if (this.part == null) 993 return false; 994 for (ParametersParameterComponent item : this.part) 995 if (!item.isEmpty()) 996 return true; 997 return false; 998 } 999 1000 public ParametersParameterComponent addPart() { //3 1001 ParametersParameterComponent t = new ParametersParameterComponent(); 1002 if (this.part == null) 1003 this.part = new ArrayList<ParametersParameterComponent>(); 1004 this.part.add(t); 1005 return t; 1006 } 1007 1008 public ParametersParameterComponent addPart(ParametersParameterComponent t) { //3 1009 if (t == null) 1010 return this; 1011 if (this.part == null) 1012 this.part = new ArrayList<ParametersParameterComponent>(); 1013 this.part.add(t); 1014 return this; 1015 } 1016 1017 /** 1018 * @return The first repetition of repeating field {@link #part}, creating it if it does not already exist {3} 1019 */ 1020 public ParametersParameterComponent getPartFirstRep() { 1021 if (getPart().isEmpty()) { 1022 addPart(); 1023 } 1024 return getPart().get(0); 1025 } 1026 1027 protected void listChildren(List<Property> children) { 1028 super.listChildren(children); 1029 children.add(new Property("name", "string", "The name of the parameter (reference to the operation definition).", 0, 1, name)); 1030 children.add(new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|Reference|SampledData|Signature|Timing|ContactDetail|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "If the parameter is a data type.", 0, 1, value)); 1031 children.add(new Property("resource", "Resource", "If the parameter is a whole resource.", 0, 1, resource)); 1032 children.add(new Property("part", "@Parameters.parameter", "A named part of a multi-part parameter.", 0, java.lang.Integer.MAX_VALUE, part)); 1033 } 1034 1035 @Override 1036 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1037 switch (_hash) { 1038 case 3373707: /*name*/ return new Property("name", "string", "The name of the parameter (reference to the operation definition).", 0, 1, name); 1039 case -1410166417: /*value[x]*/ return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|Reference|SampledData|Signature|Timing|ContactDetail|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "If the parameter is a data type.", 0, 1, value); 1040 case 111972721: /*value*/ return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|Reference|SampledData|Signature|Timing|ContactDetail|Contributor|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Dosage|Meta", "If the parameter is a data type.", 0, 1, value); 1041 case -1535024575: /*valueBase64Binary*/ return new Property("value[x]", "base64Binary", "If the parameter is a data type.", 0, 1, value); 1042 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "If the parameter is a data type.", 0, 1, value); 1043 case -786218365: /*valueCanonical*/ return new Property("value[x]", "canonical", "If the parameter is a data type.", 0, 1, value); 1044 case -766209282: /*valueCode*/ return new Property("value[x]", "code", "If the parameter is a data type.", 0, 1, value); 1045 case -766192449: /*valueDate*/ return new Property("value[x]", "date", "If the parameter is a data type.", 0, 1, value); 1046 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "dateTime", "If the parameter is a data type.", 0, 1, value); 1047 case -2083993440: /*valueDecimal*/ return new Property("value[x]", "decimal", "If the parameter is a data type.", 0, 1, value); 1048 case 231604844: /*valueId*/ return new Property("value[x]", "id", "If the parameter is a data type.", 0, 1, value); 1049 case -1668687056: /*valueInstant*/ return new Property("value[x]", "instant", "If the parameter is a data type.", 0, 1, value); 1050 case -1668204915: /*valueInteger*/ return new Property("value[x]", "integer", "If the parameter is a data type.", 0, 1, value); 1051 case -1122120181: /*valueInteger64*/ return new Property("value[x]", "integer64", "If the parameter is a data type.", 0, 1, value); 1052 case -497880704: /*valueMarkdown*/ return new Property("value[x]", "markdown", "If the parameter is a data type.", 0, 1, value); 1053 case -1410178407: /*valueOid*/ return new Property("value[x]", "oid", "If the parameter is a data type.", 0, 1, value); 1054 case -1249932027: /*valuePositiveInt*/ return new Property("value[x]", "positiveInt", "If the parameter is a data type.", 0, 1, value); 1055 case -1424603934: /*valueString*/ return new Property("value[x]", "string", "If the parameter is a data type.", 0, 1, value); 1056 case -765708322: /*valueTime*/ return new Property("value[x]", "time", "If the parameter is a data type.", 0, 1, value); 1057 case 26529417: /*valueUnsignedInt*/ return new Property("value[x]", "unsignedInt", "If the parameter is a data type.", 0, 1, value); 1058 case -1410172357: /*valueUri*/ return new Property("value[x]", "uri", "If the parameter is a data type.", 0, 1, value); 1059 case -1410172354: /*valueUrl*/ return new Property("value[x]", "url", "If the parameter is a data type.", 0, 1, value); 1060 case -765667124: /*valueUuid*/ return new Property("value[x]", "uuid", "If the parameter is a data type.", 0, 1, value); 1061 case -478981821: /*valueAddress*/ return new Property("value[x]", "Address", "If the parameter is a data type.", 0, 1, value); 1062 case -1410191922: /*valueAge*/ return new Property("value[x]", "Age", "If the parameter is a data type.", 0, 1, value); 1063 case -67108992: /*valueAnnotation*/ return new Property("value[x]", "Annotation", "If the parameter is a data type.", 0, 1, value); 1064 case -475566732: /*valueAttachment*/ return new Property("value[x]", "Attachment", "If the parameter is a data type.", 0, 1, value); 1065 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "CodeableConcept", "If the parameter is a data type.", 0, 1, value); 1066 case -1887705029: /*valueCoding*/ return new Property("value[x]", "Coding", "If the parameter is a data type.", 0, 1, value); 1067 case 944904545: /*valueContactPoint*/ return new Property("value[x]", "ContactPoint", "If the parameter is a data type.", 0, 1, value); 1068 case 2017332766: /*valueCount*/ return new Property("value[x]", "Count", "If the parameter is a data type.", 0, 1, value); 1069 case -456359802: /*valueDistance*/ return new Property("value[x]", "Distance", "If the parameter is a data type.", 0, 1, value); 1070 case 1558135333: /*valueDuration*/ return new Property("value[x]", "Duration", "If the parameter is a data type.", 0, 1, value); 1071 case -2026205465: /*valueHumanName*/ return new Property("value[x]", "HumanName", "If the parameter is a data type.", 0, 1, value); 1072 case -130498310: /*valueIdentifier*/ return new Property("value[x]", "Identifier", "If the parameter is a data type.", 0, 1, value); 1073 case 2026560975: /*valueMoney*/ return new Property("value[x]", "Money", "If the parameter is a data type.", 0, 1, value); 1074 case -1524344174: /*valuePeriod*/ return new Property("value[x]", "Period", "If the parameter is a data type.", 0, 1, value); 1075 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "If the parameter is a data type.", 0, 1, value); 1076 case 2030761548: /*valueRange*/ return new Property("value[x]", "Range", "If the parameter is a data type.", 0, 1, value); 1077 case 2030767386: /*valueRatio*/ return new Property("value[x]", "Ratio", "If the parameter is a data type.", 0, 1, value); 1078 case 1755241690: /*valueReference*/ return new Property("value[x]", "Reference", "If the parameter is a data type.", 0, 1, value); 1079 case -962229101: /*valueSampledData*/ return new Property("value[x]", "SampledData", "If the parameter is a data type.", 0, 1, value); 1080 case -540985785: /*valueSignature*/ return new Property("value[x]", "Signature", "If the parameter is a data type.", 0, 1, value); 1081 case -1406282469: /*valueTiming*/ return new Property("value[x]", "Timing", "If the parameter is a data type.", 0, 1, value); 1082 case -1125200224: /*valueContactDetail*/ return new Property("value[x]", "ContactDetail", "If the parameter is a data type.", 0, 1, value); 1083 case 1281021610: /*valueContributor*/ return new Property("value[x]", "Contributor", "If the parameter is a data type.", 0, 1, value); 1084 case 1710554248: /*valueDataRequirement*/ return new Property("value[x]", "DataRequirement", "If the parameter is a data type.", 0, 1, value); 1085 case -307517719: /*valueExpression*/ return new Property("value[x]", "Expression", "If the parameter is a data type.", 0, 1, value); 1086 case 1387478187: /*valueParameterDefinition*/ return new Property("value[x]", "ParameterDefinition", "If the parameter is a data type.", 0, 1, value); 1087 case 1748214124: /*valueRelatedArtifact*/ return new Property("value[x]", "RelatedArtifact", "If the parameter is a data type.", 0, 1, value); 1088 case 976830394: /*valueTriggerDefinition*/ return new Property("value[x]", "TriggerDefinition", "If the parameter is a data type.", 0, 1, value); 1089 case 588000479: /*valueUsageContext*/ return new Property("value[x]", "UsageContext", "If the parameter is a data type.", 0, 1, value); 1090 case -1858636920: /*valueDosage*/ return new Property("value[x]", "Dosage", "If the parameter is a data type.", 0, 1, value); 1091 case -765920490: /*valueMeta*/ return new Property("value[x]", "Meta", "If the parameter is a data type.", 0, 1, value); 1092 case -341064690: /*resource*/ return new Property("resource", "Resource", "If the parameter is a whole resource.", 0, 1, resource); 1093 case 3433459: /*part*/ return new Property("part", "@Parameters.parameter", "A named part of a multi-part parameter.", 0, java.lang.Integer.MAX_VALUE, part); 1094 default: return super.getNamedProperty(_hash, _name, _checkValid); 1095 } 1096 1097 } 1098 1099 @Override 1100 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1101 switch (hash) { 1102 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1103 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType 1104 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Resource 1105 case 3433459: /*part*/ return this.part == null ? new Base[0] : this.part.toArray(new Base[this.part.size()]); // ParametersParameterComponent 1106 default: return super.getProperty(hash, name, checkValid); 1107 } 1108 1109 } 1110 1111 @Override 1112 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1113 switch (hash) { 1114 case 3373707: // name 1115 this.name = TypeConvertor.castToString(value); // StringType 1116 return value; 1117 case 111972721: // value 1118 this.value = TypeConvertor.castToType(value); // DataType 1119 return value; 1120 case -341064690: // resource 1121 this.resource = TypeConvertor.castToResource(value); // Resource 1122 return value; 1123 case 3433459: // part 1124 this.getPart().add((ParametersParameterComponent) value); // ParametersParameterComponent 1125 return value; 1126 default: return super.setProperty(hash, name, value); 1127 } 1128 1129 } 1130 1131 @Override 1132 public Base setProperty(String name, Base value) throws FHIRException { 1133 if (name.equals("name")) { 1134 this.name = TypeConvertor.castToString(value); // StringType 1135 } else if (name.equals("value[x]")) { 1136 this.value = TypeConvertor.castToType(value); // DataType 1137 } else if (name.equals("resource")) { 1138 this.resource = TypeConvertor.castToResource(value); // Resource 1139 } else if (name.equals("part")) { 1140 this.getPart().add((ParametersParameterComponent) value); 1141 } else 1142 return super.setProperty(name, value); 1143 return value; 1144 } 1145 1146 @Override 1147 public Base makeProperty(int hash, String name) throws FHIRException { 1148 switch (hash) { 1149 case 3373707: return getNameElement(); 1150 case -1410166417: return getValue(); 1151 case 111972721: return getValue(); 1152 case -341064690: throw new FHIRException("Cannot make property resource as it is not a complex type"); // Resource 1153 case 3433459: return addPart(); 1154 default: return super.makeProperty(hash, name); 1155 } 1156 1157 } 1158 1159 @Override 1160 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1161 switch (hash) { 1162 case 3373707: /*name*/ return new String[] {"string"}; 1163 case 111972721: /*value*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "Contributor", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Dosage", "Meta"}; 1164 case -341064690: /*resource*/ return new String[] {"Resource"}; 1165 case 3433459: /*part*/ return new String[] {"@Parameters.parameter"}; 1166 default: return super.getTypesForProperty(hash, name); 1167 } 1168 1169 } 1170 1171 @Override 1172 public Base addChild(String name) throws FHIRException { 1173 if (name.equals("name")) { 1174 throw new FHIRException("Cannot call addChild on a primitive type Parameters.parameter.name"); 1175 } 1176 else if (name.equals("valueBase64Binary")) { 1177 this.value = new Base64BinaryType(); 1178 return this.value; 1179 } 1180 else if (name.equals("valueBoolean")) { 1181 this.value = new BooleanType(); 1182 return this.value; 1183 } 1184 else if (name.equals("valueCanonical")) { 1185 this.value = new CanonicalType(); 1186 return this.value; 1187 } 1188 else if (name.equals("valueCode")) { 1189 this.value = new CodeType(); 1190 return this.value; 1191 } 1192 else if (name.equals("valueDate")) { 1193 this.value = new DateType(); 1194 return this.value; 1195 } 1196 else if (name.equals("valueDateTime")) { 1197 this.value = new DateTimeType(); 1198 return this.value; 1199 } 1200 else if (name.equals("valueDecimal")) { 1201 this.value = new DecimalType(); 1202 return this.value; 1203 } 1204 else if (name.equals("valueId")) { 1205 this.value = new IdType(); 1206 return this.value; 1207 } 1208 else if (name.equals("valueInstant")) { 1209 this.value = new InstantType(); 1210 return this.value; 1211 } 1212 else if (name.equals("valueInteger")) { 1213 this.value = new IntegerType(); 1214 return this.value; 1215 } 1216 else if (name.equals("valueInteger64")) { 1217 this.value = new Integer64Type(); 1218 return this.value; 1219 } 1220 else if (name.equals("valueMarkdown")) { 1221 this.value = new MarkdownType(); 1222 return this.value; 1223 } 1224 else if (name.equals("valueOid")) { 1225 this.value = new OidType(); 1226 return this.value; 1227 } 1228 else if (name.equals("valuePositiveInt")) { 1229 this.value = new PositiveIntType(); 1230 return this.value; 1231 } 1232 else if (name.equals("valueString")) { 1233 this.value = new StringType(); 1234 return this.value; 1235 } 1236 else if (name.equals("valueTime")) { 1237 this.value = new TimeType(); 1238 return this.value; 1239 } 1240 else if (name.equals("valueUnsignedInt")) { 1241 this.value = new UnsignedIntType(); 1242 return this.value; 1243 } 1244 else if (name.equals("valueUri")) { 1245 this.value = new UriType(); 1246 return this.value; 1247 } 1248 else if (name.equals("valueUrl")) { 1249 this.value = new UrlType(); 1250 return this.value; 1251 } 1252 else if (name.equals("valueUuid")) { 1253 this.value = new UuidType(); 1254 return this.value; 1255 } 1256 else if (name.equals("valueAddress")) { 1257 this.value = new Address(); 1258 return this.value; 1259 } 1260 else if (name.equals("valueAge")) { 1261 this.value = new Age(); 1262 return this.value; 1263 } 1264 else if (name.equals("valueAnnotation")) { 1265 this.value = new Annotation(); 1266 return this.value; 1267 } 1268 else if (name.equals("valueAttachment")) { 1269 this.value = new Attachment(); 1270 return this.value; 1271 } 1272 else if (name.equals("valueCodeableConcept")) { 1273 this.value = new CodeableConcept(); 1274 return this.value; 1275 } 1276 else if (name.equals("valueCoding")) { 1277 this.value = new Coding(); 1278 return this.value; 1279 } 1280 else if (name.equals("valueContactPoint")) { 1281 this.value = new ContactPoint(); 1282 return this.value; 1283 } 1284 else if (name.equals("valueCount")) { 1285 this.value = new Count(); 1286 return this.value; 1287 } 1288 else if (name.equals("valueDistance")) { 1289 this.value = new Distance(); 1290 return this.value; 1291 } 1292 else if (name.equals("valueDuration")) { 1293 this.value = new Duration(); 1294 return this.value; 1295 } 1296 else if (name.equals("valueHumanName")) { 1297 this.value = new HumanName(); 1298 return this.value; 1299 } 1300 else if (name.equals("valueIdentifier")) { 1301 this.value = new Identifier(); 1302 return this.value; 1303 } 1304 else if (name.equals("valueMoney")) { 1305 this.value = new Money(); 1306 return this.value; 1307 } 1308 else if (name.equals("valuePeriod")) { 1309 this.value = new Period(); 1310 return this.value; 1311 } 1312 else if (name.equals("valueQuantity")) { 1313 this.value = new Quantity(); 1314 return this.value; 1315 } 1316 else if (name.equals("valueRange")) { 1317 this.value = new Range(); 1318 return this.value; 1319 } 1320 else if (name.equals("valueRatio")) { 1321 this.value = new Ratio(); 1322 return this.value; 1323 } 1324 else if (name.equals("valueReference")) { 1325 this.value = new Reference(); 1326 return this.value; 1327 } 1328 else if (name.equals("valueSampledData")) { 1329 this.value = new SampledData(); 1330 return this.value; 1331 } 1332 else if (name.equals("valueSignature")) { 1333 this.value = new Signature(); 1334 return this.value; 1335 } 1336 else if (name.equals("valueTiming")) { 1337 this.value = new Timing(); 1338 return this.value; 1339 } 1340 else if (name.equals("valueContactDetail")) { 1341 this.value = new ContactDetail(); 1342 return this.value; 1343 } 1344 else if (name.equals("valueContributor")) { 1345 this.value = new Contributor(); 1346 return this.value; 1347 } 1348 else if (name.equals("valueDataRequirement")) { 1349 this.value = new DataRequirement(); 1350 return this.value; 1351 } 1352 else if (name.equals("valueExpression")) { 1353 this.value = new Expression(); 1354 return this.value; 1355 } 1356 else if (name.equals("valueParameterDefinition")) { 1357 this.value = new ParameterDefinition(); 1358 return this.value; 1359 } 1360 else if (name.equals("valueRelatedArtifact")) { 1361 this.value = new RelatedArtifact(); 1362 return this.value; 1363 } 1364 else if (name.equals("valueTriggerDefinition")) { 1365 this.value = new TriggerDefinition(); 1366 return this.value; 1367 } 1368 else if (name.equals("valueUsageContext")) { 1369 this.value = new UsageContext(); 1370 return this.value; 1371 } 1372 else if (name.equals("valueDosage")) { 1373 this.value = new Dosage(); 1374 return this.value; 1375 } 1376 else if (name.equals("valueMeta")) { 1377 this.value = new Meta(); 1378 return this.value; 1379 } 1380 else if (name.equals("resource")) { 1381 throw new FHIRException("Cannot call addChild on an abstract type Parameters.parameter.resource"); 1382 } 1383 else if (name.equals("part")) { 1384 return addPart(); 1385 } 1386 else 1387 return super.addChild(name); 1388 } 1389 1390 public ParametersParameterComponent copy() { 1391 ParametersParameterComponent dst = new ParametersParameterComponent(); 1392 copyValues(dst); 1393 return dst; 1394 } 1395 1396 public void copyValues(ParametersParameterComponent dst) { 1397 super.copyValues(dst); 1398 dst.name = name == null ? null : name.copy(); 1399 dst.value = value == null ? null : value.copy(); 1400 dst.resource = resource == null ? null : resource.copy(); 1401 if (part != null) { 1402 dst.part = new ArrayList<ParametersParameterComponent>(); 1403 for (ParametersParameterComponent i : part) 1404 dst.part.add(i.copy()); 1405 }; 1406 } 1407 1408 @Override 1409 public boolean equalsDeep(Base other_) { 1410 if (!super.equalsDeep(other_)) 1411 return false; 1412 if (!(other_ instanceof ParametersParameterComponent)) 1413 return false; 1414 ParametersParameterComponent o = (ParametersParameterComponent) other_; 1415 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true) && compareDeep(resource, o.resource, true) 1416 && compareDeep(part, o.part, true); 1417 } 1418 1419 @Override 1420 public boolean equalsShallow(Base other_) { 1421 if (!super.equalsShallow(other_)) 1422 return false; 1423 if (!(other_ instanceof ParametersParameterComponent)) 1424 return false; 1425 ParametersParameterComponent o = (ParametersParameterComponent) other_; 1426 return compareValues(name, o.name, true); 1427 } 1428 1429 public boolean isEmpty() { 1430 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value, resource, part 1431 ); 1432 } 1433 1434 public String fhirType() { 1435 return "Parameters.parameter"; 1436 1437 } 1438 1439 } 1440 1441 /** 1442 * A parameter passed to or received from the operation. 1443 */ 1444 @Child(name = "parameter", type = {}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1445 @Description(shortDefinition="Operation Parameter", formalDefinition="A parameter passed to or received from the operation." ) 1446 protected List<ParametersParameterComponent> parameter; 1447 1448 private static final long serialVersionUID = -1495940293L; 1449 1450 /** 1451 * Constructor 1452 */ 1453 public Parameters() { 1454 super(); 1455 } 1456 1457 /** 1458 * @return {@link #parameter} (A parameter passed to or received from the operation.) 1459 */ 1460 public List<ParametersParameterComponent> getParameter() { 1461 if (this.parameter == null) 1462 this.parameter = new ArrayList<ParametersParameterComponent>(); 1463 return this.parameter; 1464 } 1465 1466 /** 1467 * @return Returns a reference to <code>this</code> for easy method chaining 1468 */ 1469 public Parameters setParameter(List<ParametersParameterComponent> theParameter) { 1470 this.parameter = theParameter; 1471 return this; 1472 } 1473 1474 public boolean hasParameter() { 1475 if (this.parameter == null) 1476 return false; 1477 for (ParametersParameterComponent item : this.parameter) 1478 if (!item.isEmpty()) 1479 return true; 1480 return false; 1481 } 1482 1483 public ParametersParameterComponent addParameter() { //3 1484 ParametersParameterComponent t = new ParametersParameterComponent(); 1485 if (this.parameter == null) 1486 this.parameter = new ArrayList<ParametersParameterComponent>(); 1487 this.parameter.add(t); 1488 return t; 1489 } 1490 1491 public Parameters addParameter(ParametersParameterComponent t) { //3 1492 if (t == null) 1493 return this; 1494 if (this.parameter == null) 1495 this.parameter = new ArrayList<ParametersParameterComponent>(); 1496 this.parameter.add(t); 1497 return this; 1498 } 1499 1500 /** 1501 * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist {3} 1502 */ 1503 public ParametersParameterComponent getParameterFirstRep() { 1504 if (getParameter().isEmpty()) { 1505 addParameter(); 1506 } 1507 return getParameter().get(0); 1508 } 1509 1510 protected void listChildren(List<Property> children) { 1511 super.listChildren(children); 1512 children.add(new Property("parameter", "", "A parameter passed to or received from the operation.", 0, java.lang.Integer.MAX_VALUE, parameter)); 1513 } 1514 1515 @Override 1516 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1517 switch (_hash) { 1518 case 1954460585: /*parameter*/ return new Property("parameter", "", "A parameter passed to or received from the operation.", 0, java.lang.Integer.MAX_VALUE, parameter); 1519 default: return super.getNamedProperty(_hash, _name, _checkValid); 1520 } 1521 1522 } 1523 1524 @Override 1525 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1526 switch (hash) { 1527 case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // ParametersParameterComponent 1528 default: return super.getProperty(hash, name, checkValid); 1529 } 1530 1531 } 1532 1533 @Override 1534 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1535 switch (hash) { 1536 case 1954460585: // parameter 1537 this.getParameter().add((ParametersParameterComponent) value); // ParametersParameterComponent 1538 return value; 1539 default: return super.setProperty(hash, name, value); 1540 } 1541 1542 } 1543 1544 @Override 1545 public Base setProperty(String name, Base value) throws FHIRException { 1546 if (name.equals("parameter")) { 1547 this.getParameter().add((ParametersParameterComponent) value); 1548 } else 1549 return super.setProperty(name, value); 1550 return value; 1551 } 1552 1553 @Override 1554 public Base makeProperty(int hash, String name) throws FHIRException { 1555 switch (hash) { 1556 case 1954460585: return addParameter(); 1557 default: return super.makeProperty(hash, name); 1558 } 1559 1560 } 1561 1562 @Override 1563 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1564 switch (hash) { 1565 case 1954460585: /*parameter*/ return new String[] {}; 1566 default: return super.getTypesForProperty(hash, name); 1567 } 1568 1569 } 1570 1571 @Override 1572 public Base addChild(String name) throws FHIRException { 1573 if (name.equals("parameter")) { 1574 return addParameter(); 1575 } 1576 else 1577 return super.addChild(name); 1578 } 1579 1580 public String fhirType() { 1581 return "Parameters"; 1582 1583 } 1584 1585 public Parameters copy() { 1586 Parameters dst = new Parameters(); 1587 copyValues(dst); 1588 return dst; 1589 } 1590 1591 public void copyValues(Parameters dst) { 1592 super.copyValues(dst); 1593 if (parameter != null) { 1594 dst.parameter = new ArrayList<ParametersParameterComponent>(); 1595 for (ParametersParameterComponent i : parameter) 1596 dst.parameter.add(i.copy()); 1597 }; 1598 } 1599 1600 protected Parameters typedCopy() { 1601 return copy(); 1602 } 1603 1604 @Override 1605 public boolean equalsDeep(Base other_) { 1606 if (!super.equalsDeep(other_)) 1607 return false; 1608 if (!(other_ instanceof Parameters)) 1609 return false; 1610 Parameters o = (Parameters) other_; 1611 return compareDeep(parameter, o.parameter, true); 1612 } 1613 1614 @Override 1615 public boolean equalsShallow(Base other_) { 1616 if (!super.equalsShallow(other_)) 1617 return false; 1618 if (!(other_ instanceof Parameters)) 1619 return false; 1620 Parameters o = (Parameters) other_; 1621 return true; 1622 } 1623 1624 public boolean isEmpty() { 1625 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(parameter); 1626 } 1627 1628 @Override 1629 public ResourceType getResourceType() { 1630 return ResourceType.Parameters; 1631 } 1632 1633// Manual code (from Configuration.txt)t: 1634 1635 public Parameters addParameter(String name, boolean b) { 1636 addParameter().setName(name).setValue(new BooleanType(b)); 1637 return this; 1638 } 1639 1640 public Parameters addParameter(String name, String s) { 1641 if (s != null) 1642 addParameter().setName(name).setValue(new StringType(s)); 1643 return this; 1644 } 1645 1646 public Parameters addParameter(String name, DataType v) { 1647 if (v != null) 1648 addParameter().setName(name).setValue(v); 1649 return this; 1650 } 1651 1652 public Parameters setParameter(String name, boolean b) { 1653 for (ParametersParameterComponent p : getParameter()) { 1654 if (p.getName().equals(name)) { 1655 p.setValue(new BooleanType(b)); 1656 return this; 1657 } 1658 } 1659 addParameter().setName(name).setValue(new BooleanType(b)); 1660 return this; 1661 } 1662 1663 public Parameters setParameter(String name, String s) { 1664 if (s != null) { 1665 for (ParametersParameterComponent p : getParameter()) { 1666 if (p.getName().equals(name)) { 1667 p.setValue(new StringType(s)); 1668 return this; 1669 } 1670 } 1671 addParameter().setName(name).setValue(new StringType(s)); 1672 } 1673 return this; 1674 } 1675 1676 public Parameters setParameter(String name, DataType v) { 1677 if (v != null) { 1678 for (ParametersParameterComponent p : getParameter() ) { 1679 if (p.getName().equals(name)) { 1680 p.setValue(v); 1681 return this; 1682 } 1683 } 1684 addParameter().setName(name).setValue(v); 1685 } 1686 return this; 1687 } 1688 1689 public boolean hasParameter(String name) { 1690 for (ParametersParameterComponent p : getParameter()) { 1691 if (p.getName().equals(name)) 1692 return true; 1693 } 1694 return false; 1695 } 1696 1697 public DataType getParameter(String name) { 1698 for (ParametersParameterComponent p : getParameter()) { 1699 if (p.getName().equals(name)) 1700 return p.getValue(); 1701 } 1702 return null; 1703 } 1704 1705 public List<DataType> getParameters(String name) { 1706 List<DataType> res = new ArrayList<>(); 1707 for (ParametersParameterComponent p : getParameter()) { 1708 if (p.getName().equals(name)) 1709 res.add(p.getValue()); 1710 } 1711 return res; 1712 } 1713 1714 1715 public boolean getParameterBool(String name) { 1716 for (ParametersParameterComponent p : getParameter()) { 1717 if (p.getName().equals(name)) { 1718 if (p.getValue() instanceof BooleanType) 1719 return ((BooleanType) p.getValue()).booleanValue(); 1720 boolean ok = Boolean.getBoolean(p.getValue().primitiveValue()); 1721 return ok; 1722 } 1723 } 1724 return false; 1725 } 1726 1727 1728// end addition 1729 1730} 1731