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