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