001package org.hl7.fhir.dstu3.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 Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import org.hl7.fhir.dstu3.model.Enumerations.*; 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 structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification. 048 */ 049@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/Profile/TestScript") 050@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "origin", "destination", "metadata", "fixture", "profile", "variable", "rule", "ruleset", "setup", "test", "teardown"}) 051public class TestScript extends MetadataResource { 052 053 public enum ContentType { 054 /** 055 * XML content-type corresponding to the application/fhir+xml mime-type. 056 */ 057 XML, 058 /** 059 * JSON content-type corresponding to the application/fhir+json mime-type. 060 */ 061 JSON, 062 /** 063 * RDF content-type corresponding to the text/turtle mime-type. 064 */ 065 TTL, 066 /** 067 * Prevent the use of the corresponding http header. 068 */ 069 NONE, 070 /** 071 * added to help the parsers with the generic types 072 */ 073 NULL; 074 public static ContentType fromCode(String codeString) throws FHIRException { 075 if (codeString == null || "".equals(codeString)) 076 return null; 077 if ("xml".equals(codeString)) 078 return XML; 079 if ("json".equals(codeString)) 080 return JSON; 081 if ("ttl".equals(codeString)) 082 return TTL; 083 if ("none".equals(codeString)) 084 return NONE; 085 if (Configuration.isAcceptInvalidEnums()) 086 return null; 087 else 088 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 089 } 090 public String toCode() { 091 switch (this) { 092 case XML: return "xml"; 093 case JSON: return "json"; 094 case TTL: return "ttl"; 095 case NONE: return "none"; 096 default: return "?"; 097 } 098 } 099 public String getSystem() { 100 switch (this) { 101 case XML: return "http://hl7.org/fhir/content-type"; 102 case JSON: return "http://hl7.org/fhir/content-type"; 103 case TTL: return "http://hl7.org/fhir/content-type"; 104 case NONE: return "http://hl7.org/fhir/content-type"; 105 default: return "?"; 106 } 107 } 108 public String getDefinition() { 109 switch (this) { 110 case XML: return "XML content-type corresponding to the application/fhir+xml mime-type."; 111 case JSON: return "JSON content-type corresponding to the application/fhir+json mime-type."; 112 case TTL: return "RDF content-type corresponding to the text/turtle mime-type."; 113 case NONE: return "Prevent the use of the corresponding http header."; 114 default: return "?"; 115 } 116 } 117 public String getDisplay() { 118 switch (this) { 119 case XML: return "xml"; 120 case JSON: return "json"; 121 case TTL: return "ttl"; 122 case NONE: return "none"; 123 default: return "?"; 124 } 125 } 126 } 127 128 public static class ContentTypeEnumFactory implements EnumFactory<ContentType> { 129 public ContentType fromCode(String codeString) throws IllegalArgumentException { 130 if (codeString == null || "".equals(codeString)) 131 if (codeString == null || "".equals(codeString)) 132 return null; 133 if ("xml".equals(codeString)) 134 return ContentType.XML; 135 if ("json".equals(codeString)) 136 return ContentType.JSON; 137 if ("ttl".equals(codeString)) 138 return ContentType.TTL; 139 if ("none".equals(codeString)) 140 return ContentType.NONE; 141 throw new IllegalArgumentException("Unknown ContentType code '"+codeString+"'"); 142 } 143 public Enumeration<ContentType> fromType(Base code) throws FHIRException { 144 if (code == null) 145 return null; 146 if (code.isEmpty()) 147 return new Enumeration<ContentType>(this); 148 String codeString = ((PrimitiveType) code).asStringValue(); 149 if (codeString == null || "".equals(codeString)) 150 return null; 151 if ("xml".equals(codeString)) 152 return new Enumeration<ContentType>(this, ContentType.XML); 153 if ("json".equals(codeString)) 154 return new Enumeration<ContentType>(this, ContentType.JSON); 155 if ("ttl".equals(codeString)) 156 return new Enumeration<ContentType>(this, ContentType.TTL); 157 if ("none".equals(codeString)) 158 return new Enumeration<ContentType>(this, ContentType.NONE); 159 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 160 } 161 public String toCode(ContentType code) { 162 if (code == ContentType.XML) 163 return "xml"; 164 if (code == ContentType.JSON) 165 return "json"; 166 if (code == ContentType.TTL) 167 return "ttl"; 168 if (code == ContentType.NONE) 169 return "none"; 170 return "?"; 171 } 172 public String toSystem(ContentType code) { 173 return code.getSystem(); 174 } 175 } 176 177 public enum AssertionDirectionType { 178 /** 179 * The assertion is evaluated on the response. This is the default value. 180 */ 181 RESPONSE, 182 /** 183 * The assertion is evaluated on the request. 184 */ 185 REQUEST, 186 /** 187 * added to help the parsers with the generic types 188 */ 189 NULL; 190 public static AssertionDirectionType fromCode(String codeString) throws FHIRException { 191 if (codeString == null || "".equals(codeString)) 192 return null; 193 if ("response".equals(codeString)) 194 return RESPONSE; 195 if ("request".equals(codeString)) 196 return REQUEST; 197 if (Configuration.isAcceptInvalidEnums()) 198 return null; 199 else 200 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 201 } 202 public String toCode() { 203 switch (this) { 204 case RESPONSE: return "response"; 205 case REQUEST: return "request"; 206 default: return "?"; 207 } 208 } 209 public String getSystem() { 210 switch (this) { 211 case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes"; 212 case REQUEST: return "http://hl7.org/fhir/assert-direction-codes"; 213 default: return "?"; 214 } 215 } 216 public String getDefinition() { 217 switch (this) { 218 case RESPONSE: return "The assertion is evaluated on the response. This is the default value."; 219 case REQUEST: return "The assertion is evaluated on the request."; 220 default: return "?"; 221 } 222 } 223 public String getDisplay() { 224 switch (this) { 225 case RESPONSE: return "response"; 226 case REQUEST: return "request"; 227 default: return "?"; 228 } 229 } 230 } 231 232 public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> { 233 public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException { 234 if (codeString == null || "".equals(codeString)) 235 if (codeString == null || "".equals(codeString)) 236 return null; 237 if ("response".equals(codeString)) 238 return AssertionDirectionType.RESPONSE; 239 if ("request".equals(codeString)) 240 return AssertionDirectionType.REQUEST; 241 throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'"); 242 } 243 public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException { 244 if (code == null) 245 return null; 246 if (code.isEmpty()) 247 return new Enumeration<AssertionDirectionType>(this); 248 String codeString = ((PrimitiveType) code).asStringValue(); 249 if (codeString == null || "".equals(codeString)) 250 return null; 251 if ("response".equals(codeString)) 252 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE); 253 if ("request".equals(codeString)) 254 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST); 255 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 256 } 257 public String toCode(AssertionDirectionType code) { 258 if (code == AssertionDirectionType.RESPONSE) 259 return "response"; 260 if (code == AssertionDirectionType.REQUEST) 261 return "request"; 262 return "?"; 263 } 264 public String toSystem(AssertionDirectionType code) { 265 return code.getSystem(); 266 } 267 } 268 269 public enum AssertionOperatorType { 270 /** 271 * Default value. Equals comparison. 272 */ 273 EQUALS, 274 /** 275 * Not equals comparison. 276 */ 277 NOTEQUALS, 278 /** 279 * Compare value within a known set of values. 280 */ 281 IN, 282 /** 283 * Compare value not within a known set of values. 284 */ 285 NOTIN, 286 /** 287 * Compare value to be greater than a known value. 288 */ 289 GREATERTHAN, 290 /** 291 * Compare value to be less than a known value. 292 */ 293 LESSTHAN, 294 /** 295 * Compare value is empty. 296 */ 297 EMPTY, 298 /** 299 * Compare value is not empty. 300 */ 301 NOTEMPTY, 302 /** 303 * Compare value string contains a known value. 304 */ 305 CONTAINS, 306 /** 307 * Compare value string does not contain a known value. 308 */ 309 NOTCONTAINS, 310 /** 311 * Evaluate the fluentpath expression as a boolean condition. 312 */ 313 EVAL, 314 /** 315 * added to help the parsers with the generic types 316 */ 317 NULL; 318 public static AssertionOperatorType fromCode(String codeString) throws FHIRException { 319 if (codeString == null || "".equals(codeString)) 320 return null; 321 if ("equals".equals(codeString)) 322 return EQUALS; 323 if ("notEquals".equals(codeString)) 324 return NOTEQUALS; 325 if ("in".equals(codeString)) 326 return IN; 327 if ("notIn".equals(codeString)) 328 return NOTIN; 329 if ("greaterThan".equals(codeString)) 330 return GREATERTHAN; 331 if ("lessThan".equals(codeString)) 332 return LESSTHAN; 333 if ("empty".equals(codeString)) 334 return EMPTY; 335 if ("notEmpty".equals(codeString)) 336 return NOTEMPTY; 337 if ("contains".equals(codeString)) 338 return CONTAINS; 339 if ("notContains".equals(codeString)) 340 return NOTCONTAINS; 341 if ("eval".equals(codeString)) 342 return EVAL; 343 if (Configuration.isAcceptInvalidEnums()) 344 return null; 345 else 346 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 347 } 348 public String toCode() { 349 switch (this) { 350 case EQUALS: return "equals"; 351 case NOTEQUALS: return "notEquals"; 352 case IN: return "in"; 353 case NOTIN: return "notIn"; 354 case GREATERTHAN: return "greaterThan"; 355 case LESSTHAN: return "lessThan"; 356 case EMPTY: return "empty"; 357 case NOTEMPTY: return "notEmpty"; 358 case CONTAINS: return "contains"; 359 case NOTCONTAINS: return "notContains"; 360 case EVAL: return "eval"; 361 default: return "?"; 362 } 363 } 364 public String getSystem() { 365 switch (this) { 366 case EQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 367 case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 368 case IN: return "http://hl7.org/fhir/assert-operator-codes"; 369 case NOTIN: return "http://hl7.org/fhir/assert-operator-codes"; 370 case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 371 case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 372 case EMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 373 case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 374 case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 375 case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 376 case EVAL: return "http://hl7.org/fhir/assert-operator-codes"; 377 default: return "?"; 378 } 379 } 380 public String getDefinition() { 381 switch (this) { 382 case EQUALS: return "Default value. Equals comparison."; 383 case NOTEQUALS: return "Not equals comparison."; 384 case IN: return "Compare value within a known set of values."; 385 case NOTIN: return "Compare value not within a known set of values."; 386 case GREATERTHAN: return "Compare value to be greater than a known value."; 387 case LESSTHAN: return "Compare value to be less than a known value."; 388 case EMPTY: return "Compare value is empty."; 389 case NOTEMPTY: return "Compare value is not empty."; 390 case CONTAINS: return "Compare value string contains a known value."; 391 case NOTCONTAINS: return "Compare value string does not contain a known value."; 392 case EVAL: return "Evaluate the fluentpath expression as a boolean condition."; 393 default: return "?"; 394 } 395 } 396 public String getDisplay() { 397 switch (this) { 398 case EQUALS: return "equals"; 399 case NOTEQUALS: return "notEquals"; 400 case IN: return "in"; 401 case NOTIN: return "notIn"; 402 case GREATERTHAN: return "greaterThan"; 403 case LESSTHAN: return "lessThan"; 404 case EMPTY: return "empty"; 405 case NOTEMPTY: return "notEmpty"; 406 case CONTAINS: return "contains"; 407 case NOTCONTAINS: return "notContains"; 408 case EVAL: return "evaluate"; 409 default: return "?"; 410 } 411 } 412 } 413 414 public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> { 415 public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException { 416 if (codeString == null || "".equals(codeString)) 417 if (codeString == null || "".equals(codeString)) 418 return null; 419 if ("equals".equals(codeString)) 420 return AssertionOperatorType.EQUALS; 421 if ("notEquals".equals(codeString)) 422 return AssertionOperatorType.NOTEQUALS; 423 if ("in".equals(codeString)) 424 return AssertionOperatorType.IN; 425 if ("notIn".equals(codeString)) 426 return AssertionOperatorType.NOTIN; 427 if ("greaterThan".equals(codeString)) 428 return AssertionOperatorType.GREATERTHAN; 429 if ("lessThan".equals(codeString)) 430 return AssertionOperatorType.LESSTHAN; 431 if ("empty".equals(codeString)) 432 return AssertionOperatorType.EMPTY; 433 if ("notEmpty".equals(codeString)) 434 return AssertionOperatorType.NOTEMPTY; 435 if ("contains".equals(codeString)) 436 return AssertionOperatorType.CONTAINS; 437 if ("notContains".equals(codeString)) 438 return AssertionOperatorType.NOTCONTAINS; 439 if ("eval".equals(codeString)) 440 return AssertionOperatorType.EVAL; 441 throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'"); 442 } 443 public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException { 444 if (code == null) 445 return null; 446 if (code.isEmpty()) 447 return new Enumeration<AssertionOperatorType>(this); 448 String codeString = ((PrimitiveType) code).asStringValue(); 449 if (codeString == null || "".equals(codeString)) 450 return null; 451 if ("equals".equals(codeString)) 452 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS); 453 if ("notEquals".equals(codeString)) 454 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS); 455 if ("in".equals(codeString)) 456 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN); 457 if ("notIn".equals(codeString)) 458 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN); 459 if ("greaterThan".equals(codeString)) 460 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN); 461 if ("lessThan".equals(codeString)) 462 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN); 463 if ("empty".equals(codeString)) 464 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY); 465 if ("notEmpty".equals(codeString)) 466 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY); 467 if ("contains".equals(codeString)) 468 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS); 469 if ("notContains".equals(codeString)) 470 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS); 471 if ("eval".equals(codeString)) 472 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL); 473 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 474 } 475 public String toCode(AssertionOperatorType code) { 476 if (code == AssertionOperatorType.EQUALS) 477 return "equals"; 478 if (code == AssertionOperatorType.NOTEQUALS) 479 return "notEquals"; 480 if (code == AssertionOperatorType.IN) 481 return "in"; 482 if (code == AssertionOperatorType.NOTIN) 483 return "notIn"; 484 if (code == AssertionOperatorType.GREATERTHAN) 485 return "greaterThan"; 486 if (code == AssertionOperatorType.LESSTHAN) 487 return "lessThan"; 488 if (code == AssertionOperatorType.EMPTY) 489 return "empty"; 490 if (code == AssertionOperatorType.NOTEMPTY) 491 return "notEmpty"; 492 if (code == AssertionOperatorType.CONTAINS) 493 return "contains"; 494 if (code == AssertionOperatorType.NOTCONTAINS) 495 return "notContains"; 496 if (code == AssertionOperatorType.EVAL) 497 return "eval"; 498 return "?"; 499 } 500 public String toSystem(AssertionOperatorType code) { 501 return code.getSystem(); 502 } 503 } 504 505 public enum TestScriptRequestMethodCode { 506 /** 507 * HTTP DELETE operation 508 */ 509 DELETE, 510 /** 511 * HTTP GET operation 512 */ 513 GET, 514 /** 515 * HTTP OPTIONS operation 516 */ 517 OPTIONS, 518 /** 519 * HTTP PATCH operation 520 */ 521 PATCH, 522 /** 523 * HTTP POST operation 524 */ 525 POST, 526 /** 527 * HTTP PUT operation 528 */ 529 PUT, 530 /** 531 * added to help the parsers with the generic types 532 */ 533 NULL; 534 public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException { 535 if (codeString == null || "".equals(codeString)) 536 return null; 537 if ("delete".equals(codeString)) 538 return DELETE; 539 if ("get".equals(codeString)) 540 return GET; 541 if ("options".equals(codeString)) 542 return OPTIONS; 543 if ("patch".equals(codeString)) 544 return PATCH; 545 if ("post".equals(codeString)) 546 return POST; 547 if ("put".equals(codeString)) 548 return PUT; 549 if (Configuration.isAcceptInvalidEnums()) 550 return null; 551 else 552 throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 553 } 554 public String toCode() { 555 switch (this) { 556 case DELETE: return "delete"; 557 case GET: return "get"; 558 case OPTIONS: return "options"; 559 case PATCH: return "patch"; 560 case POST: return "post"; 561 case PUT: return "put"; 562 default: return "?"; 563 } 564 } 565 public String getSystem() { 566 switch (this) { 567 case DELETE: return "http://hl7.org/fhir/http-operations"; 568 case GET: return "http://hl7.org/fhir/http-operations"; 569 case OPTIONS: return "http://hl7.org/fhir/http-operations"; 570 case PATCH: return "http://hl7.org/fhir/http-operations"; 571 case POST: return "http://hl7.org/fhir/http-operations"; 572 case PUT: return "http://hl7.org/fhir/http-operations"; 573 default: return "?"; 574 } 575 } 576 public String getDefinition() { 577 switch (this) { 578 case DELETE: return "HTTP DELETE operation"; 579 case GET: return "HTTP GET operation"; 580 case OPTIONS: return "HTTP OPTIONS operation"; 581 case PATCH: return "HTTP PATCH operation"; 582 case POST: return "HTTP POST operation"; 583 case PUT: return "HTTP PUT operation"; 584 default: return "?"; 585 } 586 } 587 public String getDisplay() { 588 switch (this) { 589 case DELETE: return "DELETE"; 590 case GET: return "GET"; 591 case OPTIONS: return "OPTIONS"; 592 case PATCH: return "PATCH"; 593 case POST: return "POST"; 594 case PUT: return "PUT"; 595 default: return "?"; 596 } 597 } 598 } 599 600 public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> { 601 public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException { 602 if (codeString == null || "".equals(codeString)) 603 if (codeString == null || "".equals(codeString)) 604 return null; 605 if ("delete".equals(codeString)) 606 return TestScriptRequestMethodCode.DELETE; 607 if ("get".equals(codeString)) 608 return TestScriptRequestMethodCode.GET; 609 if ("options".equals(codeString)) 610 return TestScriptRequestMethodCode.OPTIONS; 611 if ("patch".equals(codeString)) 612 return TestScriptRequestMethodCode.PATCH; 613 if ("post".equals(codeString)) 614 return TestScriptRequestMethodCode.POST; 615 if ("put".equals(codeString)) 616 return TestScriptRequestMethodCode.PUT; 617 throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 618 } 619 public Enumeration<TestScriptRequestMethodCode> fromType(Base code) throws FHIRException { 620 if (code == null) 621 return null; 622 if (code.isEmpty()) 623 return new Enumeration<TestScriptRequestMethodCode>(this); 624 String codeString = ((PrimitiveType) code).asStringValue(); 625 if (codeString == null || "".equals(codeString)) 626 return null; 627 if ("delete".equals(codeString)) 628 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE); 629 if ("get".equals(codeString)) 630 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET); 631 if ("options".equals(codeString)) 632 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS); 633 if ("patch".equals(codeString)) 634 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH); 635 if ("post".equals(codeString)) 636 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST); 637 if ("put".equals(codeString)) 638 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT); 639 throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 640 } 641 public String toCode(TestScriptRequestMethodCode code) { 642 if (code == TestScriptRequestMethodCode.DELETE) 643 return "delete"; 644 if (code == TestScriptRequestMethodCode.GET) 645 return "get"; 646 if (code == TestScriptRequestMethodCode.OPTIONS) 647 return "options"; 648 if (code == TestScriptRequestMethodCode.PATCH) 649 return "patch"; 650 if (code == TestScriptRequestMethodCode.POST) 651 return "post"; 652 if (code == TestScriptRequestMethodCode.PUT) 653 return "put"; 654 return "?"; 655 } 656 public String toSystem(TestScriptRequestMethodCode code) { 657 return code.getSystem(); 658 } 659 } 660 661 public enum AssertionResponseTypes { 662 /** 663 * Response code is 200. 664 */ 665 OKAY, 666 /** 667 * Response code is 201. 668 */ 669 CREATED, 670 /** 671 * Response code is 204. 672 */ 673 NOCONTENT, 674 /** 675 * Response code is 304. 676 */ 677 NOTMODIFIED, 678 /** 679 * Response code is 400. 680 */ 681 BAD, 682 /** 683 * Response code is 403. 684 */ 685 FORBIDDEN, 686 /** 687 * Response code is 404. 688 */ 689 NOTFOUND, 690 /** 691 * Response code is 405. 692 */ 693 METHODNOTALLOWED, 694 /** 695 * Response code is 409. 696 */ 697 CONFLICT, 698 /** 699 * Response code is 410. 700 */ 701 GONE, 702 /** 703 * Response code is 412. 704 */ 705 PRECONDITIONFAILED, 706 /** 707 * Response code is 422. 708 */ 709 UNPROCESSABLE, 710 /** 711 * added to help the parsers with the generic types 712 */ 713 NULL; 714 public static AssertionResponseTypes fromCode(String codeString) throws FHIRException { 715 if (codeString == null || "".equals(codeString)) 716 return null; 717 if ("okay".equals(codeString)) 718 return OKAY; 719 if ("created".equals(codeString)) 720 return CREATED; 721 if ("noContent".equals(codeString)) 722 return NOCONTENT; 723 if ("notModified".equals(codeString)) 724 return NOTMODIFIED; 725 if ("bad".equals(codeString)) 726 return BAD; 727 if ("forbidden".equals(codeString)) 728 return FORBIDDEN; 729 if ("notFound".equals(codeString)) 730 return NOTFOUND; 731 if ("methodNotAllowed".equals(codeString)) 732 return METHODNOTALLOWED; 733 if ("conflict".equals(codeString)) 734 return CONFLICT; 735 if ("gone".equals(codeString)) 736 return GONE; 737 if ("preconditionFailed".equals(codeString)) 738 return PRECONDITIONFAILED; 739 if ("unprocessable".equals(codeString)) 740 return UNPROCESSABLE; 741 if (Configuration.isAcceptInvalidEnums()) 742 return null; 743 else 744 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 745 } 746 public String toCode() { 747 switch (this) { 748 case OKAY: return "okay"; 749 case CREATED: return "created"; 750 case NOCONTENT: return "noContent"; 751 case NOTMODIFIED: return "notModified"; 752 case BAD: return "bad"; 753 case FORBIDDEN: return "forbidden"; 754 case NOTFOUND: return "notFound"; 755 case METHODNOTALLOWED: return "methodNotAllowed"; 756 case CONFLICT: return "conflict"; 757 case GONE: return "gone"; 758 case PRECONDITIONFAILED: return "preconditionFailed"; 759 case UNPROCESSABLE: return "unprocessable"; 760 default: return "?"; 761 } 762 } 763 public String getSystem() { 764 switch (this) { 765 case OKAY: return "http://hl7.org/fhir/assert-response-code-types"; 766 case CREATED: return "http://hl7.org/fhir/assert-response-code-types"; 767 case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types"; 768 case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types"; 769 case BAD: return "http://hl7.org/fhir/assert-response-code-types"; 770 case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types"; 771 case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types"; 772 case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types"; 773 case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types"; 774 case GONE: return "http://hl7.org/fhir/assert-response-code-types"; 775 case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types"; 776 case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types"; 777 default: return "?"; 778 } 779 } 780 public String getDefinition() { 781 switch (this) { 782 case OKAY: return "Response code is 200."; 783 case CREATED: return "Response code is 201."; 784 case NOCONTENT: return "Response code is 204."; 785 case NOTMODIFIED: return "Response code is 304."; 786 case BAD: return "Response code is 400."; 787 case FORBIDDEN: return "Response code is 403."; 788 case NOTFOUND: return "Response code is 404."; 789 case METHODNOTALLOWED: return "Response code is 405."; 790 case CONFLICT: return "Response code is 409."; 791 case GONE: return "Response code is 410."; 792 case PRECONDITIONFAILED: return "Response code is 412."; 793 case UNPROCESSABLE: return "Response code is 422."; 794 default: return "?"; 795 } 796 } 797 public String getDisplay() { 798 switch (this) { 799 case OKAY: return "okay"; 800 case CREATED: return "created"; 801 case NOCONTENT: return "noContent"; 802 case NOTMODIFIED: return "notModified"; 803 case BAD: return "bad"; 804 case FORBIDDEN: return "forbidden"; 805 case NOTFOUND: return "notFound"; 806 case METHODNOTALLOWED: return "methodNotAllowed"; 807 case CONFLICT: return "conflict"; 808 case GONE: return "gone"; 809 case PRECONDITIONFAILED: return "preconditionFailed"; 810 case UNPROCESSABLE: return "unprocessable"; 811 default: return "?"; 812 } 813 } 814 } 815 816 public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> { 817 public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException { 818 if (codeString == null || "".equals(codeString)) 819 if (codeString == null || "".equals(codeString)) 820 return null; 821 if ("okay".equals(codeString)) 822 return AssertionResponseTypes.OKAY; 823 if ("created".equals(codeString)) 824 return AssertionResponseTypes.CREATED; 825 if ("noContent".equals(codeString)) 826 return AssertionResponseTypes.NOCONTENT; 827 if ("notModified".equals(codeString)) 828 return AssertionResponseTypes.NOTMODIFIED; 829 if ("bad".equals(codeString)) 830 return AssertionResponseTypes.BAD; 831 if ("forbidden".equals(codeString)) 832 return AssertionResponseTypes.FORBIDDEN; 833 if ("notFound".equals(codeString)) 834 return AssertionResponseTypes.NOTFOUND; 835 if ("methodNotAllowed".equals(codeString)) 836 return AssertionResponseTypes.METHODNOTALLOWED; 837 if ("conflict".equals(codeString)) 838 return AssertionResponseTypes.CONFLICT; 839 if ("gone".equals(codeString)) 840 return AssertionResponseTypes.GONE; 841 if ("preconditionFailed".equals(codeString)) 842 return AssertionResponseTypes.PRECONDITIONFAILED; 843 if ("unprocessable".equals(codeString)) 844 return AssertionResponseTypes.UNPROCESSABLE; 845 throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'"); 846 } 847 public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException { 848 if (code == null) 849 return null; 850 if (code.isEmpty()) 851 return new Enumeration<AssertionResponseTypes>(this); 852 String codeString = ((PrimitiveType) code).asStringValue(); 853 if (codeString == null || "".equals(codeString)) 854 return null; 855 if ("okay".equals(codeString)) 856 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY); 857 if ("created".equals(codeString)) 858 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED); 859 if ("noContent".equals(codeString)) 860 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT); 861 if ("notModified".equals(codeString)) 862 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED); 863 if ("bad".equals(codeString)) 864 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD); 865 if ("forbidden".equals(codeString)) 866 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN); 867 if ("notFound".equals(codeString)) 868 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND); 869 if ("methodNotAllowed".equals(codeString)) 870 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED); 871 if ("conflict".equals(codeString)) 872 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT); 873 if ("gone".equals(codeString)) 874 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE); 875 if ("preconditionFailed".equals(codeString)) 876 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED); 877 if ("unprocessable".equals(codeString)) 878 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE); 879 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 880 } 881 public String toCode(AssertionResponseTypes code) { 882 if (code == AssertionResponseTypes.OKAY) 883 return "okay"; 884 if (code == AssertionResponseTypes.CREATED) 885 return "created"; 886 if (code == AssertionResponseTypes.NOCONTENT) 887 return "noContent"; 888 if (code == AssertionResponseTypes.NOTMODIFIED) 889 return "notModified"; 890 if (code == AssertionResponseTypes.BAD) 891 return "bad"; 892 if (code == AssertionResponseTypes.FORBIDDEN) 893 return "forbidden"; 894 if (code == AssertionResponseTypes.NOTFOUND) 895 return "notFound"; 896 if (code == AssertionResponseTypes.METHODNOTALLOWED) 897 return "methodNotAllowed"; 898 if (code == AssertionResponseTypes.CONFLICT) 899 return "conflict"; 900 if (code == AssertionResponseTypes.GONE) 901 return "gone"; 902 if (code == AssertionResponseTypes.PRECONDITIONFAILED) 903 return "preconditionFailed"; 904 if (code == AssertionResponseTypes.UNPROCESSABLE) 905 return "unprocessable"; 906 return "?"; 907 } 908 public String toSystem(AssertionResponseTypes code) { 909 return code.getSystem(); 910 } 911 } 912 913 @Block() 914 public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement { 915 /** 916 * Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 917 */ 918 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 919 @Description(shortDefinition="The index of the abstract origin server starting at 1", formalDefinition="Abstract name given to an origin server in this test script. The name is provided as a number starting at 1." ) 920 protected IntegerType index; 921 922 /** 923 * The type of origin profile the test system supports. 924 */ 925 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 926 @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." ) 927 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types") 928 protected Coding profile; 929 930 private static final long serialVersionUID = -1239935149L; 931 932 /** 933 * Constructor 934 */ 935 public TestScriptOriginComponent() { 936 super(); 937 } 938 939 /** 940 * Constructor 941 */ 942 public TestScriptOriginComponent(IntegerType index, Coding profile) { 943 super(); 944 this.index = index; 945 this.profile = profile; 946 } 947 948 /** 949 * @return {@link #index} (Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value 950 */ 951 public IntegerType getIndexElement() { 952 if (this.index == null) 953 if (Configuration.errorOnAutoCreate()) 954 throw new Error("Attempt to auto-create TestScriptOriginComponent.index"); 955 else if (Configuration.doAutoCreate()) 956 this.index = new IntegerType(); // bb 957 return this.index; 958 } 959 960 public boolean hasIndexElement() { 961 return this.index != null && !this.index.isEmpty(); 962 } 963 964 public boolean hasIndex() { 965 return this.index != null && !this.index.isEmpty(); 966 } 967 968 /** 969 * @param value {@link #index} (Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value 970 */ 971 public TestScriptOriginComponent setIndexElement(IntegerType value) { 972 this.index = value; 973 return this; 974 } 975 976 /** 977 * @return Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 978 */ 979 public int getIndex() { 980 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 981 } 982 983 /** 984 * @param value Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 985 */ 986 public TestScriptOriginComponent setIndex(int value) { 987 if (this.index == null) 988 this.index = new IntegerType(); 989 this.index.setValue(value); 990 return this; 991 } 992 993 /** 994 * @return {@link #profile} (The type of origin profile the test system supports.) 995 */ 996 public Coding getProfile() { 997 if (this.profile == null) 998 if (Configuration.errorOnAutoCreate()) 999 throw new Error("Attempt to auto-create TestScriptOriginComponent.profile"); 1000 else if (Configuration.doAutoCreate()) 1001 this.profile = new Coding(); // cc 1002 return this.profile; 1003 } 1004 1005 public boolean hasProfile() { 1006 return this.profile != null && !this.profile.isEmpty(); 1007 } 1008 1009 /** 1010 * @param value {@link #profile} (The type of origin profile the test system supports.) 1011 */ 1012 public TestScriptOriginComponent setProfile(Coding value) { 1013 this.profile = value; 1014 return this; 1015 } 1016 1017 protected void listChildren(List<Property> childrenList) { 1018 super.listChildren(childrenList); 1019 childrenList.add(new Property("index", "integer", "Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); 1020 childrenList.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, java.lang.Integer.MAX_VALUE, profile)); 1021 } 1022 1023 @Override 1024 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1025 switch (hash) { 1026 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1027 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1028 default: return super.getProperty(hash, name, checkValid); 1029 } 1030 1031 } 1032 1033 @Override 1034 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1035 switch (hash) { 1036 case 100346066: // index 1037 this.index = castToInteger(value); // IntegerType 1038 return value; 1039 case -309425751: // profile 1040 this.profile = castToCoding(value); // Coding 1041 return value; 1042 default: return super.setProperty(hash, name, value); 1043 } 1044 1045 } 1046 1047 @Override 1048 public Base setProperty(String name, Base value) throws FHIRException { 1049 if (name.equals("index")) { 1050 this.index = castToInteger(value); // IntegerType 1051 } else if (name.equals("profile")) { 1052 this.profile = castToCoding(value); // Coding 1053 } else 1054 return super.setProperty(name, value); 1055 return value; 1056 } 1057 1058 @Override 1059 public Base makeProperty(int hash, String name) throws FHIRException { 1060 switch (hash) { 1061 case 100346066: return getIndexElement(); 1062 case -309425751: return getProfile(); 1063 default: return super.makeProperty(hash, name); 1064 } 1065 1066 } 1067 1068 @Override 1069 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1070 switch (hash) { 1071 case 100346066: /*index*/ return new String[] {"integer"}; 1072 case -309425751: /*profile*/ return new String[] {"Coding"}; 1073 default: return super.getTypesForProperty(hash, name); 1074 } 1075 1076 } 1077 1078 @Override 1079 public Base addChild(String name) throws FHIRException { 1080 if (name.equals("index")) { 1081 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1082 } 1083 else if (name.equals("profile")) { 1084 this.profile = new Coding(); 1085 return this.profile; 1086 } 1087 else 1088 return super.addChild(name); 1089 } 1090 1091 public TestScriptOriginComponent copy() { 1092 TestScriptOriginComponent dst = new TestScriptOriginComponent(); 1093 copyValues(dst); 1094 dst.index = index == null ? null : index.copy(); 1095 dst.profile = profile == null ? null : profile.copy(); 1096 return dst; 1097 } 1098 1099 @Override 1100 public boolean equalsDeep(Base other) { 1101 if (!super.equalsDeep(other)) 1102 return false; 1103 if (!(other instanceof TestScriptOriginComponent)) 1104 return false; 1105 TestScriptOriginComponent o = (TestScriptOriginComponent) other; 1106 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1107 } 1108 1109 @Override 1110 public boolean equalsShallow(Base other) { 1111 if (!super.equalsShallow(other)) 1112 return false; 1113 if (!(other instanceof TestScriptOriginComponent)) 1114 return false; 1115 TestScriptOriginComponent o = (TestScriptOriginComponent) other; 1116 return compareValues(index, o.index, true); 1117 } 1118 1119 public boolean isEmpty() { 1120 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile); 1121 } 1122 1123 public String fhirType() { 1124 return "TestScript.origin"; 1125 1126 } 1127 1128 } 1129 1130 @Block() 1131 public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement { 1132 /** 1133 * Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1134 */ 1135 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1136 @Description(shortDefinition="The index of the abstract destination server starting at 1", formalDefinition="Abstract name given to a destination server in this test script. The name is provided as a number starting at 1." ) 1137 protected IntegerType index; 1138 1139 /** 1140 * The type of destination profile the test system supports. 1141 */ 1142 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 1143 @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." ) 1144 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types") 1145 protected Coding profile; 1146 1147 private static final long serialVersionUID = -1239935149L; 1148 1149 /** 1150 * Constructor 1151 */ 1152 public TestScriptDestinationComponent() { 1153 super(); 1154 } 1155 1156 /** 1157 * Constructor 1158 */ 1159 public TestScriptDestinationComponent(IntegerType index, Coding profile) { 1160 super(); 1161 this.index = index; 1162 this.profile = profile; 1163 } 1164 1165 /** 1166 * @return {@link #index} (Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value 1167 */ 1168 public IntegerType getIndexElement() { 1169 if (this.index == null) 1170 if (Configuration.errorOnAutoCreate()) 1171 throw new Error("Attempt to auto-create TestScriptDestinationComponent.index"); 1172 else if (Configuration.doAutoCreate()) 1173 this.index = new IntegerType(); // bb 1174 return this.index; 1175 } 1176 1177 public boolean hasIndexElement() { 1178 return this.index != null && !this.index.isEmpty(); 1179 } 1180 1181 public boolean hasIndex() { 1182 return this.index != null && !this.index.isEmpty(); 1183 } 1184 1185 /** 1186 * @param value {@link #index} (Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.). This is the underlying object with id, value and extensions. The accessor "getIndex" gives direct access to the value 1187 */ 1188 public TestScriptDestinationComponent setIndexElement(IntegerType value) { 1189 this.index = value; 1190 return this; 1191 } 1192 1193 /** 1194 * @return Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1195 */ 1196 public int getIndex() { 1197 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 1198 } 1199 1200 /** 1201 * @param value Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1202 */ 1203 public TestScriptDestinationComponent setIndex(int value) { 1204 if (this.index == null) 1205 this.index = new IntegerType(); 1206 this.index.setValue(value); 1207 return this; 1208 } 1209 1210 /** 1211 * @return {@link #profile} (The type of destination profile the test system supports.) 1212 */ 1213 public Coding getProfile() { 1214 if (this.profile == null) 1215 if (Configuration.errorOnAutoCreate()) 1216 throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile"); 1217 else if (Configuration.doAutoCreate()) 1218 this.profile = new Coding(); // cc 1219 return this.profile; 1220 } 1221 1222 public boolean hasProfile() { 1223 return this.profile != null && !this.profile.isEmpty(); 1224 } 1225 1226 /** 1227 * @param value {@link #profile} (The type of destination profile the test system supports.) 1228 */ 1229 public TestScriptDestinationComponent setProfile(Coding value) { 1230 this.profile = value; 1231 return this; 1232 } 1233 1234 protected void listChildren(List<Property> childrenList) { 1235 super.listChildren(childrenList); 1236 childrenList.add(new Property("index", "integer", "Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); 1237 childrenList.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, java.lang.Integer.MAX_VALUE, profile)); 1238 } 1239 1240 @Override 1241 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1242 switch (hash) { 1243 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1244 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1245 default: return super.getProperty(hash, name, checkValid); 1246 } 1247 1248 } 1249 1250 @Override 1251 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1252 switch (hash) { 1253 case 100346066: // index 1254 this.index = castToInteger(value); // IntegerType 1255 return value; 1256 case -309425751: // profile 1257 this.profile = castToCoding(value); // Coding 1258 return value; 1259 default: return super.setProperty(hash, name, value); 1260 } 1261 1262 } 1263 1264 @Override 1265 public Base setProperty(String name, Base value) throws FHIRException { 1266 if (name.equals("index")) { 1267 this.index = castToInteger(value); // IntegerType 1268 } else if (name.equals("profile")) { 1269 this.profile = castToCoding(value); // Coding 1270 } else 1271 return super.setProperty(name, value); 1272 return value; 1273 } 1274 1275 @Override 1276 public Base makeProperty(int hash, String name) throws FHIRException { 1277 switch (hash) { 1278 case 100346066: return getIndexElement(); 1279 case -309425751: return getProfile(); 1280 default: return super.makeProperty(hash, name); 1281 } 1282 1283 } 1284 1285 @Override 1286 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1287 switch (hash) { 1288 case 100346066: /*index*/ return new String[] {"integer"}; 1289 case -309425751: /*profile*/ return new String[] {"Coding"}; 1290 default: return super.getTypesForProperty(hash, name); 1291 } 1292 1293 } 1294 1295 @Override 1296 public Base addChild(String name) throws FHIRException { 1297 if (name.equals("index")) { 1298 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1299 } 1300 else if (name.equals("profile")) { 1301 this.profile = new Coding(); 1302 return this.profile; 1303 } 1304 else 1305 return super.addChild(name); 1306 } 1307 1308 public TestScriptDestinationComponent copy() { 1309 TestScriptDestinationComponent dst = new TestScriptDestinationComponent(); 1310 copyValues(dst); 1311 dst.index = index == null ? null : index.copy(); 1312 dst.profile = profile == null ? null : profile.copy(); 1313 return dst; 1314 } 1315 1316 @Override 1317 public boolean equalsDeep(Base other) { 1318 if (!super.equalsDeep(other)) 1319 return false; 1320 if (!(other instanceof TestScriptDestinationComponent)) 1321 return false; 1322 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; 1323 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1324 } 1325 1326 @Override 1327 public boolean equalsShallow(Base other) { 1328 if (!super.equalsShallow(other)) 1329 return false; 1330 if (!(other instanceof TestScriptDestinationComponent)) 1331 return false; 1332 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; 1333 return compareValues(index, o.index, true); 1334 } 1335 1336 public boolean isEmpty() { 1337 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile); 1338 } 1339 1340 public String fhirType() { 1341 return "TestScript.destination"; 1342 1343 } 1344 1345 } 1346 1347 @Block() 1348 public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement { 1349 /** 1350 * A link to the FHIR specification that this test is covering. 1351 */ 1352 @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1353 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." ) 1354 protected List<TestScriptMetadataLinkComponent> link; 1355 1356 /** 1357 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 1358 */ 1359 @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1360 @Description(shortDefinition="Capabilities that are assumed to function correctly on the FHIR server being tested", formalDefinition="Capabilities that must exist and are assumed to function correctly on the FHIR server being tested." ) 1361 protected List<TestScriptMetadataCapabilityComponent> capability; 1362 1363 private static final long serialVersionUID = 745183328L; 1364 1365 /** 1366 * Constructor 1367 */ 1368 public TestScriptMetadataComponent() { 1369 super(); 1370 } 1371 1372 /** 1373 * @return {@link #link} (A link to the FHIR specification that this test is covering.) 1374 */ 1375 public List<TestScriptMetadataLinkComponent> getLink() { 1376 if (this.link == null) 1377 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1378 return this.link; 1379 } 1380 1381 /** 1382 * @return Returns a reference to <code>this</code> for easy method chaining 1383 */ 1384 public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 1385 this.link = theLink; 1386 return this; 1387 } 1388 1389 public boolean hasLink() { 1390 if (this.link == null) 1391 return false; 1392 for (TestScriptMetadataLinkComponent item : this.link) 1393 if (!item.isEmpty()) 1394 return true; 1395 return false; 1396 } 1397 1398 public TestScriptMetadataLinkComponent addLink() { //3 1399 TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent(); 1400 if (this.link == null) 1401 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1402 this.link.add(t); 1403 return t; 1404 } 1405 1406 public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3 1407 if (t == null) 1408 return this; 1409 if (this.link == null) 1410 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1411 this.link.add(t); 1412 return this; 1413 } 1414 1415 /** 1416 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist 1417 */ 1418 public TestScriptMetadataLinkComponent getLinkFirstRep() { 1419 if (getLink().isEmpty()) { 1420 addLink(); 1421 } 1422 return getLink().get(0); 1423 } 1424 1425 /** 1426 * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 1427 */ 1428 public List<TestScriptMetadataCapabilityComponent> getCapability() { 1429 if (this.capability == null) 1430 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1431 return this.capability; 1432 } 1433 1434 /** 1435 * @return Returns a reference to <code>this</code> for easy method chaining 1436 */ 1437 public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 1438 this.capability = theCapability; 1439 return this; 1440 } 1441 1442 public boolean hasCapability() { 1443 if (this.capability == null) 1444 return false; 1445 for (TestScriptMetadataCapabilityComponent item : this.capability) 1446 if (!item.isEmpty()) 1447 return true; 1448 return false; 1449 } 1450 1451 public TestScriptMetadataCapabilityComponent addCapability() { //3 1452 TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent(); 1453 if (this.capability == null) 1454 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1455 this.capability.add(t); 1456 return t; 1457 } 1458 1459 public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3 1460 if (t == null) 1461 return this; 1462 if (this.capability == null) 1463 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1464 this.capability.add(t); 1465 return this; 1466 } 1467 1468 /** 1469 * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist 1470 */ 1471 public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 1472 if (getCapability().isEmpty()) { 1473 addCapability(); 1474 } 1475 return getCapability().get(0); 1476 } 1477 1478 protected void listChildren(List<Property> childrenList) { 1479 super.listChildren(childrenList); 1480 childrenList.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link)); 1481 childrenList.add(new Property("capability", "", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, capability)); 1482 } 1483 1484 @Override 1485 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1486 switch (hash) { 1487 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent 1488 case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent 1489 default: return super.getProperty(hash, name, checkValid); 1490 } 1491 1492 } 1493 1494 @Override 1495 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1496 switch (hash) { 1497 case 3321850: // link 1498 this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent 1499 return value; 1500 case -783669992: // capability 1501 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent 1502 return value; 1503 default: return super.setProperty(hash, name, value); 1504 } 1505 1506 } 1507 1508 @Override 1509 public Base setProperty(String name, Base value) throws FHIRException { 1510 if (name.equals("link")) { 1511 this.getLink().add((TestScriptMetadataLinkComponent) value); 1512 } else if (name.equals("capability")) { 1513 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); 1514 } else 1515 return super.setProperty(name, value); 1516 return value; 1517 } 1518 1519 @Override 1520 public Base makeProperty(int hash, String name) throws FHIRException { 1521 switch (hash) { 1522 case 3321850: return addLink(); 1523 case -783669992: return addCapability(); 1524 default: return super.makeProperty(hash, name); 1525 } 1526 1527 } 1528 1529 @Override 1530 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1531 switch (hash) { 1532 case 3321850: /*link*/ return new String[] {}; 1533 case -783669992: /*capability*/ return new String[] {}; 1534 default: return super.getTypesForProperty(hash, name); 1535 } 1536 1537 } 1538 1539 @Override 1540 public Base addChild(String name) throws FHIRException { 1541 if (name.equals("link")) { 1542 return addLink(); 1543 } 1544 else if (name.equals("capability")) { 1545 return addCapability(); 1546 } 1547 else 1548 return super.addChild(name); 1549 } 1550 1551 public TestScriptMetadataComponent copy() { 1552 TestScriptMetadataComponent dst = new TestScriptMetadataComponent(); 1553 copyValues(dst); 1554 if (link != null) { 1555 dst.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1556 for (TestScriptMetadataLinkComponent i : link) 1557 dst.link.add(i.copy()); 1558 }; 1559 if (capability != null) { 1560 dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1561 for (TestScriptMetadataCapabilityComponent i : capability) 1562 dst.capability.add(i.copy()); 1563 }; 1564 return dst; 1565 } 1566 1567 @Override 1568 public boolean equalsDeep(Base other) { 1569 if (!super.equalsDeep(other)) 1570 return false; 1571 if (!(other instanceof TestScriptMetadataComponent)) 1572 return false; 1573 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other; 1574 return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true); 1575 } 1576 1577 @Override 1578 public boolean equalsShallow(Base other) { 1579 if (!super.equalsShallow(other)) 1580 return false; 1581 if (!(other instanceof TestScriptMetadataComponent)) 1582 return false; 1583 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other; 1584 return true; 1585 } 1586 1587 public boolean isEmpty() { 1588 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability); 1589 } 1590 1591 public String fhirType() { 1592 return "TestScript.metadata"; 1593 1594 } 1595 1596 } 1597 1598 @Block() 1599 public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement { 1600 /** 1601 * URL to a particular requirement or feature within the FHIR specification. 1602 */ 1603 @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1604 @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." ) 1605 protected UriType url; 1606 1607 /** 1608 * Short description of the link. 1609 */ 1610 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1611 @Description(shortDefinition="Short description", formalDefinition="Short description of the link." ) 1612 protected StringType description; 1613 1614 private static final long serialVersionUID = 213372298L; 1615 1616 /** 1617 * Constructor 1618 */ 1619 public TestScriptMetadataLinkComponent() { 1620 super(); 1621 } 1622 1623 /** 1624 * Constructor 1625 */ 1626 public TestScriptMetadataLinkComponent(UriType url) { 1627 super(); 1628 this.url = url; 1629 } 1630 1631 /** 1632 * @return {@link #url} (URL to a particular requirement or feature within the FHIR specification.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1633 */ 1634 public UriType getUrlElement() { 1635 if (this.url == null) 1636 if (Configuration.errorOnAutoCreate()) 1637 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url"); 1638 else if (Configuration.doAutoCreate()) 1639 this.url = new UriType(); // bb 1640 return this.url; 1641 } 1642 1643 public boolean hasUrlElement() { 1644 return this.url != null && !this.url.isEmpty(); 1645 } 1646 1647 public boolean hasUrl() { 1648 return this.url != null && !this.url.isEmpty(); 1649 } 1650 1651 /** 1652 * @param value {@link #url} (URL to a particular requirement or feature within the FHIR specification.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1653 */ 1654 public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 1655 this.url = value; 1656 return this; 1657 } 1658 1659 /** 1660 * @return URL to a particular requirement or feature within the FHIR specification. 1661 */ 1662 public String getUrl() { 1663 return this.url == null ? null : this.url.getValue(); 1664 } 1665 1666 /** 1667 * @param value URL to a particular requirement or feature within the FHIR specification. 1668 */ 1669 public TestScriptMetadataLinkComponent setUrl(String value) { 1670 if (this.url == null) 1671 this.url = new UriType(); 1672 this.url.setValue(value); 1673 return this; 1674 } 1675 1676 /** 1677 * @return {@link #description} (Short description of the link.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1678 */ 1679 public StringType getDescriptionElement() { 1680 if (this.description == null) 1681 if (Configuration.errorOnAutoCreate()) 1682 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description"); 1683 else if (Configuration.doAutoCreate()) 1684 this.description = new StringType(); // bb 1685 return this.description; 1686 } 1687 1688 public boolean hasDescriptionElement() { 1689 return this.description != null && !this.description.isEmpty(); 1690 } 1691 1692 public boolean hasDescription() { 1693 return this.description != null && !this.description.isEmpty(); 1694 } 1695 1696 /** 1697 * @param value {@link #description} (Short description of the link.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1698 */ 1699 public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 1700 this.description = value; 1701 return this; 1702 } 1703 1704 /** 1705 * @return Short description of the link. 1706 */ 1707 public String getDescription() { 1708 return this.description == null ? null : this.description.getValue(); 1709 } 1710 1711 /** 1712 * @param value Short description of the link. 1713 */ 1714 public TestScriptMetadataLinkComponent setDescription(String value) { 1715 if (Utilities.noString(value)) 1716 this.description = null; 1717 else { 1718 if (this.description == null) 1719 this.description = new StringType(); 1720 this.description.setValue(value); 1721 } 1722 return this; 1723 } 1724 1725 protected void listChildren(List<Property> childrenList) { 1726 super.listChildren(childrenList); 1727 childrenList.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, java.lang.Integer.MAX_VALUE, url)); 1728 childrenList.add(new Property("description", "string", "Short description of the link.", 0, java.lang.Integer.MAX_VALUE, description)); 1729 } 1730 1731 @Override 1732 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1733 switch (hash) { 1734 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1735 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1736 default: return super.getProperty(hash, name, checkValid); 1737 } 1738 1739 } 1740 1741 @Override 1742 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1743 switch (hash) { 1744 case 116079: // url 1745 this.url = castToUri(value); // UriType 1746 return value; 1747 case -1724546052: // description 1748 this.description = castToString(value); // StringType 1749 return value; 1750 default: return super.setProperty(hash, name, value); 1751 } 1752 1753 } 1754 1755 @Override 1756 public Base setProperty(String name, Base value) throws FHIRException { 1757 if (name.equals("url")) { 1758 this.url = castToUri(value); // UriType 1759 } else if (name.equals("description")) { 1760 this.description = castToString(value); // StringType 1761 } else 1762 return super.setProperty(name, value); 1763 return value; 1764 } 1765 1766 @Override 1767 public Base makeProperty(int hash, String name) throws FHIRException { 1768 switch (hash) { 1769 case 116079: return getUrlElement(); 1770 case -1724546052: return getDescriptionElement(); 1771 default: return super.makeProperty(hash, name); 1772 } 1773 1774 } 1775 1776 @Override 1777 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1778 switch (hash) { 1779 case 116079: /*url*/ return new String[] {"uri"}; 1780 case -1724546052: /*description*/ return new String[] {"string"}; 1781 default: return super.getTypesForProperty(hash, name); 1782 } 1783 1784 } 1785 1786 @Override 1787 public Base addChild(String name) throws FHIRException { 1788 if (name.equals("url")) { 1789 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 1790 } 1791 else if (name.equals("description")) { 1792 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 1793 } 1794 else 1795 return super.addChild(name); 1796 } 1797 1798 public TestScriptMetadataLinkComponent copy() { 1799 TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent(); 1800 copyValues(dst); 1801 dst.url = url == null ? null : url.copy(); 1802 dst.description = description == null ? null : description.copy(); 1803 return dst; 1804 } 1805 1806 @Override 1807 public boolean equalsDeep(Base other) { 1808 if (!super.equalsDeep(other)) 1809 return false; 1810 if (!(other instanceof TestScriptMetadataLinkComponent)) 1811 return false; 1812 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other; 1813 return compareDeep(url, o.url, true) && compareDeep(description, o.description, true); 1814 } 1815 1816 @Override 1817 public boolean equalsShallow(Base other) { 1818 if (!super.equalsShallow(other)) 1819 return false; 1820 if (!(other instanceof TestScriptMetadataLinkComponent)) 1821 return false; 1822 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other; 1823 return compareValues(url, o.url, true) && compareValues(description, o.description, true); 1824 } 1825 1826 public boolean isEmpty() { 1827 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description); 1828 } 1829 1830 public String fhirType() { 1831 return "TestScript.metadata.link"; 1832 1833 } 1834 1835 } 1836 1837 @Block() 1838 public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement { 1839 /** 1840 * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1841 */ 1842 @Child(name = "required", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1843 @Description(shortDefinition="Are the capabilities required?", formalDefinition="Whether or not the test execution will require the given capabilities of the server in order for this test script to execute." ) 1844 protected BooleanType required; 1845 1846 /** 1847 * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1848 */ 1849 @Child(name = "validated", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1850 @Description(shortDefinition="Are the capabilities validated?", formalDefinition="Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute." ) 1851 protected BooleanType validated; 1852 1853 /** 1854 * Description of the capabilities that this test script is requiring the server to support. 1855 */ 1856 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1857 @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." ) 1858 protected StringType description; 1859 1860 /** 1861 * Which origin server these requirements apply to. 1862 */ 1863 @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1864 @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." ) 1865 protected List<IntegerType> origin; 1866 1867 /** 1868 * Which server these requirements apply to. 1869 */ 1870 @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1871 @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." ) 1872 protected IntegerType destination; 1873 1874 /** 1875 * Links to the FHIR specification that describes this interaction and the resources involved in more detail. 1876 */ 1877 @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1878 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." ) 1879 protected List<UriType> link; 1880 1881 /** 1882 * Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped. 1883 */ 1884 @Child(name = "capabilities", type = {CapabilityStatement.class}, order=7, min=1, max=1, modifier=false, summary=false) 1885 @Description(shortDefinition="Required Capability Statement", formalDefinition="Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped." ) 1886 protected Reference capabilities; 1887 1888 /** 1889 * The actual object that is the target of the reference (Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.) 1890 */ 1891 protected CapabilityStatement capabilitiesTarget; 1892 1893 private static final long serialVersionUID = -106110735L; 1894 1895 /** 1896 * Constructor 1897 */ 1898 public TestScriptMetadataCapabilityComponent() { 1899 super(); 1900 } 1901 1902 /** 1903 * Constructor 1904 */ 1905 public TestScriptMetadataCapabilityComponent(Reference capabilities) { 1906 super(); 1907 this.capabilities = capabilities; 1908 } 1909 1910 /** 1911 * @return {@link #required} (Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value 1912 */ 1913 public BooleanType getRequiredElement() { 1914 if (this.required == null) 1915 if (Configuration.errorOnAutoCreate()) 1916 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required"); 1917 else if (Configuration.doAutoCreate()) 1918 this.required = new BooleanType(); // bb 1919 return this.required; 1920 } 1921 1922 public boolean hasRequiredElement() { 1923 return this.required != null && !this.required.isEmpty(); 1924 } 1925 1926 public boolean hasRequired() { 1927 return this.required != null && !this.required.isEmpty(); 1928 } 1929 1930 /** 1931 * @param value {@link #required} (Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getRequired" gives direct access to the value 1932 */ 1933 public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 1934 this.required = value; 1935 return this; 1936 } 1937 1938 /** 1939 * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1940 */ 1941 public boolean getRequired() { 1942 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 1943 } 1944 1945 /** 1946 * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1947 */ 1948 public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 1949 if (this.required == null) 1950 this.required = new BooleanType(); 1951 this.required.setValue(value); 1952 return this; 1953 } 1954 1955 /** 1956 * @return {@link #validated} (Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getValidated" gives direct access to the value 1957 */ 1958 public BooleanType getValidatedElement() { 1959 if (this.validated == null) 1960 if (Configuration.errorOnAutoCreate()) 1961 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated"); 1962 else if (Configuration.doAutoCreate()) 1963 this.validated = new BooleanType(); // bb 1964 return this.validated; 1965 } 1966 1967 public boolean hasValidatedElement() { 1968 return this.validated != null && !this.validated.isEmpty(); 1969 } 1970 1971 public boolean hasValidated() { 1972 return this.validated != null && !this.validated.isEmpty(); 1973 } 1974 1975 /** 1976 * @param value {@link #validated} (Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.). This is the underlying object with id, value and extensions. The accessor "getValidated" gives direct access to the value 1977 */ 1978 public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 1979 this.validated = value; 1980 return this; 1981 } 1982 1983 /** 1984 * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1985 */ 1986 public boolean getValidated() { 1987 return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue(); 1988 } 1989 1990 /** 1991 * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1992 */ 1993 public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 1994 if (this.validated == null) 1995 this.validated = new BooleanType(); 1996 this.validated.setValue(value); 1997 return this; 1998 } 1999 2000 /** 2001 * @return {@link #description} (Description of the capabilities that this test script is requiring the server to support.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2002 */ 2003 public StringType getDescriptionElement() { 2004 if (this.description == null) 2005 if (Configuration.errorOnAutoCreate()) 2006 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description"); 2007 else if (Configuration.doAutoCreate()) 2008 this.description = new StringType(); // bb 2009 return this.description; 2010 } 2011 2012 public boolean hasDescriptionElement() { 2013 return this.description != null && !this.description.isEmpty(); 2014 } 2015 2016 public boolean hasDescription() { 2017 return this.description != null && !this.description.isEmpty(); 2018 } 2019 2020 /** 2021 * @param value {@link #description} (Description of the capabilities that this test script is requiring the server to support.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2022 */ 2023 public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 2024 this.description = value; 2025 return this; 2026 } 2027 2028 /** 2029 * @return Description of the capabilities that this test script is requiring the server to support. 2030 */ 2031 public String getDescription() { 2032 return this.description == null ? null : this.description.getValue(); 2033 } 2034 2035 /** 2036 * @param value Description of the capabilities that this test script is requiring the server to support. 2037 */ 2038 public TestScriptMetadataCapabilityComponent setDescription(String value) { 2039 if (Utilities.noString(value)) 2040 this.description = null; 2041 else { 2042 if (this.description == null) 2043 this.description = new StringType(); 2044 this.description.setValue(value); 2045 } 2046 return this; 2047 } 2048 2049 /** 2050 * @return {@link #origin} (Which origin server these requirements apply to.) 2051 */ 2052 public List<IntegerType> getOrigin() { 2053 if (this.origin == null) 2054 this.origin = new ArrayList<IntegerType>(); 2055 return this.origin; 2056 } 2057 2058 /** 2059 * @return Returns a reference to <code>this</code> for easy method chaining 2060 */ 2061 public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 2062 this.origin = theOrigin; 2063 return this; 2064 } 2065 2066 public boolean hasOrigin() { 2067 if (this.origin == null) 2068 return false; 2069 for (IntegerType item : this.origin) 2070 if (!item.isEmpty()) 2071 return true; 2072 return false; 2073 } 2074 2075 /** 2076 * @return {@link #origin} (Which origin server these requirements apply to.) 2077 */ 2078 public IntegerType addOriginElement() {//2 2079 IntegerType t = new IntegerType(); 2080 if (this.origin == null) 2081 this.origin = new ArrayList<IntegerType>(); 2082 this.origin.add(t); 2083 return t; 2084 } 2085 2086 /** 2087 * @param value {@link #origin} (Which origin server these requirements apply to.) 2088 */ 2089 public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1 2090 IntegerType t = new IntegerType(); 2091 t.setValue(value); 2092 if (this.origin == null) 2093 this.origin = new ArrayList<IntegerType>(); 2094 this.origin.add(t); 2095 return this; 2096 } 2097 2098 /** 2099 * @param value {@link #origin} (Which origin server these requirements apply to.) 2100 */ 2101 public boolean hasOrigin(int value) { 2102 if (this.origin == null) 2103 return false; 2104 for (IntegerType v : this.origin) 2105 if (v.equals(value)) // integer 2106 return true; 2107 return false; 2108 } 2109 2110 /** 2111 * @return {@link #destination} (Which server these requirements apply to.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value 2112 */ 2113 public IntegerType getDestinationElement() { 2114 if (this.destination == null) 2115 if (Configuration.errorOnAutoCreate()) 2116 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination"); 2117 else if (Configuration.doAutoCreate()) 2118 this.destination = new IntegerType(); // bb 2119 return this.destination; 2120 } 2121 2122 public boolean hasDestinationElement() { 2123 return this.destination != null && !this.destination.isEmpty(); 2124 } 2125 2126 public boolean hasDestination() { 2127 return this.destination != null && !this.destination.isEmpty(); 2128 } 2129 2130 /** 2131 * @param value {@link #destination} (Which server these requirements apply to.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value 2132 */ 2133 public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 2134 this.destination = value; 2135 return this; 2136 } 2137 2138 /** 2139 * @return Which server these requirements apply to. 2140 */ 2141 public int getDestination() { 2142 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 2143 } 2144 2145 /** 2146 * @param value Which server these requirements apply to. 2147 */ 2148 public TestScriptMetadataCapabilityComponent setDestination(int value) { 2149 if (this.destination == null) 2150 this.destination = new IntegerType(); 2151 this.destination.setValue(value); 2152 return this; 2153 } 2154 2155 /** 2156 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2157 */ 2158 public List<UriType> getLink() { 2159 if (this.link == null) 2160 this.link = new ArrayList<UriType>(); 2161 return this.link; 2162 } 2163 2164 /** 2165 * @return Returns a reference to <code>this</code> for easy method chaining 2166 */ 2167 public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 2168 this.link = theLink; 2169 return this; 2170 } 2171 2172 public boolean hasLink() { 2173 if (this.link == null) 2174 return false; 2175 for (UriType item : this.link) 2176 if (!item.isEmpty()) 2177 return true; 2178 return false; 2179 } 2180 2181 /** 2182 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2183 */ 2184 public UriType addLinkElement() {//2 2185 UriType t = new UriType(); 2186 if (this.link == null) 2187 this.link = new ArrayList<UriType>(); 2188 this.link.add(t); 2189 return t; 2190 } 2191 2192 /** 2193 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2194 */ 2195 public TestScriptMetadataCapabilityComponent addLink(String value) { //1 2196 UriType t = new UriType(); 2197 t.setValue(value); 2198 if (this.link == null) 2199 this.link = new ArrayList<UriType>(); 2200 this.link.add(t); 2201 return this; 2202 } 2203 2204 /** 2205 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2206 */ 2207 public boolean hasLink(String value) { 2208 if (this.link == null) 2209 return false; 2210 for (UriType v : this.link) 2211 if (v.equals(value)) // uri 2212 return true; 2213 return false; 2214 } 2215 2216 /** 2217 * @return {@link #capabilities} (Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.) 2218 */ 2219 public Reference getCapabilities() { 2220 if (this.capabilities == null) 2221 if (Configuration.errorOnAutoCreate()) 2222 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities"); 2223 else if (Configuration.doAutoCreate()) 2224 this.capabilities = new Reference(); // cc 2225 return this.capabilities; 2226 } 2227 2228 public boolean hasCapabilities() { 2229 return this.capabilities != null && !this.capabilities.isEmpty(); 2230 } 2231 2232 /** 2233 * @param value {@link #capabilities} (Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.) 2234 */ 2235 public TestScriptMetadataCapabilityComponent setCapabilities(Reference value) { 2236 this.capabilities = value; 2237 return this; 2238 } 2239 2240 /** 2241 * @return {@link #capabilities} 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. (Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.) 2242 */ 2243 public CapabilityStatement getCapabilitiesTarget() { 2244 if (this.capabilitiesTarget == null) 2245 if (Configuration.errorOnAutoCreate()) 2246 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities"); 2247 else if (Configuration.doAutoCreate()) 2248 this.capabilitiesTarget = new CapabilityStatement(); // aa 2249 return this.capabilitiesTarget; 2250 } 2251 2252 /** 2253 * @param value {@link #capabilities} 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. (Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.) 2254 */ 2255 public TestScriptMetadataCapabilityComponent setCapabilitiesTarget(CapabilityStatement value) { 2256 this.capabilitiesTarget = value; 2257 return this; 2258 } 2259 2260 protected void listChildren(List<Property> childrenList) { 2261 super.listChildren(childrenList); 2262 childrenList.add(new Property("required", "boolean", "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", 0, java.lang.Integer.MAX_VALUE, required)); 2263 childrenList.add(new Property("validated", "boolean", "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", 0, java.lang.Integer.MAX_VALUE, validated)); 2264 childrenList.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, java.lang.Integer.MAX_VALUE, description)); 2265 childrenList.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin)); 2266 childrenList.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, destination)); 2267 childrenList.add(new Property("link", "uri", "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", 0, java.lang.Integer.MAX_VALUE, link)); 2268 childrenList.add(new Property("capabilities", "Reference(CapabilityStatement)", "Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.", 0, java.lang.Integer.MAX_VALUE, capabilities)); 2269 } 2270 2271 @Override 2272 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2273 switch (hash) { 2274 case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType 2275 case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType 2276 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2277 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType 2278 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 2279 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType 2280 case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // Reference 2281 default: return super.getProperty(hash, name, checkValid); 2282 } 2283 2284 } 2285 2286 @Override 2287 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2288 switch (hash) { 2289 case -393139297: // required 2290 this.required = castToBoolean(value); // BooleanType 2291 return value; 2292 case -1109784050: // validated 2293 this.validated = castToBoolean(value); // BooleanType 2294 return value; 2295 case -1724546052: // description 2296 this.description = castToString(value); // StringType 2297 return value; 2298 case -1008619738: // origin 2299 this.getOrigin().add(castToInteger(value)); // IntegerType 2300 return value; 2301 case -1429847026: // destination 2302 this.destination = castToInteger(value); // IntegerType 2303 return value; 2304 case 3321850: // link 2305 this.getLink().add(castToUri(value)); // UriType 2306 return value; 2307 case -1487597642: // capabilities 2308 this.capabilities = castToReference(value); // Reference 2309 return value; 2310 default: return super.setProperty(hash, name, value); 2311 } 2312 2313 } 2314 2315 @Override 2316 public Base setProperty(String name, Base value) throws FHIRException { 2317 if (name.equals("required")) { 2318 this.required = castToBoolean(value); // BooleanType 2319 } else if (name.equals("validated")) { 2320 this.validated = castToBoolean(value); // BooleanType 2321 } else if (name.equals("description")) { 2322 this.description = castToString(value); // StringType 2323 } else if (name.equals("origin")) { 2324 this.getOrigin().add(castToInteger(value)); 2325 } else if (name.equals("destination")) { 2326 this.destination = castToInteger(value); // IntegerType 2327 } else if (name.equals("link")) { 2328 this.getLink().add(castToUri(value)); 2329 } else if (name.equals("capabilities")) { 2330 this.capabilities = castToReference(value); // Reference 2331 } else 2332 return super.setProperty(name, value); 2333 return value; 2334 } 2335 2336 @Override 2337 public Base makeProperty(int hash, String name) throws FHIRException { 2338 switch (hash) { 2339 case -393139297: return getRequiredElement(); 2340 case -1109784050: return getValidatedElement(); 2341 case -1724546052: return getDescriptionElement(); 2342 case -1008619738: return addOriginElement(); 2343 case -1429847026: return getDestinationElement(); 2344 case 3321850: return addLinkElement(); 2345 case -1487597642: return getCapabilities(); 2346 default: return super.makeProperty(hash, name); 2347 } 2348 2349 } 2350 2351 @Override 2352 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2353 switch (hash) { 2354 case -393139297: /*required*/ return new String[] {"boolean"}; 2355 case -1109784050: /*validated*/ return new String[] {"boolean"}; 2356 case -1724546052: /*description*/ return new String[] {"string"}; 2357 case -1008619738: /*origin*/ return new String[] {"integer"}; 2358 case -1429847026: /*destination*/ return new String[] {"integer"}; 2359 case 3321850: /*link*/ return new String[] {"uri"}; 2360 case -1487597642: /*capabilities*/ return new String[] {"Reference"}; 2361 default: return super.getTypesForProperty(hash, name); 2362 } 2363 2364 } 2365 2366 @Override 2367 public Base addChild(String name) throws FHIRException { 2368 if (name.equals("required")) { 2369 throw new FHIRException("Cannot call addChild on a primitive type TestScript.required"); 2370 } 2371 else if (name.equals("validated")) { 2372 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated"); 2373 } 2374 else if (name.equals("description")) { 2375 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 2376 } 2377 else if (name.equals("origin")) { 2378 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 2379 } 2380 else if (name.equals("destination")) { 2381 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 2382 } 2383 else if (name.equals("link")) { 2384 throw new FHIRException("Cannot call addChild on a primitive type TestScript.link"); 2385 } 2386 else if (name.equals("capabilities")) { 2387 this.capabilities = new Reference(); 2388 return this.capabilities; 2389 } 2390 else 2391 return super.addChild(name); 2392 } 2393 2394 public TestScriptMetadataCapabilityComponent copy() { 2395 TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent(); 2396 copyValues(dst); 2397 dst.required = required == null ? null : required.copy(); 2398 dst.validated = validated == null ? null : validated.copy(); 2399 dst.description = description == null ? null : description.copy(); 2400 if (origin != null) { 2401 dst.origin = new ArrayList<IntegerType>(); 2402 for (IntegerType i : origin) 2403 dst.origin.add(i.copy()); 2404 }; 2405 dst.destination = destination == null ? null : destination.copy(); 2406 if (link != null) { 2407 dst.link = new ArrayList<UriType>(); 2408 for (UriType i : link) 2409 dst.link.add(i.copy()); 2410 }; 2411 dst.capabilities = capabilities == null ? null : capabilities.copy(); 2412 return dst; 2413 } 2414 2415 @Override 2416 public boolean equalsDeep(Base other) { 2417 if (!super.equalsDeep(other)) 2418 return false; 2419 if (!(other instanceof TestScriptMetadataCapabilityComponent)) 2420 return false; 2421 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other; 2422 return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true) 2423 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true) 2424 && compareDeep(capabilities, o.capabilities, true); 2425 } 2426 2427 @Override 2428 public boolean equalsShallow(Base other) { 2429 if (!super.equalsShallow(other)) 2430 return false; 2431 if (!(other instanceof TestScriptMetadataCapabilityComponent)) 2432 return false; 2433 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other; 2434 return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true) 2435 && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true) 2436 ; 2437 } 2438 2439 public boolean isEmpty() { 2440 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description 2441 , origin, destination, link, capabilities); 2442 } 2443 2444 public String fhirType() { 2445 return "TestScript.metadata.capability"; 2446 2447 } 2448 2449 } 2450 2451 @Block() 2452 public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement { 2453 /** 2454 * Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section. 2455 */ 2456 @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2457 @Description(shortDefinition="Whether or not to implicitly create the fixture during setup", formalDefinition="Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section." ) 2458 protected BooleanType autocreate; 2459 2460 /** 2461 * Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section. 2462 */ 2463 @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2464 @Description(shortDefinition="Whether or not to implicitly delete the fixture during teardown", formalDefinition="Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section." ) 2465 protected BooleanType autodelete; 2466 2467 /** 2468 * Reference to the resource (containing the contents of the resource needed for operations). 2469 */ 2470 @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false) 2471 @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." ) 2472 protected Reference resource; 2473 2474 /** 2475 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).) 2476 */ 2477 protected Resource resourceTarget; 2478 2479 private static final long serialVersionUID = 1110683307L; 2480 2481 /** 2482 * Constructor 2483 */ 2484 public TestScriptFixtureComponent() { 2485 super(); 2486 } 2487 2488 /** 2489 * @return {@link #autocreate} (Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.). This is the underlying object with id, value and extensions. The accessor "getAutocreate" gives direct access to the value 2490 */ 2491 public BooleanType getAutocreateElement() { 2492 if (this.autocreate == null) 2493 if (Configuration.errorOnAutoCreate()) 2494 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate"); 2495 else if (Configuration.doAutoCreate()) 2496 this.autocreate = new BooleanType(); // bb 2497 return this.autocreate; 2498 } 2499 2500 public boolean hasAutocreateElement() { 2501 return this.autocreate != null && !this.autocreate.isEmpty(); 2502 } 2503 2504 public boolean hasAutocreate() { 2505 return this.autocreate != null && !this.autocreate.isEmpty(); 2506 } 2507 2508 /** 2509 * @param value {@link #autocreate} (Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.). This is the underlying object with id, value and extensions. The accessor "getAutocreate" gives direct access to the value 2510 */ 2511 public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 2512 this.autocreate = value; 2513 return this; 2514 } 2515 2516 /** 2517 * @return Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section. 2518 */ 2519 public boolean getAutocreate() { 2520 return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue(); 2521 } 2522 2523 /** 2524 * @param value Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section. 2525 */ 2526 public TestScriptFixtureComponent setAutocreate(boolean value) { 2527 if (this.autocreate == null) 2528 this.autocreate = new BooleanType(); 2529 this.autocreate.setValue(value); 2530 return this; 2531 } 2532 2533 /** 2534 * @return {@link #autodelete} (Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.). This is the underlying object with id, value and extensions. The accessor "getAutodelete" gives direct access to the value 2535 */ 2536 public BooleanType getAutodeleteElement() { 2537 if (this.autodelete == null) 2538 if (Configuration.errorOnAutoCreate()) 2539 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete"); 2540 else if (Configuration.doAutoCreate()) 2541 this.autodelete = new BooleanType(); // bb 2542 return this.autodelete; 2543 } 2544 2545 public boolean hasAutodeleteElement() { 2546 return this.autodelete != null && !this.autodelete.isEmpty(); 2547 } 2548 2549 public boolean hasAutodelete() { 2550 return this.autodelete != null && !this.autodelete.isEmpty(); 2551 } 2552 2553 /** 2554 * @param value {@link #autodelete} (Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.). This is the underlying object with id, value and extensions. The accessor "getAutodelete" gives direct access to the value 2555 */ 2556 public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 2557 this.autodelete = value; 2558 return this; 2559 } 2560 2561 /** 2562 * @return Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section. 2563 */ 2564 public boolean getAutodelete() { 2565 return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue(); 2566 } 2567 2568 /** 2569 * @param value Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section. 2570 */ 2571 public TestScriptFixtureComponent setAutodelete(boolean value) { 2572 if (this.autodelete == null) 2573 this.autodelete = new BooleanType(); 2574 this.autodelete.setValue(value); 2575 return this; 2576 } 2577 2578 /** 2579 * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2580 */ 2581 public Reference getResource() { 2582 if (this.resource == null) 2583 if (Configuration.errorOnAutoCreate()) 2584 throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource"); 2585 else if (Configuration.doAutoCreate()) 2586 this.resource = new Reference(); // cc 2587 return this.resource; 2588 } 2589 2590 public boolean hasResource() { 2591 return this.resource != null && !this.resource.isEmpty(); 2592 } 2593 2594 /** 2595 * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2596 */ 2597 public TestScriptFixtureComponent setResource(Reference value) { 2598 this.resource = value; 2599 return this; 2600 } 2601 2602 /** 2603 * @return {@link #resource} 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. (Reference to the resource (containing the contents of the resource needed for operations).) 2604 */ 2605 public Resource getResourceTarget() { 2606 return this.resourceTarget; 2607 } 2608 2609 /** 2610 * @param value {@link #resource} 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. (Reference to the resource (containing the contents of the resource needed for operations).) 2611 */ 2612 public TestScriptFixtureComponent setResourceTarget(Resource value) { 2613 this.resourceTarget = value; 2614 return this; 2615 } 2616 2617 protected void listChildren(List<Property> childrenList) { 2618 super.listChildren(childrenList); 2619 childrenList.add(new Property("autocreate", "boolean", "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.", 0, java.lang.Integer.MAX_VALUE, autocreate)); 2620 childrenList.add(new Property("autodelete", "boolean", "Whether or not to implicitly delete the fixture during teardown. If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.", 0, java.lang.Integer.MAX_VALUE, autodelete)); 2621 childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, java.lang.Integer.MAX_VALUE, resource)); 2622 } 2623 2624 @Override 2625 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2626 switch (hash) { 2627 case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType 2628 case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType 2629 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 2630 default: return super.getProperty(hash, name, checkValid); 2631 } 2632 2633 } 2634 2635 @Override 2636 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2637 switch (hash) { 2638 case 73154411: // autocreate 2639 this.autocreate = castToBoolean(value); // BooleanType 2640 return value; 2641 case 89990170: // autodelete 2642 this.autodelete = castToBoolean(value); // BooleanType 2643 return value; 2644 case -341064690: // resource 2645 this.resource = castToReference(value); // Reference 2646 return value; 2647 default: return super.setProperty(hash, name, value); 2648 } 2649 2650 } 2651 2652 @Override 2653 public Base setProperty(String name, Base value) throws FHIRException { 2654 if (name.equals("autocreate")) { 2655 this.autocreate = castToBoolean(value); // BooleanType 2656 } else if (name.equals("autodelete")) { 2657 this.autodelete = castToBoolean(value); // BooleanType 2658 } else if (name.equals("resource")) { 2659 this.resource = castToReference(value); // Reference 2660 } else 2661 return super.setProperty(name, value); 2662 return value; 2663 } 2664 2665 @Override 2666 public Base makeProperty(int hash, String name) throws FHIRException { 2667 switch (hash) { 2668 case 73154411: return getAutocreateElement(); 2669 case 89990170: return getAutodeleteElement(); 2670 case -341064690: return getResource(); 2671 default: return super.makeProperty(hash, name); 2672 } 2673 2674 } 2675 2676 @Override 2677 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2678 switch (hash) { 2679 case 73154411: /*autocreate*/ return new String[] {"boolean"}; 2680 case 89990170: /*autodelete*/ return new String[] {"boolean"}; 2681 case -341064690: /*resource*/ return new String[] {"Reference"}; 2682 default: return super.getTypesForProperty(hash, name); 2683 } 2684 2685 } 2686 2687 @Override 2688 public Base addChild(String name) throws FHIRException { 2689 if (name.equals("autocreate")) { 2690 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate"); 2691 } 2692 else if (name.equals("autodelete")) { 2693 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete"); 2694 } 2695 else if (name.equals("resource")) { 2696 this.resource = new Reference(); 2697 return this.resource; 2698 } 2699 else 2700 return super.addChild(name); 2701 } 2702 2703 public TestScriptFixtureComponent copy() { 2704 TestScriptFixtureComponent dst = new TestScriptFixtureComponent(); 2705 copyValues(dst); 2706 dst.autocreate = autocreate == null ? null : autocreate.copy(); 2707 dst.autodelete = autodelete == null ? null : autodelete.copy(); 2708 dst.resource = resource == null ? null : resource.copy(); 2709 return dst; 2710 } 2711 2712 @Override 2713 public boolean equalsDeep(Base other) { 2714 if (!super.equalsDeep(other)) 2715 return false; 2716 if (!(other instanceof TestScriptFixtureComponent)) 2717 return false; 2718 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other; 2719 return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true) 2720 && compareDeep(resource, o.resource, true); 2721 } 2722 2723 @Override 2724 public boolean equalsShallow(Base other) { 2725 if (!super.equalsShallow(other)) 2726 return false; 2727 if (!(other instanceof TestScriptFixtureComponent)) 2728 return false; 2729 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other; 2730 return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true) 2731 ; 2732 } 2733 2734 public boolean isEmpty() { 2735 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource 2736 ); 2737 } 2738 2739 public String fhirType() { 2740 return "TestScript.fixture"; 2741 2742 } 2743 2744 } 2745 2746 @Block() 2747 public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement { 2748 /** 2749 * Descriptive name for this variable. 2750 */ 2751 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2752 @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." ) 2753 protected StringType name; 2754 2755 /** 2756 * A default, hard-coded, or user-defined value for this variable. 2757 */ 2758 @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2759 @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." ) 2760 protected StringType defaultValue; 2761 2762 /** 2763 * A free text natural language description of the variable and its purpose. 2764 */ 2765 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2766 @Description(shortDefinition="Natural language description of the variable", formalDefinition="A free text natural language description of the variable and its purpose." ) 2767 protected StringType description; 2768 2769 /** 2770 * The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2771 */ 2772 @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 2773 @Description(shortDefinition="The fluentpath expression against the fixture body", formalDefinition="The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified." ) 2774 protected StringType expression; 2775 2776 /** 2777 * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2778 */ 2779 @Child(name = "headerField", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2780 @Description(shortDefinition="HTTP header field name for source", formalDefinition="Will be used to grab the HTTP header field value from the headers that sourceId is pointing to." ) 2781 protected StringType headerField; 2782 2783 /** 2784 * Displayable text string with hint help information to the user when entering a default value. 2785 */ 2786 @Child(name = "hint", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 2787 @Description(shortDefinition="Hint help text for default value to enter", formalDefinition="Displayable text string with hint help information to the user when entering a default value." ) 2788 protected StringType hint; 2789 2790 /** 2791 * XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2792 */ 2793 @Child(name = "path", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 2794 @Description(shortDefinition="XPath or JSONPath against the fixture body", formalDefinition="XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified." ) 2795 protected StringType path; 2796 2797 /** 2798 * Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2799 */ 2800 @Child(name = "sourceId", type = {IdType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2801 @Description(shortDefinition="Fixture Id of source expression or headerField within this variable", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable." ) 2802 protected IdType sourceId; 2803 2804 private static final long serialVersionUID = -1592325432L; 2805 2806 /** 2807 * Constructor 2808 */ 2809 public TestScriptVariableComponent() { 2810 super(); 2811 } 2812 2813 /** 2814 * Constructor 2815 */ 2816 public TestScriptVariableComponent(StringType name) { 2817 super(); 2818 this.name = name; 2819 } 2820 2821 /** 2822 * @return {@link #name} (Descriptive name for this variable.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2823 */ 2824 public StringType getNameElement() { 2825 if (this.name == null) 2826 if (Configuration.errorOnAutoCreate()) 2827 throw new Error("Attempt to auto-create TestScriptVariableComponent.name"); 2828 else if (Configuration.doAutoCreate()) 2829 this.name = new StringType(); // bb 2830 return this.name; 2831 } 2832 2833 public boolean hasNameElement() { 2834 return this.name != null && !this.name.isEmpty(); 2835 } 2836 2837 public boolean hasName() { 2838 return this.name != null && !this.name.isEmpty(); 2839 } 2840 2841 /** 2842 * @param value {@link #name} (Descriptive name for this variable.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2843 */ 2844 public TestScriptVariableComponent setNameElement(StringType value) { 2845 this.name = value; 2846 return this; 2847 } 2848 2849 /** 2850 * @return Descriptive name for this variable. 2851 */ 2852 public String getName() { 2853 return this.name == null ? null : this.name.getValue(); 2854 } 2855 2856 /** 2857 * @param value Descriptive name for this variable. 2858 */ 2859 public TestScriptVariableComponent setName(String value) { 2860 if (this.name == null) 2861 this.name = new StringType(); 2862 this.name.setValue(value); 2863 return this; 2864 } 2865 2866 /** 2867 * @return {@link #defaultValue} (A default, hard-coded, or user-defined value for this variable.). This is the underlying object with id, value and extensions. The accessor "getDefaultValue" gives direct access to the value 2868 */ 2869 public StringType getDefaultValueElement() { 2870 if (this.defaultValue == null) 2871 if (Configuration.errorOnAutoCreate()) 2872 throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue"); 2873 else if (Configuration.doAutoCreate()) 2874 this.defaultValue = new StringType(); // bb 2875 return this.defaultValue; 2876 } 2877 2878 public boolean hasDefaultValueElement() { 2879 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2880 } 2881 2882 public boolean hasDefaultValue() { 2883 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2884 } 2885 2886 /** 2887 * @param value {@link #defaultValue} (A default, hard-coded, or user-defined value for this variable.). This is the underlying object with id, value and extensions. The accessor "getDefaultValue" gives direct access to the value 2888 */ 2889 public TestScriptVariableComponent setDefaultValueElement(StringType value) { 2890 this.defaultValue = value; 2891 return this; 2892 } 2893 2894 /** 2895 * @return A default, hard-coded, or user-defined value for this variable. 2896 */ 2897 public String getDefaultValue() { 2898 return this.defaultValue == null ? null : this.defaultValue.getValue(); 2899 } 2900 2901 /** 2902 * @param value A default, hard-coded, or user-defined value for this variable. 2903 */ 2904 public TestScriptVariableComponent setDefaultValue(String value) { 2905 if (Utilities.noString(value)) 2906 this.defaultValue = null; 2907 else { 2908 if (this.defaultValue == null) 2909 this.defaultValue = new StringType(); 2910 this.defaultValue.setValue(value); 2911 } 2912 return this; 2913 } 2914 2915 /** 2916 * @return {@link #description} (A free text natural language description of the variable and its purpose.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2917 */ 2918 public StringType getDescriptionElement() { 2919 if (this.description == null) 2920 if (Configuration.errorOnAutoCreate()) 2921 throw new Error("Attempt to auto-create TestScriptVariableComponent.description"); 2922 else if (Configuration.doAutoCreate()) 2923 this.description = new StringType(); // bb 2924 return this.description; 2925 } 2926 2927 public boolean hasDescriptionElement() { 2928 return this.description != null && !this.description.isEmpty(); 2929 } 2930 2931 public boolean hasDescription() { 2932 return this.description != null && !this.description.isEmpty(); 2933 } 2934 2935 /** 2936 * @param value {@link #description} (A free text natural language description of the variable and its purpose.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2937 */ 2938 public TestScriptVariableComponent setDescriptionElement(StringType value) { 2939 this.description = value; 2940 return this; 2941 } 2942 2943 /** 2944 * @return A free text natural language description of the variable and its purpose. 2945 */ 2946 public String getDescription() { 2947 return this.description == null ? null : this.description.getValue(); 2948 } 2949 2950 /** 2951 * @param value A free text natural language description of the variable and its purpose. 2952 */ 2953 public TestScriptVariableComponent setDescription(String value) { 2954 if (Utilities.noString(value)) 2955 this.description = null; 2956 else { 2957 if (this.description == null) 2958 this.description = new StringType(); 2959 this.description.setValue(value); 2960 } 2961 return this; 2962 } 2963 2964 /** 2965 * @return {@link #expression} (The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 2966 */ 2967 public StringType getExpressionElement() { 2968 if (this.expression == null) 2969 if (Configuration.errorOnAutoCreate()) 2970 throw new Error("Attempt to auto-create TestScriptVariableComponent.expression"); 2971 else if (Configuration.doAutoCreate()) 2972 this.expression = new StringType(); // bb 2973 return this.expression; 2974 } 2975 2976 public boolean hasExpressionElement() { 2977 return this.expression != null && !this.expression.isEmpty(); 2978 } 2979 2980 public boolean hasExpression() { 2981 return this.expression != null && !this.expression.isEmpty(); 2982 } 2983 2984 /** 2985 * @param value {@link #expression} (The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 2986 */ 2987 public TestScriptVariableComponent setExpressionElement(StringType value) { 2988 this.expression = value; 2989 return this; 2990 } 2991 2992 /** 2993 * @return The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2994 */ 2995 public String getExpression() { 2996 return this.expression == null ? null : this.expression.getValue(); 2997 } 2998 2999 /** 3000 * @param value The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 3001 */ 3002 public TestScriptVariableComponent setExpression(String value) { 3003 if (Utilities.noString(value)) 3004 this.expression = null; 3005 else { 3006 if (this.expression == null) 3007 this.expression = new StringType(); 3008 this.expression.setValue(value); 3009 } 3010 return this; 3011 } 3012 3013 /** 3014 * @return {@link #headerField} (Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value 3015 */ 3016 public StringType getHeaderFieldElement() { 3017 if (this.headerField == null) 3018 if (Configuration.errorOnAutoCreate()) 3019 throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField"); 3020 else if (Configuration.doAutoCreate()) 3021 this.headerField = new StringType(); // bb 3022 return this.headerField; 3023 } 3024 3025 public boolean hasHeaderFieldElement() { 3026 return this.headerField != null && !this.headerField.isEmpty(); 3027 } 3028 3029 public boolean hasHeaderField() { 3030 return this.headerField != null && !this.headerField.isEmpty(); 3031 } 3032 3033 /** 3034 * @param value {@link #headerField} (Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value 3035 */ 3036 public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 3037 this.headerField = value; 3038 return this; 3039 } 3040 3041 /** 3042 * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 3043 */ 3044 public String getHeaderField() { 3045 return this.headerField == null ? null : this.headerField.getValue(); 3046 } 3047 3048 /** 3049 * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 3050 */ 3051 public TestScriptVariableComponent setHeaderField(String value) { 3052 if (Utilities.noString(value)) 3053 this.headerField = null; 3054 else { 3055 if (this.headerField == null) 3056 this.headerField = new StringType(); 3057 this.headerField.setValue(value); 3058 } 3059 return this; 3060 } 3061 3062 /** 3063 * @return {@link #hint} (Displayable text string with hint help information to the user when entering a default value.). This is the underlying object with id, value and extensions. The accessor "getHint" gives direct access to the value 3064 */ 3065 public StringType getHintElement() { 3066 if (this.hint == null) 3067 if (Configuration.errorOnAutoCreate()) 3068 throw new Error("Attempt to auto-create TestScriptVariableComponent.hint"); 3069 else if (Configuration.doAutoCreate()) 3070 this.hint = new StringType(); // bb 3071 return this.hint; 3072 } 3073 3074 public boolean hasHintElement() { 3075 return this.hint != null && !this.hint.isEmpty(); 3076 } 3077 3078 public boolean hasHint() { 3079 return this.hint != null && !this.hint.isEmpty(); 3080 } 3081 3082 /** 3083 * @param value {@link #hint} (Displayable text string with hint help information to the user when entering a default value.). This is the underlying object with id, value and extensions. The accessor "getHint" gives direct access to the value 3084 */ 3085 public TestScriptVariableComponent setHintElement(StringType value) { 3086 this.hint = value; 3087 return this; 3088 } 3089 3090 /** 3091 * @return Displayable text string with hint help information to the user when entering a default value. 3092 */ 3093 public String getHint() { 3094 return this.hint == null ? null : this.hint.getValue(); 3095 } 3096 3097 /** 3098 * @param value Displayable text string with hint help information to the user when entering a default value. 3099 */ 3100 public TestScriptVariableComponent setHint(String value) { 3101 if (Utilities.noString(value)) 3102 this.hint = null; 3103 else { 3104 if (this.hint == null) 3105 this.hint = new StringType(); 3106 this.hint.setValue(value); 3107 } 3108 return this; 3109 } 3110 3111 /** 3112 * @return {@link #path} (XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 3113 */ 3114 public StringType getPathElement() { 3115 if (this.path == null) 3116 if (Configuration.errorOnAutoCreate()) 3117 throw new Error("Attempt to auto-create TestScriptVariableComponent.path"); 3118 else if (Configuration.doAutoCreate()) 3119 this.path = new StringType(); // bb 3120 return this.path; 3121 } 3122 3123 public boolean hasPathElement() { 3124 return this.path != null && !this.path.isEmpty(); 3125 } 3126 3127 public boolean hasPath() { 3128 return this.path != null && !this.path.isEmpty(); 3129 } 3130 3131 /** 3132 * @param value {@link #path} (XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 3133 */ 3134 public TestScriptVariableComponent setPathElement(StringType value) { 3135 this.path = value; 3136 return this; 3137 } 3138 3139 /** 3140 * @return XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 3141 */ 3142 public String getPath() { 3143 return this.path == null ? null : this.path.getValue(); 3144 } 3145 3146 /** 3147 * @param value XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 3148 */ 3149 public TestScriptVariableComponent setPath(String value) { 3150 if (Utilities.noString(value)) 3151 this.path = null; 3152 else { 3153 if (this.path == null) 3154 this.path = new StringType(); 3155 this.path.setValue(value); 3156 } 3157 return this; 3158 } 3159 3160 /** 3161 * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value 3162 */ 3163 public IdType getSourceIdElement() { 3164 if (this.sourceId == null) 3165 if (Configuration.errorOnAutoCreate()) 3166 throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId"); 3167 else if (Configuration.doAutoCreate()) 3168 this.sourceId = new IdType(); // bb 3169 return this.sourceId; 3170 } 3171 3172 public boolean hasSourceIdElement() { 3173 return this.sourceId != null && !this.sourceId.isEmpty(); 3174 } 3175 3176 public boolean hasSourceId() { 3177 return this.sourceId != null && !this.sourceId.isEmpty(); 3178 } 3179 3180 /** 3181 * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value 3182 */ 3183 public TestScriptVariableComponent setSourceIdElement(IdType value) { 3184 this.sourceId = value; 3185 return this; 3186 } 3187 3188 /** 3189 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 3190 */ 3191 public String getSourceId() { 3192 return this.sourceId == null ? null : this.sourceId.getValue(); 3193 } 3194 3195 /** 3196 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 3197 */ 3198 public TestScriptVariableComponent setSourceId(String value) { 3199 if (Utilities.noString(value)) 3200 this.sourceId = null; 3201 else { 3202 if (this.sourceId == null) 3203 this.sourceId = new IdType(); 3204 this.sourceId.setValue(value); 3205 } 3206 return this; 3207 } 3208 3209 protected void listChildren(List<Property> childrenList) { 3210 super.listChildren(childrenList); 3211 childrenList.add(new Property("name", "string", "Descriptive name for this variable.", 0, java.lang.Integer.MAX_VALUE, name)); 3212 childrenList.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, java.lang.Integer.MAX_VALUE, defaultValue)); 3213 childrenList.add(new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, java.lang.Integer.MAX_VALUE, description)); 3214 childrenList.add(new Property("expression", "string", "The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", 0, java.lang.Integer.MAX_VALUE, expression)); 3215 childrenList.add(new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, java.lang.Integer.MAX_VALUE, headerField)); 3216 childrenList.add(new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, java.lang.Integer.MAX_VALUE, hint)); 3217 childrenList.add(new Property("path", "string", "XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", 0, java.lang.Integer.MAX_VALUE, path)); 3218 childrenList.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", 0, java.lang.Integer.MAX_VALUE, sourceId)); 3219 } 3220 3221 @Override 3222 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3223 switch (hash) { 3224 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3225 case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType 3226 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3227 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 3228 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 3229 case 3202695: /*hint*/ return this.hint == null ? new Base[0] : new Base[] {this.hint}; // StringType 3230 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 3231 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 3232 default: return super.getProperty(hash, name, checkValid); 3233 } 3234 3235 } 3236 3237 @Override 3238 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3239 switch (hash) { 3240 case 3373707: // name 3241 this.name = castToString(value); // StringType 3242 return value; 3243 case -659125328: // defaultValue 3244 this.defaultValue = castToString(value); // StringType 3245 return value; 3246 case -1724546052: // description 3247 this.description = castToString(value); // StringType 3248 return value; 3249 case -1795452264: // expression 3250 this.expression = castToString(value); // StringType 3251 return value; 3252 case 1160732269: // headerField 3253 this.headerField = castToString(value); // StringType 3254 return value; 3255 case 3202695: // hint 3256 this.hint = castToString(value); // StringType 3257 return value; 3258 case 3433509: // path 3259 this.path = castToString(value); // StringType 3260 return value; 3261 case 1746327190: // sourceId 3262 this.sourceId = castToId(value); // IdType 3263 return value; 3264 default: return super.setProperty(hash, name, value); 3265 } 3266 3267 } 3268 3269 @Override 3270 public Base setProperty(String name, Base value) throws FHIRException { 3271 if (name.equals("name")) { 3272 this.name = castToString(value); // StringType 3273 } else if (name.equals("defaultValue")) { 3274 this.defaultValue = castToString(value); // StringType 3275 } else if (name.equals("description")) { 3276 this.description = castToString(value); // StringType 3277 } else if (name.equals("expression")) { 3278 this.expression = castToString(value); // StringType 3279 } else if (name.equals("headerField")) { 3280 this.headerField = castToString(value); // StringType 3281 } else if (name.equals("hint")) { 3282 this.hint = castToString(value); // StringType 3283 } else if (name.equals("path")) { 3284 this.path = castToString(value); // StringType 3285 } else if (name.equals("sourceId")) { 3286 this.sourceId = castToId(value); // IdType 3287 } else 3288 return super.setProperty(name, value); 3289 return value; 3290 } 3291 3292 @Override 3293 public Base makeProperty(int hash, String name) throws FHIRException { 3294 switch (hash) { 3295 case 3373707: return getNameElement(); 3296 case -659125328: return getDefaultValueElement(); 3297 case -1724546052: return getDescriptionElement(); 3298 case -1795452264: return getExpressionElement(); 3299 case 1160732269: return getHeaderFieldElement(); 3300 case 3202695: return getHintElement(); 3301 case 3433509: return getPathElement(); 3302 case 1746327190: return getSourceIdElement(); 3303 default: return super.makeProperty(hash, name); 3304 } 3305 3306 } 3307 3308 @Override 3309 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3310 switch (hash) { 3311 case 3373707: /*name*/ return new String[] {"string"}; 3312 case -659125328: /*defaultValue*/ return new String[] {"string"}; 3313 case -1724546052: /*description*/ return new String[] {"string"}; 3314 case -1795452264: /*expression*/ return new String[] {"string"}; 3315 case 1160732269: /*headerField*/ return new String[] {"string"}; 3316 case 3202695: /*hint*/ return new String[] {"string"}; 3317 case 3433509: /*path*/ return new String[] {"string"}; 3318 case 1746327190: /*sourceId*/ return new String[] {"id"}; 3319 default: return super.getTypesForProperty(hash, name); 3320 } 3321 3322 } 3323 3324 @Override 3325 public Base addChild(String name) throws FHIRException { 3326 if (name.equals("name")) { 3327 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3328 } 3329 else if (name.equals("defaultValue")) { 3330 throw new FHIRException("Cannot call addChild on a primitive type TestScript.defaultValue"); 3331 } 3332 else if (name.equals("description")) { 3333 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 3334 } 3335 else if (name.equals("expression")) { 3336 throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression"); 3337 } 3338 else if (name.equals("headerField")) { 3339 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 3340 } 3341 else if (name.equals("hint")) { 3342 throw new FHIRException("Cannot call addChild on a primitive type TestScript.hint"); 3343 } 3344 else if (name.equals("path")) { 3345 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 3346 } 3347 else if (name.equals("sourceId")) { 3348 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 3349 } 3350 else 3351 return super.addChild(name); 3352 } 3353 3354 public TestScriptVariableComponent copy() { 3355 TestScriptVariableComponent dst = new TestScriptVariableComponent(); 3356 copyValues(dst); 3357 dst.name = name == null ? null : name.copy(); 3358 dst.defaultValue = defaultValue == null ? null : defaultValue.copy(); 3359 dst.description = description == null ? null : description.copy(); 3360 dst.expression = expression == null ? null : expression.copy(); 3361 dst.headerField = headerField == null ? null : headerField.copy(); 3362 dst.hint = hint == null ? null : hint.copy(); 3363 dst.path = path == null ? null : path.copy(); 3364 dst.sourceId = sourceId == null ? null : sourceId.copy(); 3365 return dst; 3366 } 3367 3368 @Override 3369 public boolean equalsDeep(Base other) { 3370 if (!super.equalsDeep(other)) 3371 return false; 3372 if (!(other instanceof TestScriptVariableComponent)) 3373 return false; 3374 TestScriptVariableComponent o = (TestScriptVariableComponent) other; 3375 return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(description, o.description, true) 3376 && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true) 3377 && compareDeep(hint, o.hint, true) && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true) 3378 ; 3379 } 3380 3381 @Override 3382 public boolean equalsShallow(Base other) { 3383 if (!super.equalsShallow(other)) 3384 return false; 3385 if (!(other instanceof TestScriptVariableComponent)) 3386 return false; 3387 TestScriptVariableComponent o = (TestScriptVariableComponent) other; 3388 return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(description, o.description, true) 3389 && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true) 3390 && compareValues(hint, o.hint, true) && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true) 3391 ; 3392 } 3393 3394 public boolean isEmpty() { 3395 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description 3396 , expression, headerField, hint, path, sourceId); 3397 } 3398 3399 public String fhirType() { 3400 return "TestScript.variable"; 3401 3402 } 3403 3404 } 3405 3406 @Block() 3407 public static class TestScriptRuleComponent extends BackboneElement implements IBaseBackboneElement { 3408 /** 3409 * Reference to the resource (containing the contents of the rule needed for assertions). 3410 */ 3411 @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 3412 @Description(shortDefinition="Assert rule resource reference", formalDefinition="Reference to the resource (containing the contents of the rule needed for assertions)." ) 3413 protected Reference resource; 3414 3415 /** 3416 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the rule needed for assertions).) 3417 */ 3418 protected Resource resourceTarget; 3419 3420 /** 3421 * Each rule template can take one or more parameters for rule evaluation. 3422 */ 3423 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3424 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 3425 protected List<RuleParamComponent> param; 3426 3427 private static final long serialVersionUID = -1869267735L; 3428 3429 /** 3430 * Constructor 3431 */ 3432 public TestScriptRuleComponent() { 3433 super(); 3434 } 3435 3436 /** 3437 * Constructor 3438 */ 3439 public TestScriptRuleComponent(Reference resource) { 3440 super(); 3441 this.resource = resource; 3442 } 3443 3444 /** 3445 * @return {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) 3446 */ 3447 public Reference getResource() { 3448 if (this.resource == null) 3449 if (Configuration.errorOnAutoCreate()) 3450 throw new Error("Attempt to auto-create TestScriptRuleComponent.resource"); 3451 else if (Configuration.doAutoCreate()) 3452 this.resource = new Reference(); // cc 3453 return this.resource; 3454 } 3455 3456 public boolean hasResource() { 3457 return this.resource != null && !this.resource.isEmpty(); 3458 } 3459 3460 /** 3461 * @param value {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) 3462 */ 3463 public TestScriptRuleComponent setResource(Reference value) { 3464 this.resource = value; 3465 return this; 3466 } 3467 3468 /** 3469 * @return {@link #resource} 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. (Reference to the resource (containing the contents of the rule needed for assertions).) 3470 */ 3471 public Resource getResourceTarget() { 3472 return this.resourceTarget; 3473 } 3474 3475 /** 3476 * @param value {@link #resource} 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. (Reference to the resource (containing the contents of the rule needed for assertions).) 3477 */ 3478 public TestScriptRuleComponent setResourceTarget(Resource value) { 3479 this.resourceTarget = value; 3480 return this; 3481 } 3482 3483 /** 3484 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 3485 */ 3486 public List<RuleParamComponent> getParam() { 3487 if (this.param == null) 3488 this.param = new ArrayList<RuleParamComponent>(); 3489 return this.param; 3490 } 3491 3492 /** 3493 * @return Returns a reference to <code>this</code> for easy method chaining 3494 */ 3495 public TestScriptRuleComponent setParam(List<RuleParamComponent> theParam) { 3496 this.param = theParam; 3497 return this; 3498 } 3499 3500 public boolean hasParam() { 3501 if (this.param == null) 3502 return false; 3503 for (RuleParamComponent item : this.param) 3504 if (!item.isEmpty()) 3505 return true; 3506 return false; 3507 } 3508 3509 public RuleParamComponent addParam() { //3 3510 RuleParamComponent t = new RuleParamComponent(); 3511 if (this.param == null) 3512 this.param = new ArrayList<RuleParamComponent>(); 3513 this.param.add(t); 3514 return t; 3515 } 3516 3517 public TestScriptRuleComponent addParam(RuleParamComponent t) { //3 3518 if (t == null) 3519 return this; 3520 if (this.param == null) 3521 this.param = new ArrayList<RuleParamComponent>(); 3522 this.param.add(t); 3523 return this; 3524 } 3525 3526 /** 3527 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 3528 */ 3529 public RuleParamComponent getParamFirstRep() { 3530 if (getParam().isEmpty()) { 3531 addParam(); 3532 } 3533 return getParam().get(0); 3534 } 3535 3536 protected void listChildren(List<Property> childrenList) { 3537 super.listChildren(childrenList); 3538 childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, java.lang.Integer.MAX_VALUE, resource)); 3539 childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 3540 } 3541 3542 @Override 3543 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3544 switch (hash) { 3545 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 3546 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RuleParamComponent 3547 default: return super.getProperty(hash, name, checkValid); 3548 } 3549 3550 } 3551 3552 @Override 3553 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3554 switch (hash) { 3555 case -341064690: // resource 3556 this.resource = castToReference(value); // Reference 3557 return value; 3558 case 106436749: // param 3559 this.getParam().add((RuleParamComponent) value); // RuleParamComponent 3560 return value; 3561 default: return super.setProperty(hash, name, value); 3562 } 3563 3564 } 3565 3566 @Override 3567 public Base setProperty(String name, Base value) throws FHIRException { 3568 if (name.equals("resource")) { 3569 this.resource = castToReference(value); // Reference 3570 } else if (name.equals("param")) { 3571 this.getParam().add((RuleParamComponent) value); 3572 } else 3573 return super.setProperty(name, value); 3574 return value; 3575 } 3576 3577 @Override 3578 public Base makeProperty(int hash, String name) throws FHIRException { 3579 switch (hash) { 3580 case -341064690: return getResource(); 3581 case 106436749: return addParam(); 3582 default: return super.makeProperty(hash, name); 3583 } 3584 3585 } 3586 3587 @Override 3588 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3589 switch (hash) { 3590 case -341064690: /*resource*/ return new String[] {"Reference"}; 3591 case 106436749: /*param*/ return new String[] {}; 3592 default: return super.getTypesForProperty(hash, name); 3593 } 3594 3595 } 3596 3597 @Override 3598 public Base addChild(String name) throws FHIRException { 3599 if (name.equals("resource")) { 3600 this.resource = new Reference(); 3601 return this.resource; 3602 } 3603 else if (name.equals("param")) { 3604 return addParam(); 3605 } 3606 else 3607 return super.addChild(name); 3608 } 3609 3610 public TestScriptRuleComponent copy() { 3611 TestScriptRuleComponent dst = new TestScriptRuleComponent(); 3612 copyValues(dst); 3613 dst.resource = resource == null ? null : resource.copy(); 3614 if (param != null) { 3615 dst.param = new ArrayList<RuleParamComponent>(); 3616 for (RuleParamComponent i : param) 3617 dst.param.add(i.copy()); 3618 }; 3619 return dst; 3620 } 3621 3622 @Override 3623 public boolean equalsDeep(Base other) { 3624 if (!super.equalsDeep(other)) 3625 return false; 3626 if (!(other instanceof TestScriptRuleComponent)) 3627 return false; 3628 TestScriptRuleComponent o = (TestScriptRuleComponent) other; 3629 return compareDeep(resource, o.resource, true) && compareDeep(param, o.param, true); 3630 } 3631 3632 @Override 3633 public boolean equalsShallow(Base other) { 3634 if (!super.equalsShallow(other)) 3635 return false; 3636 if (!(other instanceof TestScriptRuleComponent)) 3637 return false; 3638 TestScriptRuleComponent o = (TestScriptRuleComponent) other; 3639 return true; 3640 } 3641 3642 public boolean isEmpty() { 3643 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, param); 3644 } 3645 3646 public String fhirType() { 3647 return "TestScript.rule"; 3648 3649 } 3650 3651 } 3652 3653 @Block() 3654 public static class RuleParamComponent extends BackboneElement implements IBaseBackboneElement { 3655 /** 3656 * Descriptive name for this parameter that matches the external assert rule parameter name. 3657 */ 3658 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3659 @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) 3660 protected StringType name; 3661 3662 /** 3663 * The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3664 */ 3665 @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3666 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The explicit or dynamic value for the parameter that will be passed on to the external rule template." ) 3667 protected StringType value; 3668 3669 private static final long serialVersionUID = 395259392L; 3670 3671 /** 3672 * Constructor 3673 */ 3674 public RuleParamComponent() { 3675 super(); 3676 } 3677 3678 /** 3679 * Constructor 3680 */ 3681 public RuleParamComponent(StringType name) { 3682 super(); 3683 this.name = name; 3684 } 3685 3686 /** 3687 * @return {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3688 */ 3689 public StringType getNameElement() { 3690 if (this.name == null) 3691 if (Configuration.errorOnAutoCreate()) 3692 throw new Error("Attempt to auto-create RuleParamComponent.name"); 3693 else if (Configuration.doAutoCreate()) 3694 this.name = new StringType(); // bb 3695 return this.name; 3696 } 3697 3698 public boolean hasNameElement() { 3699 return this.name != null && !this.name.isEmpty(); 3700 } 3701 3702 public boolean hasName() { 3703 return this.name != null && !this.name.isEmpty(); 3704 } 3705 3706 /** 3707 * @param value {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3708 */ 3709 public RuleParamComponent setNameElement(StringType value) { 3710 this.name = value; 3711 return this; 3712 } 3713 3714 /** 3715 * @return Descriptive name for this parameter that matches the external assert rule parameter name. 3716 */ 3717 public String getName() { 3718 return this.name == null ? null : this.name.getValue(); 3719 } 3720 3721 /** 3722 * @param value Descriptive name for this parameter that matches the external assert rule parameter name. 3723 */ 3724 public RuleParamComponent setName(String value) { 3725 if (this.name == null) 3726 this.name = new StringType(); 3727 this.name.setValue(value); 3728 return this; 3729 } 3730 3731 /** 3732 * @return {@link #value} (The explicit or dynamic value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 3733 */ 3734 public StringType getValueElement() { 3735 if (this.value == null) 3736 if (Configuration.errorOnAutoCreate()) 3737 throw new Error("Attempt to auto-create RuleParamComponent.value"); 3738 else if (Configuration.doAutoCreate()) 3739 this.value = new StringType(); // bb 3740 return this.value; 3741 } 3742 3743 public boolean hasValueElement() { 3744 return this.value != null && !this.value.isEmpty(); 3745 } 3746 3747 public boolean hasValue() { 3748 return this.value != null && !this.value.isEmpty(); 3749 } 3750 3751 /** 3752 * @param value {@link #value} (The explicit or dynamic value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 3753 */ 3754 public RuleParamComponent setValueElement(StringType value) { 3755 this.value = value; 3756 return this; 3757 } 3758 3759 /** 3760 * @return The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3761 */ 3762 public String getValue() { 3763 return this.value == null ? null : this.value.getValue(); 3764 } 3765 3766 /** 3767 * @param value The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3768 */ 3769 public RuleParamComponent setValue(String value) { 3770 if (Utilities.noString(value)) 3771 this.value = null; 3772 else { 3773 if (this.value == null) 3774 this.value = new StringType(); 3775 this.value.setValue(value); 3776 } 3777 return this; 3778 } 3779 3780 protected void listChildren(List<Property> childrenList) { 3781 super.listChildren(childrenList); 3782 childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); 3783 childrenList.add(new Property("value", "string", "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", 0, java.lang.Integer.MAX_VALUE, value)); 3784 } 3785 3786 @Override 3787 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3788 switch (hash) { 3789 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3790 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 3791 default: return super.getProperty(hash, name, checkValid); 3792 } 3793 3794 } 3795 3796 @Override 3797 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3798 switch (hash) { 3799 case 3373707: // name 3800 this.name = castToString(value); // StringType 3801 return value; 3802 case 111972721: // value 3803 this.value = castToString(value); // StringType 3804 return value; 3805 default: return super.setProperty(hash, name, value); 3806 } 3807 3808 } 3809 3810 @Override 3811 public Base setProperty(String name, Base value) throws FHIRException { 3812 if (name.equals("name")) { 3813 this.name = castToString(value); // StringType 3814 } else if (name.equals("value")) { 3815 this.value = castToString(value); // StringType 3816 } else 3817 return super.setProperty(name, value); 3818 return value; 3819 } 3820 3821 @Override 3822 public Base makeProperty(int hash, String name) throws FHIRException { 3823 switch (hash) { 3824 case 3373707: return getNameElement(); 3825 case 111972721: return getValueElement(); 3826 default: return super.makeProperty(hash, name); 3827 } 3828 3829 } 3830 3831 @Override 3832 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3833 switch (hash) { 3834 case 3373707: /*name*/ return new String[] {"string"}; 3835 case 111972721: /*value*/ return new String[] {"string"}; 3836 default: return super.getTypesForProperty(hash, name); 3837 } 3838 3839 } 3840 3841 @Override 3842 public Base addChild(String name) throws FHIRException { 3843 if (name.equals("name")) { 3844 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3845 } 3846 else if (name.equals("value")) { 3847 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 3848 } 3849 else 3850 return super.addChild(name); 3851 } 3852 3853 public RuleParamComponent copy() { 3854 RuleParamComponent dst = new RuleParamComponent(); 3855 copyValues(dst); 3856 dst.name = name == null ? null : name.copy(); 3857 dst.value = value == null ? null : value.copy(); 3858 return dst; 3859 } 3860 3861 @Override 3862 public boolean equalsDeep(Base other) { 3863 if (!super.equalsDeep(other)) 3864 return false; 3865 if (!(other instanceof RuleParamComponent)) 3866 return false; 3867 RuleParamComponent o = (RuleParamComponent) other; 3868 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 3869 } 3870 3871 @Override 3872 public boolean equalsShallow(Base other) { 3873 if (!super.equalsShallow(other)) 3874 return false; 3875 if (!(other instanceof RuleParamComponent)) 3876 return false; 3877 RuleParamComponent o = (RuleParamComponent) other; 3878 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 3879 } 3880 3881 public boolean isEmpty() { 3882 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 3883 } 3884 3885 public String fhirType() { 3886 return "TestScript.rule.param"; 3887 3888 } 3889 3890 } 3891 3892 @Block() 3893 public static class TestScriptRulesetComponent extends BackboneElement implements IBaseBackboneElement { 3894 /** 3895 * Reference to the resource (containing the contents of the ruleset needed for assertions). 3896 */ 3897 @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 3898 @Description(shortDefinition="Assert ruleset resource reference", formalDefinition="Reference to the resource (containing the contents of the ruleset needed for assertions)." ) 3899 protected Reference resource; 3900 3901 /** 3902 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the ruleset needed for assertions).) 3903 */ 3904 protected Resource resourceTarget; 3905 3906 /** 3907 * The referenced rule within the external ruleset template. 3908 */ 3909 @Child(name = "rule", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3910 @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." ) 3911 protected List<RulesetRuleComponent> rule; 3912 3913 private static final long serialVersionUID = 1260261423L; 3914 3915 /** 3916 * Constructor 3917 */ 3918 public TestScriptRulesetComponent() { 3919 super(); 3920 } 3921 3922 /** 3923 * Constructor 3924 */ 3925 public TestScriptRulesetComponent(Reference resource) { 3926 super(); 3927 this.resource = resource; 3928 } 3929 3930 /** 3931 * @return {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) 3932 */ 3933 public Reference getResource() { 3934 if (this.resource == null) 3935 if (Configuration.errorOnAutoCreate()) 3936 throw new Error("Attempt to auto-create TestScriptRulesetComponent.resource"); 3937 else if (Configuration.doAutoCreate()) 3938 this.resource = new Reference(); // cc 3939 return this.resource; 3940 } 3941 3942 public boolean hasResource() { 3943 return this.resource != null && !this.resource.isEmpty(); 3944 } 3945 3946 /** 3947 * @param value {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) 3948 */ 3949 public TestScriptRulesetComponent setResource(Reference value) { 3950 this.resource = value; 3951 return this; 3952 } 3953 3954 /** 3955 * @return {@link #resource} 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. (Reference to the resource (containing the contents of the ruleset needed for assertions).) 3956 */ 3957 public Resource getResourceTarget() { 3958 return this.resourceTarget; 3959 } 3960 3961 /** 3962 * @param value {@link #resource} 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. (Reference to the resource (containing the contents of the ruleset needed for assertions).) 3963 */ 3964 public TestScriptRulesetComponent setResourceTarget(Resource value) { 3965 this.resourceTarget = value; 3966 return this; 3967 } 3968 3969 /** 3970 * @return {@link #rule} (The referenced rule within the external ruleset template.) 3971 */ 3972 public List<RulesetRuleComponent> getRule() { 3973 if (this.rule == null) 3974 this.rule = new ArrayList<RulesetRuleComponent>(); 3975 return this.rule; 3976 } 3977 3978 /** 3979 * @return Returns a reference to <code>this</code> for easy method chaining 3980 */ 3981 public TestScriptRulesetComponent setRule(List<RulesetRuleComponent> theRule) { 3982 this.rule = theRule; 3983 return this; 3984 } 3985 3986 public boolean hasRule() { 3987 if (this.rule == null) 3988 return false; 3989 for (RulesetRuleComponent item : this.rule) 3990 if (!item.isEmpty()) 3991 return true; 3992 return false; 3993 } 3994 3995 public RulesetRuleComponent addRule() { //3 3996 RulesetRuleComponent t = new RulesetRuleComponent(); 3997 if (this.rule == null) 3998 this.rule = new ArrayList<RulesetRuleComponent>(); 3999 this.rule.add(t); 4000 return t; 4001 } 4002 4003 public TestScriptRulesetComponent addRule(RulesetRuleComponent t) { //3 4004 if (t == null) 4005 return this; 4006 if (this.rule == null) 4007 this.rule = new ArrayList<RulesetRuleComponent>(); 4008 this.rule.add(t); 4009 return this; 4010 } 4011 4012 /** 4013 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 4014 */ 4015 public RulesetRuleComponent getRuleFirstRep() { 4016 if (getRule().isEmpty()) { 4017 addRule(); 4018 } 4019 return getRule().get(0); 4020 } 4021 4022 protected void listChildren(List<Property> childrenList) { 4023 super.listChildren(childrenList); 4024 childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, java.lang.Integer.MAX_VALUE, resource)); 4025 childrenList.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); 4026 } 4027 4028 @Override 4029 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4030 switch (hash) { 4031 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 4032 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // RulesetRuleComponent 4033 default: return super.getProperty(hash, name, checkValid); 4034 } 4035 4036 } 4037 4038 @Override 4039 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4040 switch (hash) { 4041 case -341064690: // resource 4042 this.resource = castToReference(value); // Reference 4043 return value; 4044 case 3512060: // rule 4045 this.getRule().add((RulesetRuleComponent) value); // RulesetRuleComponent 4046 return value; 4047 default: return super.setProperty(hash, name, value); 4048 } 4049 4050 } 4051 4052 @Override 4053 public Base setProperty(String name, Base value) throws FHIRException { 4054 if (name.equals("resource")) { 4055 this.resource = castToReference(value); // Reference 4056 } else if (name.equals("rule")) { 4057 this.getRule().add((RulesetRuleComponent) value); 4058 } else 4059 return super.setProperty(name, value); 4060 return value; 4061 } 4062 4063 @Override 4064 public Base makeProperty(int hash, String name) throws FHIRException { 4065 switch (hash) { 4066 case -341064690: return getResource(); 4067 case 3512060: return addRule(); 4068 default: return super.makeProperty(hash, name); 4069 } 4070 4071 } 4072 4073 @Override 4074 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4075 switch (hash) { 4076 case -341064690: /*resource*/ return new String[] {"Reference"}; 4077 case 3512060: /*rule*/ return new String[] {}; 4078 default: return super.getTypesForProperty(hash, name); 4079 } 4080 4081 } 4082 4083 @Override 4084 public Base addChild(String name) throws FHIRException { 4085 if (name.equals("resource")) { 4086 this.resource = new Reference(); 4087 return this.resource; 4088 } 4089 else if (name.equals("rule")) { 4090 return addRule(); 4091 } 4092 else 4093 return super.addChild(name); 4094 } 4095 4096 public TestScriptRulesetComponent copy() { 4097 TestScriptRulesetComponent dst = new TestScriptRulesetComponent(); 4098 copyValues(dst); 4099 dst.resource = resource == null ? null : resource.copy(); 4100 if (rule != null) { 4101 dst.rule = new ArrayList<RulesetRuleComponent>(); 4102 for (RulesetRuleComponent i : rule) 4103 dst.rule.add(i.copy()); 4104 }; 4105 return dst; 4106 } 4107 4108 @Override 4109 public boolean equalsDeep(Base other) { 4110 if (!super.equalsDeep(other)) 4111 return false; 4112 if (!(other instanceof TestScriptRulesetComponent)) 4113 return false; 4114 TestScriptRulesetComponent o = (TestScriptRulesetComponent) other; 4115 return compareDeep(resource, o.resource, true) && compareDeep(rule, o.rule, true); 4116 } 4117 4118 @Override 4119 public boolean equalsShallow(Base other) { 4120 if (!super.equalsShallow(other)) 4121 return false; 4122 if (!(other instanceof TestScriptRulesetComponent)) 4123 return false; 4124 TestScriptRulesetComponent o = (TestScriptRulesetComponent) other; 4125 return true; 4126 } 4127 4128 public boolean isEmpty() { 4129 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, rule); 4130 } 4131 4132 public String fhirType() { 4133 return "TestScript.ruleset"; 4134 4135 } 4136 4137 } 4138 4139 @Block() 4140 public static class RulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { 4141 /** 4142 * Id of the referenced rule within the external ruleset template. 4143 */ 4144 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4145 @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) 4146 protected IdType ruleId; 4147 4148 /** 4149 * Each rule template can take one or more parameters for rule evaluation. 4150 */ 4151 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4152 @Description(shortDefinition="Ruleset rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 4153 protected List<RulesetRuleParamComponent> param; 4154 4155 private static final long serialVersionUID = -1399866981L; 4156 4157 /** 4158 * Constructor 4159 */ 4160 public RulesetRuleComponent() { 4161 super(); 4162 } 4163 4164 /** 4165 * Constructor 4166 */ 4167 public RulesetRuleComponent(IdType ruleId) { 4168 super(); 4169 this.ruleId = ruleId; 4170 } 4171 4172 /** 4173 * @return {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 4174 */ 4175 public IdType getRuleIdElement() { 4176 if (this.ruleId == null) 4177 if (Configuration.errorOnAutoCreate()) 4178 throw new Error("Attempt to auto-create RulesetRuleComponent.ruleId"); 4179 else if (Configuration.doAutoCreate()) 4180 this.ruleId = new IdType(); // bb 4181 return this.ruleId; 4182 } 4183 4184 public boolean hasRuleIdElement() { 4185 return this.ruleId != null && !this.ruleId.isEmpty(); 4186 } 4187 4188 public boolean hasRuleId() { 4189 return this.ruleId != null && !this.ruleId.isEmpty(); 4190 } 4191 4192 /** 4193 * @param value {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 4194 */ 4195 public RulesetRuleComponent setRuleIdElement(IdType value) { 4196 this.ruleId = value; 4197 return this; 4198 } 4199 4200 /** 4201 * @return Id of the referenced rule within the external ruleset template. 4202 */ 4203 public String getRuleId() { 4204 return this.ruleId == null ? null : this.ruleId.getValue(); 4205 } 4206 4207 /** 4208 * @param value Id of the referenced rule within the external ruleset template. 4209 */ 4210 public RulesetRuleComponent setRuleId(String value) { 4211 if (this.ruleId == null) 4212 this.ruleId = new IdType(); 4213 this.ruleId.setValue(value); 4214 return this; 4215 } 4216 4217 /** 4218 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 4219 */ 4220 public List<RulesetRuleParamComponent> getParam() { 4221 if (this.param == null) 4222 this.param = new ArrayList<RulesetRuleParamComponent>(); 4223 return this.param; 4224 } 4225 4226 /** 4227 * @return Returns a reference to <code>this</code> for easy method chaining 4228 */ 4229 public RulesetRuleComponent setParam(List<RulesetRuleParamComponent> theParam) { 4230 this.param = theParam; 4231 return this; 4232 } 4233 4234 public boolean hasParam() { 4235 if (this.param == null) 4236 return false; 4237 for (RulesetRuleParamComponent item : this.param) 4238 if (!item.isEmpty()) 4239 return true; 4240 return false; 4241 } 4242 4243 public RulesetRuleParamComponent addParam() { //3 4244 RulesetRuleParamComponent t = new RulesetRuleParamComponent(); 4245 if (this.param == null) 4246 this.param = new ArrayList<RulesetRuleParamComponent>(); 4247 this.param.add(t); 4248 return t; 4249 } 4250 4251 public RulesetRuleComponent addParam(RulesetRuleParamComponent t) { //3 4252 if (t == null) 4253 return this; 4254 if (this.param == null) 4255 this.param = new ArrayList<RulesetRuleParamComponent>(); 4256 this.param.add(t); 4257 return this; 4258 } 4259 4260 /** 4261 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 4262 */ 4263 public RulesetRuleParamComponent getParamFirstRep() { 4264 if (getParam().isEmpty()) { 4265 addParam(); 4266 } 4267 return getParam().get(0); 4268 } 4269 4270 protected void listChildren(List<Property> childrenList) { 4271 super.listChildren(childrenList); 4272 childrenList.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, ruleId)); 4273 childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 4274 } 4275 4276 @Override 4277 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4278 switch (hash) { 4279 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 4280 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RulesetRuleParamComponent 4281 default: return super.getProperty(hash, name, checkValid); 4282 } 4283 4284 } 4285 4286 @Override 4287 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4288 switch (hash) { 4289 case -919875273: // ruleId 4290 this.ruleId = castToId(value); // IdType 4291 return value; 4292 case 106436749: // param 4293 this.getParam().add((RulesetRuleParamComponent) value); // RulesetRuleParamComponent 4294 return value; 4295 default: return super.setProperty(hash, name, value); 4296 } 4297 4298 } 4299 4300 @Override 4301 public Base setProperty(String name, Base value) throws FHIRException { 4302 if (name.equals("ruleId")) { 4303 this.ruleId = castToId(value); // IdType 4304 } else if (name.equals("param")) { 4305 this.getParam().add((RulesetRuleParamComponent) value); 4306 } else 4307 return super.setProperty(name, value); 4308 return value; 4309 } 4310 4311 @Override 4312 public Base makeProperty(int hash, String name) throws FHIRException { 4313 switch (hash) { 4314 case -919875273: return getRuleIdElement(); 4315 case 106436749: return addParam(); 4316 default: return super.makeProperty(hash, name); 4317 } 4318 4319 } 4320 4321 @Override 4322 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4323 switch (hash) { 4324 case -919875273: /*ruleId*/ return new String[] {"id"}; 4325 case 106436749: /*param*/ return new String[] {}; 4326 default: return super.getTypesForProperty(hash, name); 4327 } 4328 4329 } 4330 4331 @Override 4332 public Base addChild(String name) throws FHIRException { 4333 if (name.equals("ruleId")) { 4334 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 4335 } 4336 else if (name.equals("param")) { 4337 return addParam(); 4338 } 4339 else 4340 return super.addChild(name); 4341 } 4342 4343 public RulesetRuleComponent copy() { 4344 RulesetRuleComponent dst = new RulesetRuleComponent(); 4345 copyValues(dst); 4346 dst.ruleId = ruleId == null ? null : ruleId.copy(); 4347 if (param != null) { 4348 dst.param = new ArrayList<RulesetRuleParamComponent>(); 4349 for (RulesetRuleParamComponent i : param) 4350 dst.param.add(i.copy()); 4351 }; 4352 return dst; 4353 } 4354 4355 @Override 4356 public boolean equalsDeep(Base other) { 4357 if (!super.equalsDeep(other)) 4358 return false; 4359 if (!(other instanceof RulesetRuleComponent)) 4360 return false; 4361 RulesetRuleComponent o = (RulesetRuleComponent) other; 4362 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 4363 } 4364 4365 @Override 4366 public boolean equalsShallow(Base other) { 4367 if (!super.equalsShallow(other)) 4368 return false; 4369 if (!(other instanceof RulesetRuleComponent)) 4370 return false; 4371 RulesetRuleComponent o = (RulesetRuleComponent) other; 4372 return compareValues(ruleId, o.ruleId, true); 4373 } 4374 4375 public boolean isEmpty() { 4376 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 4377 } 4378 4379 public String fhirType() { 4380 return "TestScript.ruleset.rule"; 4381 4382 } 4383 4384 } 4385 4386 @Block() 4387 public static class RulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 4388 /** 4389 * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4390 */ 4391 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4392 @Description(shortDefinition="Parameter name matching external assert ruleset rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert ruleset rule parameter name." ) 4393 protected StringType name; 4394 4395 /** 4396 * The value for the parameter that will be passed on to the external ruleset rule template. 4397 */ 4398 @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4399 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external ruleset rule template." ) 4400 protected StringType value; 4401 4402 private static final long serialVersionUID = 395259392L; 4403 4404 /** 4405 * Constructor 4406 */ 4407 public RulesetRuleParamComponent() { 4408 super(); 4409 } 4410 4411 /** 4412 * Constructor 4413 */ 4414 public RulesetRuleParamComponent(StringType name) { 4415 super(); 4416 this.name = name; 4417 } 4418 4419 /** 4420 * @return {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 4421 */ 4422 public StringType getNameElement() { 4423 if (this.name == null) 4424 if (Configuration.errorOnAutoCreate()) 4425 throw new Error("Attempt to auto-create RulesetRuleParamComponent.name"); 4426 else if (Configuration.doAutoCreate()) 4427 this.name = new StringType(); // bb 4428 return this.name; 4429 } 4430 4431 public boolean hasNameElement() { 4432 return this.name != null && !this.name.isEmpty(); 4433 } 4434 4435 public boolean hasName() { 4436 return this.name != null && !this.name.isEmpty(); 4437 } 4438 4439 /** 4440 * @param value {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 4441 */ 4442 public RulesetRuleParamComponent setNameElement(StringType value) { 4443 this.name = value; 4444 return this; 4445 } 4446 4447 /** 4448 * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4449 */ 4450 public String getName() { 4451 return this.name == null ? null : this.name.getValue(); 4452 } 4453 4454 /** 4455 * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4456 */ 4457 public RulesetRuleParamComponent setName(String value) { 4458 if (this.name == null) 4459 this.name = new StringType(); 4460 this.name.setValue(value); 4461 return this; 4462 } 4463 4464 /** 4465 * @return {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 4466 */ 4467 public StringType getValueElement() { 4468 if (this.value == null) 4469 if (Configuration.errorOnAutoCreate()) 4470 throw new Error("Attempt to auto-create RulesetRuleParamComponent.value"); 4471 else if (Configuration.doAutoCreate()) 4472 this.value = new StringType(); // bb 4473 return this.value; 4474 } 4475 4476 public boolean hasValueElement() { 4477 return this.value != null && !this.value.isEmpty(); 4478 } 4479 4480 public boolean hasValue() { 4481 return this.value != null && !this.value.isEmpty(); 4482 } 4483 4484 /** 4485 * @param value {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 4486 */ 4487 public RulesetRuleParamComponent setValueElement(StringType value) { 4488 this.value = value; 4489 return this; 4490 } 4491 4492 /** 4493 * @return The value for the parameter that will be passed on to the external ruleset rule template. 4494 */ 4495 public String getValue() { 4496 return this.value == null ? null : this.value.getValue(); 4497 } 4498 4499 /** 4500 * @param value The value for the parameter that will be passed on to the external ruleset rule template. 4501 */ 4502 public RulesetRuleParamComponent setValue(String value) { 4503 if (Utilities.noString(value)) 4504 this.value = null; 4505 else { 4506 if (this.value == null) 4507 this.value = new StringType(); 4508 this.value.setValue(value); 4509 } 4510 return this; 4511 } 4512 4513 protected void listChildren(List<Property> childrenList) { 4514 super.listChildren(childrenList); 4515 childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); 4516 childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, java.lang.Integer.MAX_VALUE, value)); 4517 } 4518 4519 @Override 4520 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4521 switch (hash) { 4522 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 4523 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 4524 default: return super.getProperty(hash, name, checkValid); 4525 } 4526 4527 } 4528 4529 @Override 4530 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4531 switch (hash) { 4532 case 3373707: // name 4533 this.name = castToString(value); // StringType 4534 return value; 4535 case 111972721: // value 4536 this.value = castToString(value); // StringType 4537 return value; 4538 default: return super.setProperty(hash, name, value); 4539 } 4540 4541 } 4542 4543 @Override 4544 public Base setProperty(String name, Base value) throws FHIRException { 4545 if (name.equals("name")) { 4546 this.name = castToString(value); // StringType 4547 } else if (name.equals("value")) { 4548 this.value = castToString(value); // StringType 4549 } else 4550 return super.setProperty(name, value); 4551 return value; 4552 } 4553 4554 @Override 4555 public Base makeProperty(int hash, String name) throws FHIRException { 4556 switch (hash) { 4557 case 3373707: return getNameElement(); 4558 case 111972721: return getValueElement(); 4559 default: return super.makeProperty(hash, name); 4560 } 4561 4562 } 4563 4564 @Override 4565 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4566 switch (hash) { 4567 case 3373707: /*name*/ return new String[] {"string"}; 4568 case 111972721: /*value*/ return new String[] {"string"}; 4569 default: return super.getTypesForProperty(hash, name); 4570 } 4571 4572 } 4573 4574 @Override 4575 public Base addChild(String name) throws FHIRException { 4576 if (name.equals("name")) { 4577 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 4578 } 4579 else if (name.equals("value")) { 4580 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 4581 } 4582 else 4583 return super.addChild(name); 4584 } 4585 4586 public RulesetRuleParamComponent copy() { 4587 RulesetRuleParamComponent dst = new RulesetRuleParamComponent(); 4588 copyValues(dst); 4589 dst.name = name == null ? null : name.copy(); 4590 dst.value = value == null ? null : value.copy(); 4591 return dst; 4592 } 4593 4594 @Override 4595 public boolean equalsDeep(Base other) { 4596 if (!super.equalsDeep(other)) 4597 return false; 4598 if (!(other instanceof RulesetRuleParamComponent)) 4599 return false; 4600 RulesetRuleParamComponent o = (RulesetRuleParamComponent) other; 4601 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 4602 } 4603 4604 @Override 4605 public boolean equalsShallow(Base other) { 4606 if (!super.equalsShallow(other)) 4607 return false; 4608 if (!(other instanceof RulesetRuleParamComponent)) 4609 return false; 4610 RulesetRuleParamComponent o = (RulesetRuleParamComponent) other; 4611 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 4612 } 4613 4614 public boolean isEmpty() { 4615 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 4616 } 4617 4618 public String fhirType() { 4619 return "TestScript.ruleset.rule.param"; 4620 4621 } 4622 4623 } 4624 4625 @Block() 4626 public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement { 4627 /** 4628 * Action would contain either an operation or an assertion. 4629 */ 4630 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4631 @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 4632 protected List<SetupActionComponent> action; 4633 4634 private static final long serialVersionUID = -123374486L; 4635 4636 /** 4637 * Constructor 4638 */ 4639 public TestScriptSetupComponent() { 4640 super(); 4641 } 4642 4643 /** 4644 * @return {@link #action} (Action would contain either an operation or an assertion.) 4645 */ 4646 public List<SetupActionComponent> getAction() { 4647 if (this.action == null) 4648 this.action = new ArrayList<SetupActionComponent>(); 4649 return this.action; 4650 } 4651 4652 /** 4653 * @return Returns a reference to <code>this</code> for easy method chaining 4654 */ 4655 public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) { 4656 this.action = theAction; 4657 return this; 4658 } 4659 4660 public boolean hasAction() { 4661 if (this.action == null) 4662 return false; 4663 for (SetupActionComponent item : this.action) 4664 if (!item.isEmpty()) 4665 return true; 4666 return false; 4667 } 4668 4669 public SetupActionComponent addAction() { //3 4670 SetupActionComponent t = new SetupActionComponent(); 4671 if (this.action == null) 4672 this.action = new ArrayList<SetupActionComponent>(); 4673 this.action.add(t); 4674 return t; 4675 } 4676 4677 public TestScriptSetupComponent addAction(SetupActionComponent t) { //3 4678 if (t == null) 4679 return this; 4680 if (this.action == null) 4681 this.action = new ArrayList<SetupActionComponent>(); 4682 this.action.add(t); 4683 return this; 4684 } 4685 4686 /** 4687 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 4688 */ 4689 public SetupActionComponent getActionFirstRep() { 4690 if (getAction().isEmpty()) { 4691 addAction(); 4692 } 4693 return getAction().get(0); 4694 } 4695 4696 protected void listChildren(List<Property> childrenList) { 4697 super.listChildren(childrenList); 4698 childrenList.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 4699 } 4700 4701 @Override 4702 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4703 switch (hash) { 4704 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent 4705 default: return super.getProperty(hash, name, checkValid); 4706 } 4707 4708 } 4709 4710 @Override 4711 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4712 switch (hash) { 4713 case -1422950858: // action 4714 this.getAction().add((SetupActionComponent) value); // SetupActionComponent 4715 return value; 4716 default: return super.setProperty(hash, name, value); 4717 } 4718 4719 } 4720 4721 @Override 4722 public Base setProperty(String name, Base value) throws FHIRException { 4723 if (name.equals("action")) { 4724 this.getAction().add((SetupActionComponent) value); 4725 } else 4726 return super.setProperty(name, value); 4727 return value; 4728 } 4729 4730 @Override 4731 public Base makeProperty(int hash, String name) throws FHIRException { 4732 switch (hash) { 4733 case -1422950858: return addAction(); 4734 default: return super.makeProperty(hash, name); 4735 } 4736 4737 } 4738 4739 @Override 4740 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4741 switch (hash) { 4742 case -1422950858: /*action*/ return new String[] {}; 4743 default: return super.getTypesForProperty(hash, name); 4744 } 4745 4746 } 4747 4748 @Override 4749 public Base addChild(String name) throws FHIRException { 4750 if (name.equals("action")) { 4751 return addAction(); 4752 } 4753 else 4754 return super.addChild(name); 4755 } 4756 4757 public TestScriptSetupComponent copy() { 4758 TestScriptSetupComponent dst = new TestScriptSetupComponent(); 4759 copyValues(dst); 4760 if (action != null) { 4761 dst.action = new ArrayList<SetupActionComponent>(); 4762 for (SetupActionComponent i : action) 4763 dst.action.add(i.copy()); 4764 }; 4765 return dst; 4766 } 4767 4768 @Override 4769 public boolean equalsDeep(Base other) { 4770 if (!super.equalsDeep(other)) 4771 return false; 4772 if (!(other instanceof TestScriptSetupComponent)) 4773 return false; 4774 TestScriptSetupComponent o = (TestScriptSetupComponent) other; 4775 return compareDeep(action, o.action, true); 4776 } 4777 4778 @Override 4779 public boolean equalsShallow(Base other) { 4780 if (!super.equalsShallow(other)) 4781 return false; 4782 if (!(other instanceof TestScriptSetupComponent)) 4783 return false; 4784 TestScriptSetupComponent o = (TestScriptSetupComponent) other; 4785 return true; 4786 } 4787 4788 public boolean isEmpty() { 4789 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action); 4790 } 4791 4792 public String fhirType() { 4793 return "TestScript.setup"; 4794 4795 } 4796 4797 } 4798 4799 @Block() 4800 public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement { 4801 /** 4802 * The operation to perform. 4803 */ 4804 @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false) 4805 @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." ) 4806 protected SetupActionOperationComponent operation; 4807 4808 /** 4809 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 4810 */ 4811 @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false) 4812 @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 4813 protected SetupActionAssertComponent assert_; 4814 4815 private static final long serialVersionUID = -252088305L; 4816 4817 /** 4818 * Constructor 4819 */ 4820 public SetupActionComponent() { 4821 super(); 4822 } 4823 4824 /** 4825 * @return {@link #operation} (The operation to perform.) 4826 */ 4827 public SetupActionOperationComponent getOperation() { 4828 if (this.operation == null) 4829 if (Configuration.errorOnAutoCreate()) 4830 throw new Error("Attempt to auto-create SetupActionComponent.operation"); 4831 else if (Configuration.doAutoCreate()) 4832 this.operation = new SetupActionOperationComponent(); // cc 4833 return this.operation; 4834 } 4835 4836 public boolean hasOperation() { 4837 return this.operation != null && !this.operation.isEmpty(); 4838 } 4839 4840 /** 4841 * @param value {@link #operation} (The operation to perform.) 4842 */ 4843 public SetupActionComponent setOperation(SetupActionOperationComponent value) { 4844 this.operation = value; 4845 return this; 4846 } 4847 4848 /** 4849 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 4850 */ 4851 public SetupActionAssertComponent getAssert() { 4852 if (this.assert_ == null) 4853 if (Configuration.errorOnAutoCreate()) 4854 throw new Error("Attempt to auto-create SetupActionComponent.assert_"); 4855 else if (Configuration.doAutoCreate()) 4856 this.assert_ = new SetupActionAssertComponent(); // cc 4857 return this.assert_; 4858 } 4859 4860 public boolean hasAssert() { 4861 return this.assert_ != null && !this.assert_.isEmpty(); 4862 } 4863 4864 /** 4865 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 4866 */ 4867 public SetupActionComponent setAssert(SetupActionAssertComponent value) { 4868 this.assert_ = value; 4869 return this; 4870 } 4871 4872 protected void listChildren(List<Property> childrenList) { 4873 super.listChildren(childrenList); 4874 childrenList.add(new Property("operation", "", "The operation to perform.", 0, java.lang.Integer.MAX_VALUE, operation)); 4875 childrenList.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, java.lang.Integer.MAX_VALUE, assert_)); 4876 } 4877 4878 @Override 4879 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4880 switch (hash) { 4881 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 4882 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 4883 default: return super.getProperty(hash, name, checkValid); 4884 } 4885 4886 } 4887 4888 @Override 4889 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4890 switch (hash) { 4891 case 1662702951: // operation 4892 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 4893 return value; 4894 case -1408208058: // assert 4895 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 4896 return value; 4897 default: return super.setProperty(hash, name, value); 4898 } 4899 4900 } 4901 4902 @Override 4903 public Base setProperty(String name, Base value) throws FHIRException { 4904 if (name.equals("operation")) { 4905 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 4906 } else if (name.equals("assert")) { 4907 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 4908 } else 4909 return super.setProperty(name, value); 4910 return value; 4911 } 4912 4913 @Override 4914 public Base makeProperty(int hash, String name) throws FHIRException { 4915 switch (hash) { 4916 case 1662702951: return getOperation(); 4917 case -1408208058: return getAssert(); 4918 default: return super.makeProperty(hash, name); 4919 } 4920 4921 } 4922 4923 @Override 4924 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4925 switch (hash) { 4926 case 1662702951: /*operation*/ return new String[] {}; 4927 case -1408208058: /*assert*/ return new String[] {}; 4928 default: return super.getTypesForProperty(hash, name); 4929 } 4930 4931 } 4932 4933 @Override 4934 public Base addChild(String name) throws FHIRException { 4935 if (name.equals("operation")) { 4936 this.operation = new SetupActionOperationComponent(); 4937 return this.operation; 4938 } 4939 else if (name.equals("assert")) { 4940 this.assert_ = new SetupActionAssertComponent(); 4941 return this.assert_; 4942 } 4943 else 4944 return super.addChild(name); 4945 } 4946 4947 public SetupActionComponent copy() { 4948 SetupActionComponent dst = new SetupActionComponent(); 4949 copyValues(dst); 4950 dst.operation = operation == null ? null : operation.copy(); 4951 dst.assert_ = assert_ == null ? null : assert_.copy(); 4952 return dst; 4953 } 4954 4955 @Override 4956 public boolean equalsDeep(Base other) { 4957 if (!super.equalsDeep(other)) 4958 return false; 4959 if (!(other instanceof SetupActionComponent)) 4960 return false; 4961 SetupActionComponent o = (SetupActionComponent) other; 4962 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 4963 } 4964 4965 @Override 4966 public boolean equalsShallow(Base other) { 4967 if (!super.equalsShallow(other)) 4968 return false; 4969 if (!(other instanceof SetupActionComponent)) 4970 return false; 4971 SetupActionComponent o = (SetupActionComponent) other; 4972 return true; 4973 } 4974 4975 public boolean isEmpty() { 4976 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_); 4977 } 4978 4979 public String fhirType() { 4980 return "TestScript.setup.action"; 4981 4982 } 4983 4984 } 4985 4986 @Block() 4987 public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement { 4988 /** 4989 * Server interaction or operation type. 4990 */ 4991 @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false) 4992 @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." ) 4993 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-operation-codes") 4994 protected Coding type; 4995 4996 /** 4997 * The type of the resource. See http://build.fhir.org/resourcelist.html. 4998 */ 4999 @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5000 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://build.fhir.org/resourcelist.html." ) 5001 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 5002 protected CodeType resource; 5003 5004 /** 5005 * The label would be used for tracking/logging purposes by test engines. 5006 */ 5007 @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5008 @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 5009 protected StringType label; 5010 5011 /** 5012 * The description would be used by test engines for tracking and reporting purposes. 5013 */ 5014 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 5015 @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 5016 protected StringType description; 5017 5018 /** 5019 * The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5020 */ 5021 @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 5022 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Accept' header." ) 5023 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 5024 protected Enumeration<ContentType> accept; 5025 5026 /** 5027 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5028 */ 5029 @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 5030 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 5031 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 5032 protected Enumeration<ContentType> contentType; 5033 5034 /** 5035 * The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5036 */ 5037 @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5038 @Description(shortDefinition="Server responding to the request", formalDefinition="The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section." ) 5039 protected IntegerType destination; 5040 5041 /** 5042 * Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths. 5043 */ 5044 @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) 5045 @Description(shortDefinition="Whether or not to send the request url in encoded format", formalDefinition="Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths." ) 5046 protected BooleanType encodeRequestUrl; 5047 5048 /** 5049 * The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5050 */ 5051 @Child(name = "origin", type = {IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false) 5052 @Description(shortDefinition="Server initiating the request", formalDefinition="The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section." ) 5053 protected IntegerType origin; 5054 5055 /** 5056 * Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5057 */ 5058 @Child(name = "params", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 5059 @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type]. Used to set parts of the request URL explicitly." ) 5060 protected StringType params; 5061 5062 /** 5063 * Header elements would be used to set HTTP headers. 5064 */ 5065 @Child(name = "requestHeader", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5066 @Description(shortDefinition="Each operation can have one or more header elements", formalDefinition="Header elements would be used to set HTTP headers." ) 5067 protected List<SetupActionOperationRequestHeaderComponent> requestHeader; 5068 5069 /** 5070 * The fixture id (maybe new) to map to the request. 5071 */ 5072 @Child(name = "requestId", type = {IdType.class}, order=12, min=0, max=1, modifier=false, summary=false) 5073 @Description(shortDefinition="Fixture Id of mapped request", formalDefinition="The fixture id (maybe new) to map to the request." ) 5074 protected IdType requestId; 5075 5076 /** 5077 * The fixture id (maybe new) to map to the response. 5078 */ 5079 @Child(name = "responseId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false) 5080 @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." ) 5081 protected IdType responseId; 5082 5083 /** 5084 * The id of the fixture used as the body of a PUT or POST request. 5085 */ 5086 @Child(name = "sourceId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false) 5087 @Description(shortDefinition="Fixture Id of body for PUT and POST requests", formalDefinition="The id of the fixture used as the body of a PUT or POST request." ) 5088 protected IdType sourceId; 5089 5090 /** 5091 * Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5092 */ 5093 @Child(name = "targetId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false) 5094 @Description(shortDefinition="Id of fixture used for extracting the [id], [type], and [vid] for GET requests", formalDefinition="Id of fixture used for extracting the [id], [type], and [vid] for GET requests." ) 5095 protected IdType targetId; 5096 5097 /** 5098 * Complete request URL. 5099 */ 5100 @Child(name = "url", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false) 5101 @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." ) 5102 protected StringType url; 5103 5104 private static final long serialVersionUID = -488909648L; 5105 5106 /** 5107 * Constructor 5108 */ 5109 public SetupActionOperationComponent() { 5110 super(); 5111 } 5112 5113 /** 5114 * @return {@link #type} (Server interaction or operation type.) 5115 */ 5116 public Coding getType() { 5117 if (this.type == null) 5118 if (Configuration.errorOnAutoCreate()) 5119 throw new Error("Attempt to auto-create SetupActionOperationComponent.type"); 5120 else if (Configuration.doAutoCreate()) 5121 this.type = new Coding(); // cc 5122 return this.type; 5123 } 5124 5125 public boolean hasType() { 5126 return this.type != null && !this.type.isEmpty(); 5127 } 5128 5129 /** 5130 * @param value {@link #type} (Server interaction or operation type.) 5131 */ 5132 public SetupActionOperationComponent setType(Coding value) { 5133 this.type = value; 5134 return this; 5135 } 5136 5137 /** 5138 * @return {@link #resource} (The type of the resource. See http://build.fhir.org/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 5139 */ 5140 public CodeType getResourceElement() { 5141 if (this.resource == null) 5142 if (Configuration.errorOnAutoCreate()) 5143 throw new Error("Attempt to auto-create SetupActionOperationComponent.resource"); 5144 else if (Configuration.doAutoCreate()) 5145 this.resource = new CodeType(); // bb 5146 return this.resource; 5147 } 5148 5149 public boolean hasResourceElement() { 5150 return this.resource != null && !this.resource.isEmpty(); 5151 } 5152 5153 public boolean hasResource() { 5154 return this.resource != null && !this.resource.isEmpty(); 5155 } 5156 5157 /** 5158 * @param value {@link #resource} (The type of the resource. See http://build.fhir.org/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 5159 */ 5160 public SetupActionOperationComponent setResourceElement(CodeType value) { 5161 this.resource = value; 5162 return this; 5163 } 5164 5165 /** 5166 * @return The type of the resource. See http://build.fhir.org/resourcelist.html. 5167 */ 5168 public String getResource() { 5169 return this.resource == null ? null : this.resource.getValue(); 5170 } 5171 5172 /** 5173 * @param value The type of the resource. See http://build.fhir.org/resourcelist.html. 5174 */ 5175 public SetupActionOperationComponent setResource(String value) { 5176 if (Utilities.noString(value)) 5177 this.resource = null; 5178 else { 5179 if (this.resource == null) 5180 this.resource = new CodeType(); 5181 this.resource.setValue(value); 5182 } 5183 return this; 5184 } 5185 5186 /** 5187 * @return {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 5188 */ 5189 public StringType getLabelElement() { 5190 if (this.label == null) 5191 if (Configuration.errorOnAutoCreate()) 5192 throw new Error("Attempt to auto-create SetupActionOperationComponent.label"); 5193 else if (Configuration.doAutoCreate()) 5194 this.label = new StringType(); // bb 5195 return this.label; 5196 } 5197 5198 public boolean hasLabelElement() { 5199 return this.label != null && !this.label.isEmpty(); 5200 } 5201 5202 public boolean hasLabel() { 5203 return this.label != null && !this.label.isEmpty(); 5204 } 5205 5206 /** 5207 * @param value {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 5208 */ 5209 public SetupActionOperationComponent setLabelElement(StringType value) { 5210 this.label = value; 5211 return this; 5212 } 5213 5214 /** 5215 * @return The label would be used for tracking/logging purposes by test engines. 5216 */ 5217 public String getLabel() { 5218 return this.label == null ? null : this.label.getValue(); 5219 } 5220 5221 /** 5222 * @param value The label would be used for tracking/logging purposes by test engines. 5223 */ 5224 public SetupActionOperationComponent setLabel(String value) { 5225 if (Utilities.noString(value)) 5226 this.label = null; 5227 else { 5228 if (this.label == null) 5229 this.label = new StringType(); 5230 this.label.setValue(value); 5231 } 5232 return this; 5233 } 5234 5235 /** 5236 * @return {@link #description} (The description would be 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 5237 */ 5238 public StringType getDescriptionElement() { 5239 if (this.description == null) 5240 if (Configuration.errorOnAutoCreate()) 5241 throw new Error("Attempt to auto-create SetupActionOperationComponent.description"); 5242 else if (Configuration.doAutoCreate()) 5243 this.description = new StringType(); // bb 5244 return this.description; 5245 } 5246 5247 public boolean hasDescriptionElement() { 5248 return this.description != null && !this.description.isEmpty(); 5249 } 5250 5251 public boolean hasDescription() { 5252 return this.description != null && !this.description.isEmpty(); 5253 } 5254 5255 /** 5256 * @param value {@link #description} (The description would be 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 5257 */ 5258 public SetupActionOperationComponent setDescriptionElement(StringType value) { 5259 this.description = value; 5260 return this; 5261 } 5262 5263 /** 5264 * @return The description would be used by test engines for tracking and reporting purposes. 5265 */ 5266 public String getDescription() { 5267 return this.description == null ? null : this.description.getValue(); 5268 } 5269 5270 /** 5271 * @param value The description would be used by test engines for tracking and reporting purposes. 5272 */ 5273 public SetupActionOperationComponent setDescription(String value) { 5274 if (Utilities.noString(value)) 5275 this.description = null; 5276 else { 5277 if (this.description == null) 5278 this.description = new StringType(); 5279 this.description.setValue(value); 5280 } 5281 return this; 5282 } 5283 5284 /** 5285 * @return {@link #accept} (The content-type or mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value 5286 */ 5287 public Enumeration<ContentType> getAcceptElement() { 5288 if (this.accept == null) 5289 if (Configuration.errorOnAutoCreate()) 5290 throw new Error("Attempt to auto-create SetupActionOperationComponent.accept"); 5291 else if (Configuration.doAutoCreate()) 5292 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 5293 return this.accept; 5294 } 5295 5296 public boolean hasAcceptElement() { 5297 return this.accept != null && !this.accept.isEmpty(); 5298 } 5299 5300 public boolean hasAccept() { 5301 return this.accept != null && !this.accept.isEmpty(); 5302 } 5303 5304 /** 5305 * @param value {@link #accept} (The content-type or mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value 5306 */ 5307 public SetupActionOperationComponent setAcceptElement(Enumeration<ContentType> value) { 5308 this.accept = value; 5309 return this; 5310 } 5311 5312 /** 5313 * @return The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5314 */ 5315 public ContentType getAccept() { 5316 return this.accept == null ? null : this.accept.getValue(); 5317 } 5318 5319 /** 5320 * @param value The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5321 */ 5322 public SetupActionOperationComponent setAccept(ContentType value) { 5323 if (value == null) 5324 this.accept = null; 5325 else { 5326 if (this.accept == null) 5327 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 5328 this.accept.setValue(value); 5329 } 5330 return this; 5331 } 5332 5333 /** 5334 * @return {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 5335 */ 5336 public Enumeration<ContentType> getContentTypeElement() { 5337 if (this.contentType == null) 5338 if (Configuration.errorOnAutoCreate()) 5339 throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType"); 5340 else if (Configuration.doAutoCreate()) 5341 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 5342 return this.contentType; 5343 } 5344 5345 public boolean hasContentTypeElement() { 5346 return this.contentType != null && !this.contentType.isEmpty(); 5347 } 5348 5349 public boolean hasContentType() { 5350 return this.contentType != null && !this.contentType.isEmpty(); 5351 } 5352 5353 /** 5354 * @param value {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 5355 */ 5356 public SetupActionOperationComponent setContentTypeElement(Enumeration<ContentType> value) { 5357 this.contentType = value; 5358 return this; 5359 } 5360 5361 /** 5362 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5363 */ 5364 public ContentType getContentType() { 5365 return this.contentType == null ? null : this.contentType.getValue(); 5366 } 5367 5368 /** 5369 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5370 */ 5371 public SetupActionOperationComponent setContentType(ContentType value) { 5372 if (value == null) 5373 this.contentType = null; 5374 else { 5375 if (this.contentType == null) 5376 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 5377 this.contentType.setValue(value); 5378 } 5379 return this; 5380 } 5381 5382 /** 5383 * @return {@link #destination} (The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value 5384 */ 5385 public IntegerType getDestinationElement() { 5386 if (this.destination == null) 5387 if (Configuration.errorOnAutoCreate()) 5388 throw new Error("Attempt to auto-create SetupActionOperationComponent.destination"); 5389 else if (Configuration.doAutoCreate()) 5390 this.destination = new IntegerType(); // bb 5391 return this.destination; 5392 } 5393 5394 public boolean hasDestinationElement() { 5395 return this.destination != null && !this.destination.isEmpty(); 5396 } 5397 5398 public boolean hasDestination() { 5399 return this.destination != null && !this.destination.isEmpty(); 5400 } 5401 5402 /** 5403 * @param value {@link #destination} (The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value 5404 */ 5405 public SetupActionOperationComponent setDestinationElement(IntegerType value) { 5406 this.destination = value; 5407 return this; 5408 } 5409 5410 /** 5411 * @return The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5412 */ 5413 public int getDestination() { 5414 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 5415 } 5416 5417 /** 5418 * @param value The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5419 */ 5420 public SetupActionOperationComponent setDestination(int value) { 5421 if (this.destination == null) 5422 this.destination = new IntegerType(); 5423 this.destination.setValue(value); 5424 return this; 5425 } 5426 5427 /** 5428 * @return {@link #encodeRequestUrl} (Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.). This is the underlying object with id, value and extensions. The accessor "getEncodeRequestUrl" gives direct access to the value 5429 */ 5430 public BooleanType getEncodeRequestUrlElement() { 5431 if (this.encodeRequestUrl == null) 5432 if (Configuration.errorOnAutoCreate()) 5433 throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl"); 5434 else if (Configuration.doAutoCreate()) 5435 this.encodeRequestUrl = new BooleanType(); // bb 5436 return this.encodeRequestUrl; 5437 } 5438 5439 public boolean hasEncodeRequestUrlElement() { 5440 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 5441 } 5442 5443 public boolean hasEncodeRequestUrl() { 5444 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 5445 } 5446 5447 /** 5448 * @param value {@link #encodeRequestUrl} (Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.). This is the underlying object with id, value and extensions. The accessor "getEncodeRequestUrl" gives direct access to the value 5449 */ 5450 public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 5451 this.encodeRequestUrl = value; 5452 return this; 5453 } 5454 5455 /** 5456 * @return Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths. 5457 */ 5458 public boolean getEncodeRequestUrl() { 5459 return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue(); 5460 } 5461 5462 /** 5463 * @param value Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths. 5464 */ 5465 public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 5466 if (this.encodeRequestUrl == null) 5467 this.encodeRequestUrl = new BooleanType(); 5468 this.encodeRequestUrl.setValue(value); 5469 return this; 5470 } 5471 5472 /** 5473 * @return {@link #origin} (The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.). This is the underlying object with id, value and extensions. The accessor "getOrigin" gives direct access to the value 5474 */ 5475 public IntegerType getOriginElement() { 5476 if (this.origin == null) 5477 if (Configuration.errorOnAutoCreate()) 5478 throw new Error("Attempt to auto-create SetupActionOperationComponent.origin"); 5479 else if (Configuration.doAutoCreate()) 5480 this.origin = new IntegerType(); // bb 5481 return this.origin; 5482 } 5483 5484 public boolean hasOriginElement() { 5485 return this.origin != null && !this.origin.isEmpty(); 5486 } 5487 5488 public boolean hasOrigin() { 5489 return this.origin != null && !this.origin.isEmpty(); 5490 } 5491 5492 /** 5493 * @param value {@link #origin} (The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.). This is the underlying object with id, value and extensions. The accessor "getOrigin" gives direct access to the value 5494 */ 5495 public SetupActionOperationComponent setOriginElement(IntegerType value) { 5496 this.origin = value; 5497 return this; 5498 } 5499 5500 /** 5501 * @return The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5502 */ 5503 public int getOrigin() { 5504 return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue(); 5505 } 5506 5507 /** 5508 * @param value The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5509 */ 5510 public SetupActionOperationComponent setOrigin(int value) { 5511 if (this.origin == null) 5512 this.origin = new IntegerType(); 5513 this.origin.setValue(value); 5514 return this; 5515 } 5516 5517 /** 5518 * @return {@link #params} (Path plus parameters after [type]. Used to set parts of the request URL explicitly.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value 5519 */ 5520 public StringType getParamsElement() { 5521 if (this.params == null) 5522 if (Configuration.errorOnAutoCreate()) 5523 throw new Error("Attempt to auto-create SetupActionOperationComponent.params"); 5524 else if (Configuration.doAutoCreate()) 5525 this.params = new StringType(); // bb 5526 return this.params; 5527 } 5528 5529 public boolean hasParamsElement() { 5530 return this.params != null && !this.params.isEmpty(); 5531 } 5532 5533 public boolean hasParams() { 5534 return this.params != null && !this.params.isEmpty(); 5535 } 5536 5537 /** 5538 * @param value {@link #params} (Path plus parameters after [type]. Used to set parts of the request URL explicitly.). This is the underlying object with id, value and extensions. The accessor "getParams" gives direct access to the value 5539 */ 5540 public SetupActionOperationComponent setParamsElement(StringType value) { 5541 this.params = value; 5542 return this; 5543 } 5544 5545 /** 5546 * @return Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5547 */ 5548 public String getParams() { 5549 return this.params == null ? null : this.params.getValue(); 5550 } 5551 5552 /** 5553 * @param value Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5554 */ 5555 public SetupActionOperationComponent setParams(String value) { 5556 if (Utilities.noString(value)) 5557 this.params = null; 5558 else { 5559 if (this.params == null) 5560 this.params = new StringType(); 5561 this.params.setValue(value); 5562 } 5563 return this; 5564 } 5565 5566 /** 5567 * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) 5568 */ 5569 public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 5570 if (this.requestHeader == null) 5571 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5572 return this.requestHeader; 5573 } 5574 5575 /** 5576 * @return Returns a reference to <code>this</code> for easy method chaining 5577 */ 5578 public SetupActionOperationComponent setRequestHeader(List<SetupActionOperationRequestHeaderComponent> theRequestHeader) { 5579 this.requestHeader = theRequestHeader; 5580 return this; 5581 } 5582 5583 public boolean hasRequestHeader() { 5584 if (this.requestHeader == null) 5585 return false; 5586 for (SetupActionOperationRequestHeaderComponent item : this.requestHeader) 5587 if (!item.isEmpty()) 5588 return true; 5589 return false; 5590 } 5591 5592 public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3 5593 SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent(); 5594 if (this.requestHeader == null) 5595 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5596 this.requestHeader.add(t); 5597 return t; 5598 } 5599 5600 public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3 5601 if (t == null) 5602 return this; 5603 if (this.requestHeader == null) 5604 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5605 this.requestHeader.add(t); 5606 return this; 5607 } 5608 5609 /** 5610 * @return The first repetition of repeating field {@link #requestHeader}, creating it if it does not already exist 5611 */ 5612 public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() { 5613 if (getRequestHeader().isEmpty()) { 5614 addRequestHeader(); 5615 } 5616 return getRequestHeader().get(0); 5617 } 5618 5619 /** 5620 * @return {@link #requestId} (The fixture id (maybe new) to map to the request.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value 5621 */ 5622 public IdType getRequestIdElement() { 5623 if (this.requestId == null) 5624 if (Configuration.errorOnAutoCreate()) 5625 throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId"); 5626 else if (Configuration.doAutoCreate()) 5627 this.requestId = new IdType(); // bb 5628 return this.requestId; 5629 } 5630 5631 public boolean hasRequestIdElement() { 5632 return this.requestId != null && !this.requestId.isEmpty(); 5633 } 5634 5635 public boolean hasRequestId() { 5636 return this.requestId != null && !this.requestId.isEmpty(); 5637 } 5638 5639 /** 5640 * @param value {@link #requestId} (The fixture id (maybe new) to map to the request.). This is the underlying object with id, value and extensions. The accessor "getRequestId" gives direct access to the value 5641 */ 5642 public SetupActionOperationComponent setRequestIdElement(IdType value) { 5643 this.requestId = value; 5644 return this; 5645 } 5646 5647 /** 5648 * @return The fixture id (maybe new) to map to the request. 5649 */ 5650 public String getRequestId() { 5651 return this.requestId == null ? null : this.requestId.getValue(); 5652 } 5653 5654 /** 5655 * @param value The fixture id (maybe new) to map to the request. 5656 */ 5657 public SetupActionOperationComponent setRequestId(String value) { 5658 if (Utilities.noString(value)) 5659 this.requestId = null; 5660 else { 5661 if (this.requestId == null) 5662 this.requestId = new IdType(); 5663 this.requestId.setValue(value); 5664 } 5665 return this; 5666 } 5667 5668 /** 5669 * @return {@link #responseId} (The fixture id (maybe new) to map to the response.). This is the underlying object with id, value and extensions. The accessor "getResponseId" gives direct access to the value 5670 */ 5671 public IdType getResponseIdElement() { 5672 if (this.responseId == null) 5673 if (Configuration.errorOnAutoCreate()) 5674 throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId"); 5675 else if (Configuration.doAutoCreate()) 5676 this.responseId = new IdType(); // bb 5677 return this.responseId; 5678 } 5679 5680 public boolean hasResponseIdElement() { 5681 return this.responseId != null && !this.responseId.isEmpty(); 5682 } 5683 5684 public boolean hasResponseId() { 5685 return this.responseId != null && !this.responseId.isEmpty(); 5686 } 5687 5688 /** 5689 * @param value {@link #responseId} (The fixture id (maybe new) to map to the response.). This is the underlying object with id, value and extensions. The accessor "getResponseId" gives direct access to the value 5690 */ 5691 public SetupActionOperationComponent setResponseIdElement(IdType value) { 5692 this.responseId = value; 5693 return this; 5694 } 5695 5696 /** 5697 * @return The fixture id (maybe new) to map to the response. 5698 */ 5699 public String getResponseId() { 5700 return this.responseId == null ? null : this.responseId.getValue(); 5701 } 5702 5703 /** 5704 * @param value The fixture id (maybe new) to map to the response. 5705 */ 5706 public SetupActionOperationComponent setResponseId(String value) { 5707 if (Utilities.noString(value)) 5708 this.responseId = null; 5709 else { 5710 if (this.responseId == null) 5711 this.responseId = new IdType(); 5712 this.responseId.setValue(value); 5713 } 5714 return this; 5715 } 5716 5717 /** 5718 * @return {@link #sourceId} (The id of the fixture used as the body of a PUT or POST request.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value 5719 */ 5720 public IdType getSourceIdElement() { 5721 if (this.sourceId == null) 5722 if (Configuration.errorOnAutoCreate()) 5723 throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId"); 5724 else if (Configuration.doAutoCreate()) 5725 this.sourceId = new IdType(); // bb 5726 return this.sourceId; 5727 } 5728 5729 public boolean hasSourceIdElement() { 5730 return this.sourceId != null && !this.sourceId.isEmpty(); 5731 } 5732 5733 public boolean hasSourceId() { 5734 return this.sourceId != null && !this.sourceId.isEmpty(); 5735 } 5736 5737 /** 5738 * @param value {@link #sourceId} (The id of the fixture used as the body of a PUT or POST request.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value 5739 */ 5740 public SetupActionOperationComponent setSourceIdElement(IdType value) { 5741 this.sourceId = value; 5742 return this; 5743 } 5744 5745 /** 5746 * @return The id of the fixture used as the body of a PUT or POST request. 5747 */ 5748 public String getSourceId() { 5749 return this.sourceId == null ? null : this.sourceId.getValue(); 5750 } 5751 5752 /** 5753 * @param value The id of the fixture used as the body of a PUT or POST request. 5754 */ 5755 public SetupActionOperationComponent setSourceId(String value) { 5756 if (Utilities.noString(value)) 5757 this.sourceId = null; 5758 else { 5759 if (this.sourceId == null) 5760 this.sourceId = new IdType(); 5761 this.sourceId.setValue(value); 5762 } 5763 return this; 5764 } 5765 5766 /** 5767 * @return {@link #targetId} (Id of fixture used for extracting the [id], [type], and [vid] for GET requests.). This is the underlying object with id, value and extensions. The accessor "getTargetId" gives direct access to the value 5768 */ 5769 public IdType getTargetIdElement() { 5770 if (this.targetId == null) 5771 if (Configuration.errorOnAutoCreate()) 5772 throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId"); 5773 else if (Configuration.doAutoCreate()) 5774 this.targetId = new IdType(); // bb 5775 return this.targetId; 5776 } 5777 5778 public boolean hasTargetIdElement() { 5779 return this.targetId != null && !this.targetId.isEmpty(); 5780 } 5781 5782 public boolean hasTargetId() { 5783 return this.targetId != null && !this.targetId.isEmpty(); 5784 } 5785 5786 /** 5787 * @param value {@link #targetId} (Id of fixture used for extracting the [id], [type], and [vid] for GET requests.). This is the underlying object with id, value and extensions. The accessor "getTargetId" gives direct access to the value 5788 */ 5789 public SetupActionOperationComponent setTargetIdElement(IdType value) { 5790 this.targetId = value; 5791 return this; 5792 } 5793 5794 /** 5795 * @return Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5796 */ 5797 public String getTargetId() { 5798 return this.targetId == null ? null : this.targetId.getValue(); 5799 } 5800 5801 /** 5802 * @param value Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5803 */ 5804 public SetupActionOperationComponent setTargetId(String value) { 5805 if (Utilities.noString(value)) 5806 this.targetId = null; 5807 else { 5808 if (this.targetId == null) 5809 this.targetId = new IdType(); 5810 this.targetId.setValue(value); 5811 } 5812 return this; 5813 } 5814 5815 /** 5816 * @return {@link #url} (Complete request URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 5817 */ 5818 public StringType getUrlElement() { 5819 if (this.url == null) 5820 if (Configuration.errorOnAutoCreate()) 5821 throw new Error("Attempt to auto-create SetupActionOperationComponent.url"); 5822 else if (Configuration.doAutoCreate()) 5823 this.url = new StringType(); // bb 5824 return this.url; 5825 } 5826 5827 public boolean hasUrlElement() { 5828 return this.url != null && !this.url.isEmpty(); 5829 } 5830 5831 public boolean hasUrl() { 5832 return this.url != null && !this.url.isEmpty(); 5833 } 5834 5835 /** 5836 * @param value {@link #url} (Complete request URL.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 5837 */ 5838 public SetupActionOperationComponent setUrlElement(StringType value) { 5839 this.url = value; 5840 return this; 5841 } 5842 5843 /** 5844 * @return Complete request URL. 5845 */ 5846 public String getUrl() { 5847 return this.url == null ? null : this.url.getValue(); 5848 } 5849 5850 /** 5851 * @param value Complete request URL. 5852 */ 5853 public SetupActionOperationComponent setUrl(String value) { 5854 if (Utilities.noString(value)) 5855 this.url = null; 5856 else { 5857 if (this.url == null) 5858 this.url = new StringType(); 5859 this.url.setValue(value); 5860 } 5861 return this; 5862 } 5863 5864 protected void listChildren(List<Property> childrenList) { 5865 super.listChildren(childrenList); 5866 childrenList.add(new Property("type", "Coding", "Server interaction or operation type.", 0, java.lang.Integer.MAX_VALUE, type)); 5867 childrenList.add(new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, java.lang.Integer.MAX_VALUE, resource)); 5868 childrenList.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, label)); 5869 childrenList.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); 5870 childrenList.add(new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, java.lang.Integer.MAX_VALUE, accept)); 5871 childrenList.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, java.lang.Integer.MAX_VALUE, contentType)); 5872 childrenList.add(new Property("destination", "integer", "The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.", 0, java.lang.Integer.MAX_VALUE, destination)); 5873 childrenList.add(new Property("encodeRequestUrl", "boolean", "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.", 0, java.lang.Integer.MAX_VALUE, encodeRequestUrl)); 5874 childrenList.add(new Property("origin", "integer", "The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.", 0, java.lang.Integer.MAX_VALUE, origin)); 5875 childrenList.add(new Property("params", "string", "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", 0, java.lang.Integer.MAX_VALUE, params)); 5876 childrenList.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader)); 5877 childrenList.add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, java.lang.Integer.MAX_VALUE, requestId)); 5878 childrenList.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, java.lang.Integer.MAX_VALUE, responseId)); 5879 childrenList.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, java.lang.Integer.MAX_VALUE, sourceId)); 5880 childrenList.add(new Property("targetId", "id", "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", 0, java.lang.Integer.MAX_VALUE, targetId)); 5881 childrenList.add(new Property("url", "string", "Complete request URL.", 0, java.lang.Integer.MAX_VALUE, url)); 5882 } 5883 5884 @Override 5885 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5886 switch (hash) { 5887 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 5888 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 5889 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 5890 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 5891 case -1423461112: /*accept*/ return this.accept == null ? new Base[0] : new Base[] {this.accept}; // Enumeration<ContentType> 5892 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType> 5893 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 5894 case -1760554218: /*encodeRequestUrl*/ return this.encodeRequestUrl == null ? new Base[0] : new Base[] {this.encodeRequestUrl}; // BooleanType 5895 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // IntegerType 5896 case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType 5897 case 1074158076: /*requestHeader*/ return this.requestHeader == null ? new Base[0] : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent 5898 case 693933066: /*requestId*/ return this.requestId == null ? new Base[0] : new Base[] {this.requestId}; // IdType 5899 case -633138884: /*responseId*/ return this.responseId == null ? new Base[0] : new Base[] {this.responseId}; // IdType 5900 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 5901 case -441951604: /*targetId*/ return this.targetId == null ? new Base[0] : new Base[] {this.targetId}; // IdType 5902 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // StringType 5903 default: return super.getProperty(hash, name, checkValid); 5904 } 5905 5906 } 5907 5908 @Override 5909 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5910 switch (hash) { 5911 case 3575610: // type 5912 this.type = castToCoding(value); // Coding 5913 return value; 5914 case -341064690: // resource 5915 this.resource = castToCode(value); // CodeType 5916 return value; 5917 case 102727412: // label 5918 this.label = castToString(value); // StringType 5919 return value; 5920 case -1724546052: // description 5921 this.description = castToString(value); // StringType 5922 return value; 5923 case -1423461112: // accept 5924 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 5925 this.accept = (Enumeration) value; // Enumeration<ContentType> 5926 return value; 5927 case -389131437: // contentType 5928 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 5929 this.contentType = (Enumeration) value; // Enumeration<ContentType> 5930 return value; 5931 case -1429847026: // destination 5932 this.destination = castToInteger(value); // IntegerType 5933 return value; 5934 case -1760554218: // encodeRequestUrl 5935 this.encodeRequestUrl = castToBoolean(value); // BooleanType 5936 return value; 5937 case -1008619738: // origin 5938 this.origin = castToInteger(value); // IntegerType 5939 return value; 5940 case -995427962: // params 5941 this.params = castToString(value); // StringType 5942 return value; 5943 case 1074158076: // requestHeader 5944 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent 5945 return value; 5946 case 693933066: // requestId 5947 this.requestId = castToId(value); // IdType 5948 return value; 5949 case -633138884: // responseId 5950 this.responseId = castToId(value); // IdType 5951 return value; 5952 case 1746327190: // sourceId 5953 this.sourceId = castToId(value); // IdType 5954 return value; 5955 case -441951604: // targetId 5956 this.targetId = castToId(value); // IdType 5957 return value; 5958 case 116079: // url 5959 this.url = castToString(value); // StringType 5960 return value; 5961 default: return super.setProperty(hash, name, value); 5962 } 5963 5964 } 5965 5966 @Override 5967 public Base setProperty(String name, Base value) throws FHIRException { 5968 if (name.equals("type")) { 5969 this.type = castToCoding(value); // Coding 5970 } else if (name.equals("resource")) { 5971 this.resource = castToCode(value); // CodeType 5972 } else if (name.equals("label")) { 5973 this.label = castToString(value); // StringType 5974 } else if (name.equals("description")) { 5975 this.description = castToString(value); // StringType 5976 } else if (name.equals("accept")) { 5977 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 5978 this.accept = (Enumeration) value; // Enumeration<ContentType> 5979 } else if (name.equals("contentType")) { 5980 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 5981 this.contentType = (Enumeration) value; // Enumeration<ContentType> 5982 } else if (name.equals("destination")) { 5983 this.destination = castToInteger(value); // IntegerType 5984 } else if (name.equals("encodeRequestUrl")) { 5985 this.encodeRequestUrl = castToBoolean(value); // BooleanType 5986 } else if (name.equals("origin")) { 5987 this.origin = castToInteger(value); // IntegerType 5988 } else if (name.equals("params")) { 5989 this.params = castToString(value); // StringType 5990 } else if (name.equals("requestHeader")) { 5991 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); 5992 } else if (name.equals("requestId")) { 5993 this.requestId = castToId(value); // IdType 5994 } else if (name.equals("responseId")) { 5995 this.responseId = castToId(value); // IdType 5996 } else if (name.equals("sourceId")) { 5997 this.sourceId = castToId(value); // IdType 5998 } else if (name.equals("targetId")) { 5999 this.targetId = castToId(value); // IdType 6000 } else if (name.equals("url")) { 6001 this.url = castToString(value); // StringType 6002 } else 6003 return super.setProperty(name, value); 6004 return value; 6005 } 6006 6007 @Override 6008 public Base makeProperty(int hash, String name) throws FHIRException { 6009 switch (hash) { 6010 case 3575610: return getType(); 6011 case -341064690: return getResourceElement(); 6012 case 102727412: return getLabelElement(); 6013 case -1724546052: return getDescriptionElement(); 6014 case -1423461112: return getAcceptElement(); 6015 case -389131437: return getContentTypeElement(); 6016 case -1429847026: return getDestinationElement(); 6017 case -1760554218: return getEncodeRequestUrlElement(); 6018 case -1008619738: return getOriginElement(); 6019 case -995427962: return getParamsElement(); 6020 case 1074158076: return addRequestHeader(); 6021 case 693933066: return getRequestIdElement(); 6022 case -633138884: return getResponseIdElement(); 6023 case 1746327190: return getSourceIdElement(); 6024 case -441951604: return getTargetIdElement(); 6025 case 116079: return getUrlElement(); 6026 default: return super.makeProperty(hash, name); 6027 } 6028 6029 } 6030 6031 @Override 6032 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6033 switch (hash) { 6034 case 3575610: /*type*/ return new String[] {"Coding"}; 6035 case -341064690: /*resource*/ return new String[] {"code"}; 6036 case 102727412: /*label*/ return new String[] {"string"}; 6037 case -1724546052: /*description*/ return new String[] {"string"}; 6038 case -1423461112: /*accept*/ return new String[] {"code"}; 6039 case -389131437: /*contentType*/ return new String[] {"code"}; 6040 case -1429847026: /*destination*/ return new String[] {"integer"}; 6041 case -1760554218: /*encodeRequestUrl*/ return new String[] {"boolean"}; 6042 case -1008619738: /*origin*/ return new String[] {"integer"}; 6043 case -995427962: /*params*/ return new String[] {"string"}; 6044 case 1074158076: /*requestHeader*/ return new String[] {}; 6045 case 693933066: /*requestId*/ return new String[] {"id"}; 6046 case -633138884: /*responseId*/ return new String[] {"id"}; 6047 case 1746327190: /*sourceId*/ return new String[] {"id"}; 6048 case -441951604: /*targetId*/ return new String[] {"id"}; 6049 case 116079: /*url*/ return new String[] {"string"}; 6050 default: return super.getTypesForProperty(hash, name); 6051 } 6052 6053 } 6054 6055 @Override 6056 public Base addChild(String name) throws FHIRException { 6057 if (name.equals("type")) { 6058 this.type = new Coding(); 6059 return this.type; 6060 } 6061 else if (name.equals("resource")) { 6062 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 6063 } 6064 else if (name.equals("label")) { 6065 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 6066 } 6067 else if (name.equals("description")) { 6068 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 6069 } 6070 else if (name.equals("accept")) { 6071 throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept"); 6072 } 6073 else if (name.equals("contentType")) { 6074 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 6075 } 6076 else if (name.equals("destination")) { 6077 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 6078 } 6079 else if (name.equals("encodeRequestUrl")) { 6080 throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl"); 6081 } 6082 else if (name.equals("origin")) { 6083 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 6084 } 6085 else if (name.equals("params")) { 6086 throw new FHIRException("Cannot call addChild on a primitive type TestScript.params"); 6087 } 6088 else if (name.equals("requestHeader")) { 6089 return addRequestHeader(); 6090 } 6091 else if (name.equals("requestId")) { 6092 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestId"); 6093 } 6094 else if (name.equals("responseId")) { 6095 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId"); 6096 } 6097 else if (name.equals("sourceId")) { 6098 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 6099 } 6100 else if (name.equals("targetId")) { 6101 throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId"); 6102 } 6103 else if (name.equals("url")) { 6104 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 6105 } 6106 else 6107 return super.addChild(name); 6108 } 6109 6110 public SetupActionOperationComponent copy() { 6111 SetupActionOperationComponent dst = new SetupActionOperationComponent(); 6112 copyValues(dst); 6113 dst.type = type == null ? null : type.copy(); 6114 dst.resource = resource == null ? null : resource.copy(); 6115 dst.label = label == null ? null : label.copy(); 6116 dst.description = description == null ? null : description.copy(); 6117 dst.accept = accept == null ? null : accept.copy(); 6118 dst.contentType = contentType == null ? null : contentType.copy(); 6119 dst.destination = destination == null ? null : destination.copy(); 6120 dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy(); 6121 dst.origin = origin == null ? null : origin.copy(); 6122 dst.params = params == null ? null : params.copy(); 6123 if (requestHeader != null) { 6124 dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 6125 for (SetupActionOperationRequestHeaderComponent i : requestHeader) 6126 dst.requestHeader.add(i.copy()); 6127 }; 6128 dst.requestId = requestId == null ? null : requestId.copy(); 6129 dst.responseId = responseId == null ? null : responseId.copy(); 6130 dst.sourceId = sourceId == null ? null : sourceId.copy(); 6131 dst.targetId = targetId == null ? null : targetId.copy(); 6132 dst.url = url == null ? null : url.copy(); 6133 return dst; 6134 } 6135 6136 @Override 6137 public boolean equalsDeep(Base other) { 6138 if (!super.equalsDeep(other)) 6139 return false; 6140 if (!(other instanceof SetupActionOperationComponent)) 6141 return false; 6142 SetupActionOperationComponent o = (SetupActionOperationComponent) other; 6143 return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true) 6144 && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true) 6145 && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true) 6146 && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true) 6147 && compareDeep(requestId, o.requestId, true) && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true) 6148 && compareDeep(targetId, o.targetId, true) && compareDeep(url, o.url, true); 6149 } 6150 6151 @Override 6152 public boolean equalsShallow(Base other) { 6153 if (!super.equalsShallow(other)) 6154 return false; 6155 if (!(other instanceof SetupActionOperationComponent)) 6156 return false; 6157 SetupActionOperationComponent o = (SetupActionOperationComponent) other; 6158 return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true) 6159 && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true) 6160 && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(origin, o.origin, true) 6161 && compareValues(params, o.params, true) && compareValues(requestId, o.requestId, true) && compareValues(responseId, o.responseId, true) 6162 && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true) && compareValues(url, o.url, true) 6163 ; 6164 } 6165 6166 public boolean isEmpty() { 6167 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description 6168 , accept, contentType, destination, encodeRequestUrl, origin, params, requestHeader 6169 , requestId, responseId, sourceId, targetId, url); 6170 } 6171 6172 public String fhirType() { 6173 return "TestScript.setup.action.operation"; 6174 6175 } 6176 6177 } 6178 6179 @Block() 6180 public static class SetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement { 6181 /** 6182 * The HTTP header field e.g. "Accept". 6183 */ 6184 @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 6185 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." ) 6186 protected StringType field; 6187 6188 /** 6189 * The value of the header e.g. "application/fhir+xml". 6190 */ 6191 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 6192 @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/fhir+xml\"." ) 6193 protected StringType value; 6194 6195 private static final long serialVersionUID = 274395337L; 6196 6197 /** 6198 * Constructor 6199 */ 6200 public SetupActionOperationRequestHeaderComponent() { 6201 super(); 6202 } 6203 6204 /** 6205 * Constructor 6206 */ 6207 public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) { 6208 super(); 6209 this.field = field; 6210 this.value = value; 6211 } 6212 6213 /** 6214 * @return {@link #field} (The HTTP header field e.g. "Accept".). This is the underlying object with id, value and extensions. The accessor "getField" gives direct access to the value 6215 */ 6216 public StringType getFieldElement() { 6217 if (this.field == null) 6218 if (Configuration.errorOnAutoCreate()) 6219 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field"); 6220 else if (Configuration.doAutoCreate()) 6221 this.field = new StringType(); // bb 6222 return this.field; 6223 } 6224 6225 public boolean hasFieldElement() { 6226 return this.field != null && !this.field.isEmpty(); 6227 } 6228 6229 public boolean hasField() { 6230 return this.field != null && !this.field.isEmpty(); 6231 } 6232 6233 /** 6234 * @param value {@link #field} (The HTTP header field e.g. "Accept".). This is the underlying object with id, value and extensions. The accessor "getField" gives direct access to the value 6235 */ 6236 public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 6237 this.field = value; 6238 return this; 6239 } 6240 6241 /** 6242 * @return The HTTP header field e.g. "Accept". 6243 */ 6244 public String getField() { 6245 return this.field == null ? null : this.field.getValue(); 6246 } 6247 6248 /** 6249 * @param value The HTTP header field e.g. "Accept". 6250 */ 6251 public SetupActionOperationRequestHeaderComponent setField(String value) { 6252 if (this.field == null) 6253 this.field = new StringType(); 6254 this.field.setValue(value); 6255 return this; 6256 } 6257 6258 /** 6259 * @return {@link #value} (The value of the header e.g. "application/fhir+xml".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 6260 */ 6261 public StringType getValueElement() { 6262 if (this.value == null) 6263 if (Configuration.errorOnAutoCreate()) 6264 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value"); 6265 else if (Configuration.doAutoCreate()) 6266 this.value = new StringType(); // bb 6267 return this.value; 6268 } 6269 6270 public boolean hasValueElement() { 6271 return this.value != null && !this.value.isEmpty(); 6272 } 6273 6274 public boolean hasValue() { 6275 return this.value != null && !this.value.isEmpty(); 6276 } 6277 6278 /** 6279 * @param value {@link #value} (The value of the header e.g. "application/fhir+xml".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 6280 */ 6281 public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 6282 this.value = value; 6283 return this; 6284 } 6285 6286 /** 6287 * @return The value of the header e.g. "application/fhir+xml". 6288 */ 6289 public String getValue() { 6290 return this.value == null ? null : this.value.getValue(); 6291 } 6292 6293 /** 6294 * @param value The value of the header e.g. "application/fhir+xml". 6295 */ 6296 public SetupActionOperationRequestHeaderComponent setValue(String value) { 6297 if (this.value == null) 6298 this.value = new StringType(); 6299 this.value.setValue(value); 6300 return this; 6301 } 6302 6303 protected void listChildren(List<Property> childrenList) { 6304 super.listChildren(childrenList); 6305 childrenList.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, java.lang.Integer.MAX_VALUE, field)); 6306 childrenList.add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, java.lang.Integer.MAX_VALUE, value)); 6307 } 6308 6309 @Override 6310 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6311 switch (hash) { 6312 case 97427706: /*field*/ return this.field == null ? new Base[0] : new Base[] {this.field}; // StringType 6313 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 6314 default: return super.getProperty(hash, name, checkValid); 6315 } 6316 6317 } 6318 6319 @Override 6320 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6321 switch (hash) { 6322 case 97427706: // field 6323 this.field = castToString(value); // StringType 6324 return value; 6325 case 111972721: // value 6326 this.value = castToString(value); // StringType 6327 return value; 6328 default: return super.setProperty(hash, name, value); 6329 } 6330 6331 } 6332 6333 @Override 6334 public Base setProperty(String name, Base value) throws FHIRException { 6335 if (name.equals("field")) { 6336 this.field = castToString(value); // StringType 6337 } else if (name.equals("value")) { 6338 this.value = castToString(value); // StringType 6339 } else 6340 return super.setProperty(name, value); 6341 return value; 6342 } 6343 6344 @Override 6345 public Base makeProperty(int hash, String name) throws FHIRException { 6346 switch (hash) { 6347 case 97427706: return getFieldElement(); 6348 case 111972721: return getValueElement(); 6349 default: return super.makeProperty(hash, name); 6350 } 6351 6352 } 6353 6354 @Override 6355 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6356 switch (hash) { 6357 case 97427706: /*field*/ return new String[] {"string"}; 6358 case 111972721: /*value*/ return new String[] {"string"}; 6359 default: return super.getTypesForProperty(hash, name); 6360 } 6361 6362 } 6363 6364 @Override 6365 public Base addChild(String name) throws FHIRException { 6366 if (name.equals("field")) { 6367 throw new FHIRException("Cannot call addChild on a primitive type TestScript.field"); 6368 } 6369 else if (name.equals("value")) { 6370 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 6371 } 6372 else 6373 return super.addChild(name); 6374 } 6375 6376 public SetupActionOperationRequestHeaderComponent copy() { 6377 SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent(); 6378 copyValues(dst); 6379 dst.field = field == null ? null : field.copy(); 6380 dst.value = value == null ? null : value.copy(); 6381 return dst; 6382 } 6383 6384 @Override 6385 public boolean equalsDeep(Base other) { 6386 if (!super.equalsDeep(other)) 6387 return false; 6388 if (!(other instanceof SetupActionOperationRequestHeaderComponent)) 6389 return false; 6390 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other; 6391 return compareDeep(field, o.field, true) && compareDeep(value, o.value, true); 6392 } 6393 6394 @Override 6395 public boolean equalsShallow(Base other) { 6396 if (!super.equalsShallow(other)) 6397 return false; 6398 if (!(other instanceof SetupActionOperationRequestHeaderComponent)) 6399 return false; 6400 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other; 6401 return compareValues(field, o.field, true) && compareValues(value, o.value, true); 6402 } 6403 6404 public boolean isEmpty() { 6405 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value); 6406 } 6407 6408 public String fhirType() { 6409 return "TestScript.setup.action.operation.requestHeader"; 6410 6411 } 6412 6413 } 6414 6415 @Block() 6416 public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement { 6417 /** 6418 * The label would be used for tracking/logging purposes by test engines. 6419 */ 6420 @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 6421 @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 6422 protected StringType label; 6423 6424 /** 6425 * The description would be used by test engines for tracking and reporting purposes. 6426 */ 6427 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 6428 @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 6429 protected StringType description; 6430 6431 /** 6432 * The direction to use for the assertion. 6433 */ 6434 @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 6435 @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." ) 6436 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-direction-codes") 6437 protected Enumeration<AssertionDirectionType> direction; 6438 6439 /** 6440 * Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6441 */ 6442 @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 6443 @Description(shortDefinition="Id of the source fixture to be evaluated", formalDefinition="Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition." ) 6444 protected StringType compareToSourceId; 6445 6446 /** 6447 * The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6448 */ 6449 @Child(name = "compareToSourceExpression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 6450 @Description(shortDefinition="The fluentpath expression to evaluate against the source fixture", formalDefinition="The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both." ) 6451 protected StringType compareToSourceExpression; 6452 6453 /** 6454 * XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6455 */ 6456 @Child(name = "compareToSourcePath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 6457 @Description(shortDefinition="XPath or JSONPath expression to evaluate against the source fixture", formalDefinition="XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both." ) 6458 protected StringType compareToSourcePath; 6459 6460 /** 6461 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 6462 */ 6463 @Child(name = "contentType", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 6464 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 6465 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 6466 protected Enumeration<ContentType> contentType; 6467 6468 /** 6469 * The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 6470 */ 6471 @Child(name = "expression", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 6472 @Description(shortDefinition="The fluentpath expression to be evaluated", formalDefinition="The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload." ) 6473 protected StringType expression; 6474 6475 /** 6476 * The HTTP header field name e.g. 'Location'. 6477 */ 6478 @Child(name = "headerField", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 6479 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." ) 6480 protected StringType headerField; 6481 6482 /** 6483 * The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 6484 */ 6485 @Child(name = "minimumId", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 6486 @Description(shortDefinition="Fixture Id of minimum content resource", formalDefinition="The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId." ) 6487 protected StringType minimumId; 6488 6489 /** 6490 * Whether or not the test execution performs validation on the bundle navigation links. 6491 */ 6492 @Child(name = "navigationLinks", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false) 6493 @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." ) 6494 protected BooleanType navigationLinks; 6495 6496 /** 6497 * The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 6498 */ 6499 @Child(name = "operator", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) 6500 @Description(shortDefinition="equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval", formalDefinition="The operator type defines the conditional behavior of the assert. If not defined, the default is equals." ) 6501 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-operator-codes") 6502 protected Enumeration<AssertionOperatorType> operator; 6503 6504 /** 6505 * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 6506 */ 6507 @Child(name = "path", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) 6508 @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." ) 6509 protected StringType path; 6510 6511 /** 6512 * The request method or HTTP operation code to compare against that used by the client system under test. 6513 */ 6514 @Child(name = "requestMethod", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false) 6515 @Description(shortDefinition="delete | get | options | patch | post | put", formalDefinition="The request method or HTTP operation code to compare against that used by the client system under test." ) 6516 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations") 6517 protected Enumeration<TestScriptRequestMethodCode> requestMethod; 6518 6519 /** 6520 * The value to use in a comparison against the request URL path string. 6521 */ 6522 @Child(name = "requestURL", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 6523 @Description(shortDefinition="Request URL comparison value", formalDefinition="The value to use in a comparison against the request URL path string." ) 6524 protected StringType requestURL; 6525 6526 /** 6527 * The type of the resource. See http://build.fhir.org/resourcelist.html. 6528 */ 6529 @Child(name = "resource", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false) 6530 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://build.fhir.org/resourcelist.html." ) 6531 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 6532 protected CodeType resource; 6533 6534 /** 6535 * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 6536 */ 6537 @Child(name = "response", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false) 6538 @Description(shortDefinition="okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable", formalDefinition="okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable." ) 6539 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-response-code-types") 6540 protected Enumeration<AssertionResponseTypes> response; 6541 6542 /** 6543 * The value of the HTTP response code to be tested. 6544 */ 6545 @Child(name = "responseCode", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false) 6546 @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." ) 6547 protected StringType responseCode; 6548 6549 /** 6550 * The TestScript.rule this assert will evaluate. 6551 */ 6552 @Child(name = "rule", type = {}, order=19, min=0, max=1, modifier=false, summary=false) 6553 @Description(shortDefinition="The reference to a TestScript.rule", formalDefinition="The TestScript.rule this assert will evaluate." ) 6554 protected ActionAssertRuleComponent rule; 6555 6556 /** 6557 * The TestScript.ruleset this assert will evaluate. 6558 */ 6559 @Child(name = "ruleset", type = {}, order=20, min=0, max=1, modifier=false, summary=false) 6560 @Description(shortDefinition="The reference to a TestScript.ruleset", formalDefinition="The TestScript.ruleset this assert will evaluate." ) 6561 protected ActionAssertRulesetComponent ruleset; 6562 6563 /** 6564 * Fixture to evaluate the XPath/JSONPath expression or the headerField against. 6565 */ 6566 @Child(name = "sourceId", type = {IdType.class}, order=21, min=0, max=1, modifier=false, summary=false) 6567 @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against." ) 6568 protected IdType sourceId; 6569 6570 /** 6571 * The ID of the Profile to validate against. 6572 */ 6573 @Child(name = "validateProfileId", type = {IdType.class}, order=22, min=0, max=1, modifier=false, summary=false) 6574 @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." ) 6575 protected IdType validateProfileId; 6576 6577 /** 6578 * The value to compare to. 6579 */ 6580 @Child(name = "value", type = {StringType.class}, order=23, min=0, max=1, modifier=false, summary=false) 6581 @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." ) 6582 protected StringType value; 6583 6584 /** 6585 * Whether or not the test execution will produce a warning only on error for this assert. 6586 */ 6587 @Child(name = "warningOnly", type = {BooleanType.class}, order=24, min=0, max=1, modifier=false, summary=false) 6588 @Description(shortDefinition="Will this assert produce a warning only on error?", formalDefinition="Whether or not the test execution will produce a warning only on error for this assert." ) 6589 protected BooleanType warningOnly; 6590 6591 private static final long serialVersionUID = 171718507L; 6592 6593 /** 6594 * Constructor 6595 */ 6596 public SetupActionAssertComponent() { 6597 super(); 6598 } 6599 6600 /** 6601 * @return {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 6602 */ 6603 public StringType getLabelElement() { 6604 if (this.label == null) 6605 if (Configuration.errorOnAutoCreate()) 6606 throw new Error("Attempt to auto-create SetupActionAssertComponent.label"); 6607 else if (Configuration.doAutoCreate()) 6608 this.label = new StringType(); // bb 6609 return this.label; 6610 } 6611 6612 public boolean hasLabelElement() { 6613 return this.label != null && !this.label.isEmpty(); 6614 } 6615 6616 public boolean hasLabel() { 6617 return this.label != null && !this.label.isEmpty(); 6618 } 6619 6620 /** 6621 * @param value {@link #label} (The label would be used for tracking/logging purposes by test engines.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value 6622 */ 6623 public SetupActionAssertComponent setLabelElement(StringType value) { 6624 this.label = value; 6625 return this; 6626 } 6627 6628 /** 6629 * @return The label would be used for tracking/logging purposes by test engines. 6630 */ 6631 public String getLabel() { 6632 return this.label == null ? null : this.label.getValue(); 6633 } 6634 6635 /** 6636 * @param value The label would be used for tracking/logging purposes by test engines. 6637 */ 6638 public SetupActionAssertComponent setLabel(String value) { 6639 if (Utilities.noString(value)) 6640 this.label = null; 6641 else { 6642 if (this.label == null) 6643 this.label = new StringType(); 6644 this.label.setValue(value); 6645 } 6646 return this; 6647 } 6648 6649 /** 6650 * @return {@link #description} (The description would be 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 6651 */ 6652 public StringType getDescriptionElement() { 6653 if (this.description == null) 6654 if (Configuration.errorOnAutoCreate()) 6655 throw new Error("Attempt to auto-create SetupActionAssertComponent.description"); 6656 else if (Configuration.doAutoCreate()) 6657 this.description = new StringType(); // bb 6658 return this.description; 6659 } 6660 6661 public boolean hasDescriptionElement() { 6662 return this.description != null && !this.description.isEmpty(); 6663 } 6664 6665 public boolean hasDescription() { 6666 return this.description != null && !this.description.isEmpty(); 6667 } 6668 6669 /** 6670 * @param value {@link #description} (The description would be 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 6671 */ 6672 public SetupActionAssertComponent setDescriptionElement(StringType value) { 6673 this.description = value; 6674 return this; 6675 } 6676 6677 /** 6678 * @return The description would be used by test engines for tracking and reporting purposes. 6679 */ 6680 public String getDescription() { 6681 return this.description == null ? null : this.description.getValue(); 6682 } 6683 6684 /** 6685 * @param value The description would be used by test engines for tracking and reporting purposes. 6686 */ 6687 public SetupActionAssertComponent setDescription(String value) { 6688 if (Utilities.noString(value)) 6689 this.description = null; 6690 else { 6691 if (this.description == null) 6692 this.description = new StringType(); 6693 this.description.setValue(value); 6694 } 6695 return this; 6696 } 6697 6698 /** 6699 * @return {@link #direction} (The direction to use for the assertion.). This is the underlying object with id, value and extensions. The accessor "getDirection" gives direct access to the value 6700 */ 6701 public Enumeration<AssertionDirectionType> getDirectionElement() { 6702 if (this.direction == null) 6703 if (Configuration.errorOnAutoCreate()) 6704 throw new Error("Attempt to auto-create SetupActionAssertComponent.direction"); 6705 else if (Configuration.doAutoCreate()) 6706 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb 6707 return this.direction; 6708 } 6709 6710 public boolean hasDirectionElement() { 6711 return this.direction != null && !this.direction.isEmpty(); 6712 } 6713 6714 public boolean hasDirection() { 6715 return this.direction != null && !this.direction.isEmpty(); 6716 } 6717 6718 /** 6719 * @param value {@link #direction} (The direction to use for the assertion.). This is the underlying object with id, value and extensions. The accessor "getDirection" gives direct access to the value 6720 */ 6721 public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 6722 this.direction = value; 6723 return this; 6724 } 6725 6726 /** 6727 * @return The direction to use for the assertion. 6728 */ 6729 public AssertionDirectionType getDirection() { 6730 return this.direction == null ? null : this.direction.getValue(); 6731 } 6732 6733 /** 6734 * @param value The direction to use for the assertion. 6735 */ 6736 public SetupActionAssertComponent setDirection(AssertionDirectionType value) { 6737 if (value == null) 6738 this.direction = null; 6739 else { 6740 if (this.direction == null) 6741 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); 6742 this.direction.setValue(value); 6743 } 6744 return this; 6745 } 6746 6747 /** 6748 * @return {@link #compareToSourceId} (Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceId" gives direct access to the value 6749 */ 6750 public StringType getCompareToSourceIdElement() { 6751 if (this.compareToSourceId == null) 6752 if (Configuration.errorOnAutoCreate()) 6753 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId"); 6754 else if (Configuration.doAutoCreate()) 6755 this.compareToSourceId = new StringType(); // bb 6756 return this.compareToSourceId; 6757 } 6758 6759 public boolean hasCompareToSourceIdElement() { 6760 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 6761 } 6762 6763 public boolean hasCompareToSourceId() { 6764 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 6765 } 6766 6767 /** 6768 * @param value {@link #compareToSourceId} (Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceId" gives direct access to the value 6769 */ 6770 public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 6771 this.compareToSourceId = value; 6772 return this; 6773 } 6774 6775 /** 6776 * @return Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6777 */ 6778 public String getCompareToSourceId() { 6779 return this.compareToSourceId == null ? null : this.compareToSourceId.getValue(); 6780 } 6781 6782 /** 6783 * @param value Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6784 */ 6785 public SetupActionAssertComponent setCompareToSourceId(String value) { 6786 if (Utilities.noString(value)) 6787 this.compareToSourceId = null; 6788 else { 6789 if (this.compareToSourceId == null) 6790 this.compareToSourceId = new StringType(); 6791 this.compareToSourceId.setValue(value); 6792 } 6793 return this; 6794 } 6795 6796 /** 6797 * @return {@link #compareToSourceExpression} (The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceExpression" gives direct access to the value 6798 */ 6799 public StringType getCompareToSourceExpressionElement() { 6800 if (this.compareToSourceExpression == null) 6801 if (Configuration.errorOnAutoCreate()) 6802 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression"); 6803 else if (Configuration.doAutoCreate()) 6804 this.compareToSourceExpression = new StringType(); // bb 6805 return this.compareToSourceExpression; 6806 } 6807 6808 public boolean hasCompareToSourceExpressionElement() { 6809 return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty(); 6810 } 6811 6812 public boolean hasCompareToSourceExpression() { 6813 return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty(); 6814 } 6815 6816 /** 6817 * @param value {@link #compareToSourceExpression} (The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceExpression" gives direct access to the value 6818 */ 6819 public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) { 6820 this.compareToSourceExpression = value; 6821 return this; 6822 } 6823 6824 /** 6825 * @return The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6826 */ 6827 public String getCompareToSourceExpression() { 6828 return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue(); 6829 } 6830 6831 /** 6832 * @param value The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6833 */ 6834 public SetupActionAssertComponent setCompareToSourceExpression(String value) { 6835 if (Utilities.noString(value)) 6836 this.compareToSourceExpression = null; 6837 else { 6838 if (this.compareToSourceExpression == null) 6839 this.compareToSourceExpression = new StringType(); 6840 this.compareToSourceExpression.setValue(value); 6841 } 6842 return this; 6843 } 6844 6845 /** 6846 * @return {@link #compareToSourcePath} (XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourcePath" gives direct access to the value 6847 */ 6848 public StringType getCompareToSourcePathElement() { 6849 if (this.compareToSourcePath == null) 6850 if (Configuration.errorOnAutoCreate()) 6851 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath"); 6852 else if (Configuration.doAutoCreate()) 6853 this.compareToSourcePath = new StringType(); // bb 6854 return this.compareToSourcePath; 6855 } 6856 6857 public boolean hasCompareToSourcePathElement() { 6858 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 6859 } 6860 6861 public boolean hasCompareToSourcePath() { 6862 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 6863 } 6864 6865 /** 6866 * @param value {@link #compareToSourcePath} (XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourcePath" gives direct access to the value 6867 */ 6868 public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 6869 this.compareToSourcePath = value; 6870 return this; 6871 } 6872 6873 /** 6874 * @return XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6875 */ 6876 public String getCompareToSourcePath() { 6877 return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue(); 6878 } 6879 6880 /** 6881 * @param value XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6882 */ 6883 public SetupActionAssertComponent setCompareToSourcePath(String value) { 6884 if (Utilities.noString(value)) 6885 this.compareToSourcePath = null; 6886 else { 6887 if (this.compareToSourcePath == null) 6888 this.compareToSourcePath = new StringType(); 6889 this.compareToSourcePath.setValue(value); 6890 } 6891 return this; 6892 } 6893 6894 /** 6895 * @return {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 6896 */ 6897 public Enumeration<ContentType> getContentTypeElement() { 6898 if (this.contentType == null) 6899 if (Configuration.errorOnAutoCreate()) 6900 throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType"); 6901 else if (Configuration.doAutoCreate()) 6902 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 6903 return this.contentType; 6904 } 6905 6906 public boolean hasContentTypeElement() { 6907 return this.contentType != null && !this.contentType.isEmpty(); 6908 } 6909 6910 public boolean hasContentType() { 6911 return this.contentType != null && !this.contentType.isEmpty(); 6912 } 6913 6914 /** 6915 * @param value {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 6916 */ 6917 public SetupActionAssertComponent setContentTypeElement(Enumeration<ContentType> value) { 6918 this.contentType = value; 6919 return this; 6920 } 6921 6922 /** 6923 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 6924 */ 6925 public ContentType getContentType() { 6926 return this.contentType == null ? null : this.contentType.getValue(); 6927 } 6928 6929 /** 6930 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 6931 */ 6932 public SetupActionAssertComponent setContentType(ContentType value) { 6933 if (value == null) 6934 this.contentType = null; 6935 else { 6936 if (this.contentType == null) 6937 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 6938 this.contentType.setValue(value); 6939 } 6940 return this; 6941 } 6942 6943 /** 6944 * @return {@link #expression} (The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 6945 */ 6946 public StringType getExpressionElement() { 6947 if (this.expression == null) 6948 if (Configuration.errorOnAutoCreate()) 6949 throw new Error("Attempt to auto-create SetupActionAssertComponent.expression"); 6950 else if (Configuration.doAutoCreate()) 6951 this.expression = new StringType(); // bb 6952 return this.expression; 6953 } 6954 6955 public boolean hasExpressionElement() { 6956 return this.expression != null && !this.expression.isEmpty(); 6957 } 6958 6959 public boolean hasExpression() { 6960 return this.expression != null && !this.expression.isEmpty(); 6961 } 6962 6963 /** 6964 * @param value {@link #expression} (The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 6965 */ 6966 public SetupActionAssertComponent setExpressionElement(StringType value) { 6967 this.expression = value; 6968 return this; 6969 } 6970 6971 /** 6972 * @return The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 6973 */ 6974 public String getExpression() { 6975 return this.expression == null ? null : this.expression.getValue(); 6976 } 6977 6978 /** 6979 * @param value The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 6980 */ 6981 public SetupActionAssertComponent setExpression(String value) { 6982 if (Utilities.noString(value)) 6983 this.expression = null; 6984 else { 6985 if (this.expression == null) 6986 this.expression = new StringType(); 6987 this.expression.setValue(value); 6988 } 6989 return this; 6990 } 6991 6992 /** 6993 * @return {@link #headerField} (The HTTP header field name e.g. 'Location'.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value 6994 */ 6995 public StringType getHeaderFieldElement() { 6996 if (this.headerField == null) 6997 if (Configuration.errorOnAutoCreate()) 6998 throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField"); 6999 else if (Configuration.doAutoCreate()) 7000 this.headerField = new StringType(); // bb 7001 return this.headerField; 7002 } 7003 7004 public boolean hasHeaderFieldElement() { 7005 return this.headerField != null && !this.headerField.isEmpty(); 7006 } 7007 7008 public boolean hasHeaderField() { 7009 return this.headerField != null && !this.headerField.isEmpty(); 7010 } 7011 7012 /** 7013 * @param value {@link #headerField} (The HTTP header field name e.g. 'Location'.). This is the underlying object with id, value and extensions. The accessor "getHeaderField" gives direct access to the value 7014 */ 7015 public SetupActionAssertComponent setHeaderFieldElement(StringType value) { 7016 this.headerField = value; 7017 return this; 7018 } 7019 7020 /** 7021 * @return The HTTP header field name e.g. 'Location'. 7022 */ 7023 public String getHeaderField() { 7024 return this.headerField == null ? null : this.headerField.getValue(); 7025 } 7026 7027 /** 7028 * @param value The HTTP header field name e.g. 'Location'. 7029 */ 7030 public SetupActionAssertComponent setHeaderField(String value) { 7031 if (Utilities.noString(value)) 7032 this.headerField = null; 7033 else { 7034 if (this.headerField == null) 7035 this.headerField = new StringType(); 7036 this.headerField.setValue(value); 7037 } 7038 return this; 7039 } 7040 7041 /** 7042 * @return {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value 7043 */ 7044 public StringType getMinimumIdElement() { 7045 if (this.minimumId == null) 7046 if (Configuration.errorOnAutoCreate()) 7047 throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId"); 7048 else if (Configuration.doAutoCreate()) 7049 this.minimumId = new StringType(); // bb 7050 return this.minimumId; 7051 } 7052 7053 public boolean hasMinimumIdElement() { 7054 return this.minimumId != null && !this.minimumId.isEmpty(); 7055 } 7056 7057 public boolean hasMinimumId() { 7058 return this.minimumId != null && !this.minimumId.isEmpty(); 7059 } 7060 7061 /** 7062 * @param value {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value 7063 */ 7064 public SetupActionAssertComponent setMinimumIdElement(StringType value) { 7065 this.minimumId = value; 7066 return this; 7067 } 7068 7069 /** 7070 * @return The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 7071 */ 7072 public String getMinimumId() { 7073 return this.minimumId == null ? null : this.minimumId.getValue(); 7074 } 7075 7076 /** 7077 * @param value The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 7078 */ 7079 public SetupActionAssertComponent setMinimumId(String value) { 7080 if (Utilities.noString(value)) 7081 this.minimumId = null; 7082 else { 7083 if (this.minimumId == null) 7084 this.minimumId = new StringType(); 7085 this.minimumId.setValue(value); 7086 } 7087 return this; 7088 } 7089 7090 /** 7091 * @return {@link #navigationLinks} (Whether or not the test execution performs validation on the bundle navigation links.). This is the underlying object with id, value and extensions. The accessor "getNavigationLinks" gives direct access to the value 7092 */ 7093 public BooleanType getNavigationLinksElement() { 7094 if (this.navigationLinks == null) 7095 if (Configuration.errorOnAutoCreate()) 7096 throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks"); 7097 else if (Configuration.doAutoCreate()) 7098 this.navigationLinks = new BooleanType(); // bb 7099 return this.navigationLinks; 7100 } 7101 7102 public boolean hasNavigationLinksElement() { 7103 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 7104 } 7105 7106 public boolean hasNavigationLinks() { 7107 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 7108 } 7109 7110 /** 7111 * @param value {@link #navigationLinks} (Whether or not the test execution performs validation on the bundle navigation links.). This is the underlying object with id, value and extensions. The accessor "getNavigationLinks" gives direct access to the value 7112 */ 7113 public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 7114 this.navigationLinks = value; 7115 return this; 7116 } 7117 7118 /** 7119 * @return Whether or not the test execution performs validation on the bundle navigation links. 7120 */ 7121 public boolean getNavigationLinks() { 7122 return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue(); 7123 } 7124 7125 /** 7126 * @param value Whether or not the test execution performs validation on the bundle navigation links. 7127 */ 7128 public SetupActionAssertComponent setNavigationLinks(boolean value) { 7129 if (this.navigationLinks == null) 7130 this.navigationLinks = new BooleanType(); 7131 this.navigationLinks.setValue(value); 7132 return this; 7133 } 7134 7135 /** 7136 * @return {@link #operator} (The operator type defines the conditional behavior of the assert. If not defined, the default is equals.). This is the underlying object with id, value and extensions. The accessor "getOperator" gives direct access to the value 7137 */ 7138 public Enumeration<AssertionOperatorType> getOperatorElement() { 7139 if (this.operator == null) 7140 if (Configuration.errorOnAutoCreate()) 7141 throw new Error("Attempt to auto-create SetupActionAssertComponent.operator"); 7142 else if (Configuration.doAutoCreate()) 7143 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb 7144 return this.operator; 7145 } 7146 7147 public boolean hasOperatorElement() { 7148 return this.operator != null && !this.operator.isEmpty(); 7149 } 7150 7151 public boolean hasOperator() { 7152 return this.operator != null && !this.operator.isEmpty(); 7153 } 7154 7155 /** 7156 * @param value {@link #operator} (The operator type defines the conditional behavior of the assert. If not defined, the default is equals.). This is the underlying object with id, value and extensions. The accessor "getOperator" gives direct access to the value 7157 */ 7158 public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 7159 this.operator = value; 7160 return this; 7161 } 7162 7163 /** 7164 * @return The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 7165 */ 7166 public AssertionOperatorType getOperator() { 7167 return this.operator == null ? null : this.operator.getValue(); 7168 } 7169 7170 /** 7171 * @param value The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 7172 */ 7173 public SetupActionAssertComponent setOperator(AssertionOperatorType value) { 7174 if (value == null) 7175 this.operator = null; 7176 else { 7177 if (this.operator == null) 7178 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); 7179 this.operator.setValue(value); 7180 } 7181 return this; 7182 } 7183 7184 /** 7185 * @return {@link #path} (The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 7186 */ 7187 public StringType getPathElement() { 7188 if (this.path == null) 7189 if (Configuration.errorOnAutoCreate()) 7190 throw new Error("Attempt to auto-create SetupActionAssertComponent.path"); 7191 else if (Configuration.doAutoCreate()) 7192 this.path = new StringType(); // bb 7193 return this.path; 7194 } 7195 7196 public boolean hasPathElement() { 7197 return this.path != null && !this.path.isEmpty(); 7198 } 7199 7200 public boolean hasPath() { 7201 return this.path != null && !this.path.isEmpty(); 7202 } 7203 7204 /** 7205 * @param value {@link #path} (The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 7206 */ 7207 public SetupActionAssertComponent setPathElement(StringType value) { 7208 this.path = value; 7209 return this; 7210 } 7211 7212 /** 7213 * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 7214 */ 7215 public String getPath() { 7216 return this.path == null ? null : this.path.getValue(); 7217 } 7218 7219 /** 7220 * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 7221 */ 7222 public SetupActionAssertComponent setPath(String value) { 7223 if (Utilities.noString(value)) 7224 this.path = null; 7225 else { 7226 if (this.path == null) 7227 this.path = new StringType(); 7228 this.path.setValue(value); 7229 } 7230 return this; 7231 } 7232 7233 /** 7234 * @return {@link #requestMethod} (The request method or HTTP operation code to compare against that used by the client system under test.). This is the underlying object with id, value and extensions. The accessor "getRequestMethod" gives direct access to the value 7235 */ 7236 public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() { 7237 if (this.requestMethod == null) 7238 if (Configuration.errorOnAutoCreate()) 7239 throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod"); 7240 else if (Configuration.doAutoCreate()) 7241 this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb 7242 return this.requestMethod; 7243 } 7244 7245 public boolean hasRequestMethodElement() { 7246 return this.requestMethod != null && !this.requestMethod.isEmpty(); 7247 } 7248 7249 public boolean hasRequestMethod() { 7250 return this.requestMethod != null && !this.requestMethod.isEmpty(); 7251 } 7252 7253 /** 7254 * @param value {@link #requestMethod} (The request method or HTTP operation code to compare against that used by the client system under test.). This is the underlying object with id, value and extensions. The accessor "getRequestMethod" gives direct access to the value 7255 */ 7256 public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 7257 this.requestMethod = value; 7258 return this; 7259 } 7260 7261 /** 7262 * @return The request method or HTTP operation code to compare against that used by the client system under test. 7263 */ 7264 public TestScriptRequestMethodCode getRequestMethod() { 7265 return this.requestMethod == null ? null : this.requestMethod.getValue(); 7266 } 7267 7268 /** 7269 * @param value The request method or HTTP operation code to compare against that used by the client system under test. 7270 */ 7271 public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) { 7272 if (value == null) 7273 this.requestMethod = null; 7274 else { 7275 if (this.requestMethod == null) 7276 this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); 7277 this.requestMethod.setValue(value); 7278 } 7279 return this; 7280 } 7281 7282 /** 7283 * @return {@link #requestURL} (The value to use in a comparison against the request URL path string.). This is the underlying object with id, value and extensions. The accessor "getRequestURL" gives direct access to the value 7284 */ 7285 public StringType getRequestURLElement() { 7286 if (this.requestURL == null) 7287 if (Configuration.errorOnAutoCreate()) 7288 throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL"); 7289 else if (Configuration.doAutoCreate()) 7290 this.requestURL = new StringType(); // bb 7291 return this.requestURL; 7292 } 7293 7294 public boolean hasRequestURLElement() { 7295 return this.requestURL != null && !this.requestURL.isEmpty(); 7296 } 7297 7298 public boolean hasRequestURL() { 7299 return this.requestURL != null && !this.requestURL.isEmpty(); 7300 } 7301 7302 /** 7303 * @param value {@link #requestURL} (The value to use in a comparison against the request URL path string.). This is the underlying object with id, value and extensions. The accessor "getRequestURL" gives direct access to the value 7304 */ 7305 public SetupActionAssertComponent setRequestURLElement(StringType value) { 7306 this.requestURL = value; 7307 return this; 7308 } 7309 7310 /** 7311 * @return The value to use in a comparison against the request URL path string. 7312 */ 7313 public String getRequestURL() { 7314 return this.requestURL == null ? null : this.requestURL.getValue(); 7315 } 7316 7317 /** 7318 * @param value The value to use in a comparison against the request URL path string. 7319 */ 7320 public SetupActionAssertComponent setRequestURL(String value) { 7321 if (Utilities.noString(value)) 7322 this.requestURL = null; 7323 else { 7324 if (this.requestURL == null) 7325 this.requestURL = new StringType(); 7326 this.requestURL.setValue(value); 7327 } 7328 return this; 7329 } 7330 7331 /** 7332 * @return {@link #resource} (The type of the resource. See http://build.fhir.org/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 7333 */ 7334 public CodeType getResourceElement() { 7335 if (this.resource == null) 7336 if (Configuration.errorOnAutoCreate()) 7337 throw new Error("Attempt to auto-create SetupActionAssertComponent.resource"); 7338 else if (Configuration.doAutoCreate()) 7339 this.resource = new CodeType(); // bb 7340 return this.resource; 7341 } 7342 7343 public boolean hasResourceElement() { 7344 return this.resource != null && !this.resource.isEmpty(); 7345 } 7346 7347 public boolean hasResource() { 7348 return this.resource != null && !this.resource.isEmpty(); 7349 } 7350 7351 /** 7352 * @param value {@link #resource} (The type of the resource. See http://build.fhir.org/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 7353 */ 7354 public SetupActionAssertComponent setResourceElement(CodeType value) { 7355 this.resource = value; 7356 return this; 7357 } 7358 7359 /** 7360 * @return The type of the resource. See http://build.fhir.org/resourcelist.html. 7361 */ 7362 public String getResource() { 7363 return this.resource == null ? null : this.resource.getValue(); 7364 } 7365 7366 /** 7367 * @param value The type of the resource. See http://build.fhir.org/resourcelist.html. 7368 */ 7369 public SetupActionAssertComponent setResource(String value) { 7370 if (Utilities.noString(value)) 7371 this.resource = null; 7372 else { 7373 if (this.resource == null) 7374 this.resource = new CodeType(); 7375 this.resource.setValue(value); 7376 } 7377 return this; 7378 } 7379 7380 /** 7381 * @return {@link #response} (okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.). This is the underlying object with id, value and extensions. The accessor "getResponse" gives direct access to the value 7382 */ 7383 public Enumeration<AssertionResponseTypes> getResponseElement() { 7384 if (this.response == null) 7385 if (Configuration.errorOnAutoCreate()) 7386 throw new Error("Attempt to auto-create SetupActionAssertComponent.response"); 7387 else if (Configuration.doAutoCreate()) 7388 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb 7389 return this.response; 7390 } 7391 7392 public boolean hasResponseElement() { 7393 return this.response != null && !this.response.isEmpty(); 7394 } 7395 7396 public boolean hasResponse() { 7397 return this.response != null && !this.response.isEmpty(); 7398 } 7399 7400 /** 7401 * @param value {@link #response} (okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.). This is the underlying object with id, value and extensions. The accessor "getResponse" gives direct access to the value 7402 */ 7403 public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 7404 this.response = value; 7405 return this; 7406 } 7407 7408 /** 7409 * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 7410 */ 7411 public AssertionResponseTypes getResponse() { 7412 return this.response == null ? null : this.response.getValue(); 7413 } 7414 7415 /** 7416 * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 7417 */ 7418 public SetupActionAssertComponent setResponse(AssertionResponseTypes value) { 7419 if (value == null) 7420 this.response = null; 7421 else { 7422 if (this.response == null) 7423 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); 7424 this.response.setValue(value); 7425 } 7426 return this; 7427 } 7428 7429 /** 7430 * @return {@link #responseCode} (The value of the HTTP response code to be tested.). This is the underlying object with id, value and extensions. The accessor "getResponseCode" gives direct access to the value 7431 */ 7432 public StringType getResponseCodeElement() { 7433 if (this.responseCode == null) 7434 if (Configuration.errorOnAutoCreate()) 7435 throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode"); 7436 else if (Configuration.doAutoCreate()) 7437 this.responseCode = new StringType(); // bb 7438 return this.responseCode; 7439 } 7440 7441 public boolean hasResponseCodeElement() { 7442 return this.responseCode != null && !this.responseCode.isEmpty(); 7443 } 7444 7445 public boolean hasResponseCode() { 7446 return this.responseCode != null && !this.responseCode.isEmpty(); 7447 } 7448 7449 /** 7450 * @param value {@link #responseCode} (The value of the HTTP response code to be tested.). This is the underlying object with id, value and extensions. The accessor "getResponseCode" gives direct access to the value 7451 */ 7452 public SetupActionAssertComponent setResponseCodeElement(StringType value) { 7453 this.responseCode = value; 7454 return this; 7455 } 7456 7457 /** 7458 * @return The value of the HTTP response code to be tested. 7459 */ 7460 public String getResponseCode() { 7461 return this.responseCode == null ? null : this.responseCode.getValue(); 7462 } 7463 7464 /** 7465 * @param value The value of the HTTP response code to be tested. 7466 */ 7467 public SetupActionAssertComponent setResponseCode(String value) { 7468 if (Utilities.noString(value)) 7469 this.responseCode = null; 7470 else { 7471 if (this.responseCode == null) 7472 this.responseCode = new StringType(); 7473 this.responseCode.setValue(value); 7474 } 7475 return this; 7476 } 7477 7478 /** 7479 * @return {@link #rule} (The TestScript.rule this assert will evaluate.) 7480 */ 7481 public ActionAssertRuleComponent getRule() { 7482 if (this.rule == null) 7483 if (Configuration.errorOnAutoCreate()) 7484 throw new Error("Attempt to auto-create SetupActionAssertComponent.rule"); 7485 else if (Configuration.doAutoCreate()) 7486 this.rule = new ActionAssertRuleComponent(); // cc 7487 return this.rule; 7488 } 7489 7490 public boolean hasRule() { 7491 return this.rule != null && !this.rule.isEmpty(); 7492 } 7493 7494 /** 7495 * @param value {@link #rule} (The TestScript.rule this assert will evaluate.) 7496 */ 7497 public SetupActionAssertComponent setRule(ActionAssertRuleComponent value) { 7498 this.rule = value; 7499 return this; 7500 } 7501 7502 /** 7503 * @return {@link #ruleset} (The TestScript.ruleset this assert will evaluate.) 7504 */ 7505 public ActionAssertRulesetComponent getRuleset() { 7506 if (this.ruleset == null) 7507 if (Configuration.errorOnAutoCreate()) 7508 throw new Error("Attempt to auto-create SetupActionAssertComponent.ruleset"); 7509 else if (Configuration.doAutoCreate()) 7510 this.ruleset = new ActionAssertRulesetComponent(); // cc 7511 return this.ruleset; 7512 } 7513 7514 public boolean hasRuleset() { 7515 return this.ruleset != null && !this.ruleset.isEmpty(); 7516 } 7517 7518 /** 7519 * @param value {@link #ruleset} (The TestScript.ruleset this assert will evaluate.) 7520 */ 7521 public SetupActionAssertComponent setRuleset(ActionAssertRulesetComponent value) { 7522 this.ruleset = value; 7523 return this; 7524 } 7525 7526 /** 7527 * @return {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value 7528 */ 7529 public IdType getSourceIdElement() { 7530 if (this.sourceId == null) 7531 if (Configuration.errorOnAutoCreate()) 7532 throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId"); 7533 else if (Configuration.doAutoCreate()) 7534 this.sourceId = new IdType(); // bb 7535 return this.sourceId; 7536 } 7537 7538 public boolean hasSourceIdElement() { 7539 return this.sourceId != null && !this.sourceId.isEmpty(); 7540 } 7541 7542 public boolean hasSourceId() { 7543 return this.sourceId != null && !this.sourceId.isEmpty(); 7544 } 7545 7546 /** 7547 * @param value {@link #sourceId} (Fixture to evaluate the XPath/JSONPath expression or the headerField against.). This is the underlying object with id, value and extensions. The accessor "getSourceId" gives direct access to the value 7548 */ 7549 public SetupActionAssertComponent setSourceIdElement(IdType value) { 7550 this.sourceId = value; 7551 return this; 7552 } 7553 7554 /** 7555 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against. 7556 */ 7557 public String getSourceId() { 7558 return this.sourceId == null ? null : this.sourceId.getValue(); 7559 } 7560 7561 /** 7562 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against. 7563 */ 7564 public SetupActionAssertComponent setSourceId(String value) { 7565 if (Utilities.noString(value)) 7566 this.sourceId = null; 7567 else { 7568 if (this.sourceId == null) 7569 this.sourceId = new IdType(); 7570 this.sourceId.setValue(value); 7571 } 7572 return this; 7573 } 7574 7575 /** 7576 * @return {@link #validateProfileId} (The ID of the Profile to validate against.). This is the underlying object with id, value and extensions. The accessor "getValidateProfileId" gives direct access to the value 7577 */ 7578 public IdType getValidateProfileIdElement() { 7579 if (this.validateProfileId == null) 7580 if (Configuration.errorOnAutoCreate()) 7581 throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId"); 7582 else if (Configuration.doAutoCreate()) 7583 this.validateProfileId = new IdType(); // bb 7584 return this.validateProfileId; 7585 } 7586 7587 public boolean hasValidateProfileIdElement() { 7588 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 7589 } 7590 7591 public boolean hasValidateProfileId() { 7592 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 7593 } 7594 7595 /** 7596 * @param value {@link #validateProfileId} (The ID of the Profile to validate against.). This is the underlying object with id, value and extensions. The accessor "getValidateProfileId" gives direct access to the value 7597 */ 7598 public SetupActionAssertComponent setValidateProfileIdElement(IdType value) { 7599 this.validateProfileId = value; 7600 return this; 7601 } 7602 7603 /** 7604 * @return The ID of the Profile to validate against. 7605 */ 7606 public String getValidateProfileId() { 7607 return this.validateProfileId == null ? null : this.validateProfileId.getValue(); 7608 } 7609 7610 /** 7611 * @param value The ID of the Profile to validate against. 7612 */ 7613 public SetupActionAssertComponent setValidateProfileId(String value) { 7614 if (Utilities.noString(value)) 7615 this.validateProfileId = null; 7616 else { 7617 if (this.validateProfileId == null) 7618 this.validateProfileId = new IdType(); 7619 this.validateProfileId.setValue(value); 7620 } 7621 return this; 7622 } 7623 7624 /** 7625 * @return {@link #value} (The value to compare to.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 7626 */ 7627 public StringType getValueElement() { 7628 if (this.value == null) 7629 if (Configuration.errorOnAutoCreate()) 7630 throw new Error("Attempt to auto-create SetupActionAssertComponent.value"); 7631 else if (Configuration.doAutoCreate()) 7632 this.value = new StringType(); // bb 7633 return this.value; 7634 } 7635 7636 public boolean hasValueElement() { 7637 return this.value != null && !this.value.isEmpty(); 7638 } 7639 7640 public boolean hasValue() { 7641 return this.value != null && !this.value.isEmpty(); 7642 } 7643 7644 /** 7645 * @param value {@link #value} (The value to compare to.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 7646 */ 7647 public SetupActionAssertComponent setValueElement(StringType value) { 7648 this.value = value; 7649 return this; 7650 } 7651 7652 /** 7653 * @return The value to compare to. 7654 */ 7655 public String getValue() { 7656 return this.value == null ? null : this.value.getValue(); 7657 } 7658 7659 /** 7660 * @param value The value to compare to. 7661 */ 7662 public SetupActionAssertComponent setValue(String value) { 7663 if (Utilities.noString(value)) 7664 this.value = null; 7665 else { 7666 if (this.value == null) 7667 this.value = new StringType(); 7668 this.value.setValue(value); 7669 } 7670 return this; 7671 } 7672 7673 /** 7674 * @return {@link #warningOnly} (Whether or not the test execution will produce a warning only on error for this assert.). This is the underlying object with id, value and extensions. The accessor "getWarningOnly" gives direct access to the value 7675 */ 7676 public BooleanType getWarningOnlyElement() { 7677 if (this.warningOnly == null) 7678 if (Configuration.errorOnAutoCreate()) 7679 throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly"); 7680 else if (Configuration.doAutoCreate()) 7681 this.warningOnly = new BooleanType(); // bb 7682 return this.warningOnly; 7683 } 7684 7685 public boolean hasWarningOnlyElement() { 7686 return this.warningOnly != null && !this.warningOnly.isEmpty(); 7687 } 7688 7689 public boolean hasWarningOnly() { 7690 return this.warningOnly != null && !this.warningOnly.isEmpty(); 7691 } 7692 7693 /** 7694 * @param value {@link #warningOnly} (Whether or not the test execution will produce a warning only on error for this assert.). This is the underlying object with id, value and extensions. The accessor "getWarningOnly" gives direct access to the value 7695 */ 7696 public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 7697 this.warningOnly = value; 7698 return this; 7699 } 7700 7701 /** 7702 * @return Whether or not the test execution will produce a warning only on error for this assert. 7703 */ 7704 public boolean getWarningOnly() { 7705 return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue(); 7706 } 7707 7708 /** 7709 * @param value Whether or not the test execution will produce a warning only on error for this assert. 7710 */ 7711 public SetupActionAssertComponent setWarningOnly(boolean value) { 7712 if (this.warningOnly == null) 7713 this.warningOnly = new BooleanType(); 7714 this.warningOnly.setValue(value); 7715 return this; 7716 } 7717 7718 protected void listChildren(List<Property> childrenList) { 7719 super.listChildren(childrenList); 7720 childrenList.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, label)); 7721 childrenList.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); 7722 childrenList.add(new Property("direction", "code", "The direction to use for the assertion.", 0, java.lang.Integer.MAX_VALUE, direction)); 7723 childrenList.add(new Property("compareToSourceId", "string", "Id of the source fixture used as the contents to be evaluated by either the \"source/expression\" or \"sourceId/path\" definition.", 0, java.lang.Integer.MAX_VALUE, compareToSourceId)); 7724 childrenList.add(new Property("compareToSourceExpression", "string", "The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, java.lang.Integer.MAX_VALUE, compareToSourceExpression)); 7725 childrenList.add(new Property("compareToSourcePath", "string", "XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, java.lang.Integer.MAX_VALUE, compareToSourcePath)); 7726 childrenList.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, java.lang.Integer.MAX_VALUE, contentType)); 7727 childrenList.add(new Property("expression", "string", "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, java.lang.Integer.MAX_VALUE, expression)); 7728 childrenList.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, java.lang.Integer.MAX_VALUE, headerField)); 7729 childrenList.add(new Property("minimumId", "string", "The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.", 0, java.lang.Integer.MAX_VALUE, minimumId)); 7730 childrenList.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, java.lang.Integer.MAX_VALUE, navigationLinks)); 7731 childrenList.add(new Property("operator", "code", "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", 0, java.lang.Integer.MAX_VALUE, operator)); 7732 childrenList.add(new Property("path", "string", "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", 0, java.lang.Integer.MAX_VALUE, path)); 7733 childrenList.add(new Property("requestMethod", "code", "The request method or HTTP operation code to compare against that used by the client system under test.", 0, java.lang.Integer.MAX_VALUE, requestMethod)); 7734 childrenList.add(new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, java.lang.Integer.MAX_VALUE, requestURL)); 7735 childrenList.add(new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, java.lang.Integer.MAX_VALUE, resource)); 7736 childrenList.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, java.lang.Integer.MAX_VALUE, response)); 7737 childrenList.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, java.lang.Integer.MAX_VALUE, responseCode)); 7738 childrenList.add(new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, rule)); 7739 childrenList.add(new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, ruleset)); 7740 childrenList.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, java.lang.Integer.MAX_VALUE, sourceId)); 7741 childrenList.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, java.lang.Integer.MAX_VALUE, validateProfileId)); 7742 childrenList.add(new Property("value", "string", "The value to compare to.", 0, java.lang.Integer.MAX_VALUE, value)); 7743 childrenList.add(new Property("warningOnly", "boolean", "Whether or not the test execution will produce a warning only on error for this assert.", 0, java.lang.Integer.MAX_VALUE, warningOnly)); 7744 } 7745 7746 @Override 7747 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7748 switch (hash) { 7749 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 7750 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 7751 case -962590849: /*direction*/ return this.direction == null ? new Base[0] : new Base[] {this.direction}; // Enumeration<AssertionDirectionType> 7752 case 2081856758: /*compareToSourceId*/ return this.compareToSourceId == null ? new Base[0] : new Base[] {this.compareToSourceId}; // StringType 7753 case -1415702669: /*compareToSourceExpression*/ return this.compareToSourceExpression == null ? new Base[0] : new Base[] {this.compareToSourceExpression}; // StringType 7754 case -790206144: /*compareToSourcePath*/ return this.compareToSourcePath == null ? new Base[0] : new Base[] {this.compareToSourcePath}; // StringType 7755 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType> 7756 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 7757 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 7758 case 818925001: /*minimumId*/ return this.minimumId == null ? new Base[0] : new Base[] {this.minimumId}; // StringType 7759 case 1001488901: /*navigationLinks*/ return this.navigationLinks == null ? new Base[0] : new Base[] {this.navigationLinks}; // BooleanType 7760 case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Enumeration<AssertionOperatorType> 7761 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 7762 case 1217874000: /*requestMethod*/ return this.requestMethod == null ? new Base[0] : new Base[] {this.requestMethod}; // Enumeration<TestScriptRequestMethodCode> 7763 case 37099616: /*requestURL*/ return this.requestURL == null ? new Base[0] : new Base[] {this.requestURL}; // StringType 7764 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 7765 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Enumeration<AssertionResponseTypes> 7766 case 1438723534: /*responseCode*/ return this.responseCode == null ? new Base[0] : new Base[] {this.responseCode}; // StringType 7767 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : new Base[] {this.rule}; // ActionAssertRuleComponent 7768 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // ActionAssertRulesetComponent 7769 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 7770 case 1555541038: /*validateProfileId*/ return this.validateProfileId == null ? new Base[0] : new Base[] {this.validateProfileId}; // IdType 7771 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 7772 case -481159832: /*warningOnly*/ return this.warningOnly == null ? new Base[0] : new Base[] {this.warningOnly}; // BooleanType 7773 default: return super.getProperty(hash, name, checkValid); 7774 } 7775 7776 } 7777 7778 @Override 7779 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7780 switch (hash) { 7781 case 102727412: // label 7782 this.label = castToString(value); // StringType 7783 return value; 7784 case -1724546052: // description 7785 this.description = castToString(value); // StringType 7786 return value; 7787 case -962590849: // direction 7788 value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value)); 7789 this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType> 7790 return value; 7791 case 2081856758: // compareToSourceId 7792 this.compareToSourceId = castToString(value); // StringType 7793 return value; 7794 case -1415702669: // compareToSourceExpression 7795 this.compareToSourceExpression = castToString(value); // StringType 7796 return value; 7797 case -790206144: // compareToSourcePath 7798 this.compareToSourcePath = castToString(value); // StringType 7799 return value; 7800 case -389131437: // contentType 7801 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 7802 this.contentType = (Enumeration) value; // Enumeration<ContentType> 7803 return value; 7804 case -1795452264: // expression 7805 this.expression = castToString(value); // StringType 7806 return value; 7807 case 1160732269: // headerField 7808 this.headerField = castToString(value); // StringType 7809 return value; 7810 case 818925001: // minimumId 7811 this.minimumId = castToString(value); // StringType 7812 return value; 7813 case 1001488901: // navigationLinks 7814 this.navigationLinks = castToBoolean(value); // BooleanType 7815 return value; 7816 case -500553564: // operator 7817 value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value)); 7818 this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType> 7819 return value; 7820 case 3433509: // path 7821 this.path = castToString(value); // StringType 7822 return value; 7823 case 1217874000: // requestMethod 7824 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 7825 this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 7826 return value; 7827 case 37099616: // requestURL 7828 this.requestURL = castToString(value); // StringType 7829 return value; 7830 case -341064690: // resource 7831 this.resource = castToCode(value); // CodeType 7832 return value; 7833 case -340323263: // response 7834 value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value)); 7835 this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes> 7836 return value; 7837 case 1438723534: // responseCode 7838 this.responseCode = castToString(value); // StringType 7839 return value; 7840 case 3512060: // rule 7841 this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent 7842 return value; 7843 case 1548678118: // ruleset 7844 this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent 7845 return value; 7846 case 1746327190: // sourceId 7847 this.sourceId = castToId(value); // IdType 7848 return value; 7849 case 1555541038: // validateProfileId 7850 this.validateProfileId = castToId(value); // IdType 7851 return value; 7852 case 111972721: // value 7853 this.value = castToString(value); // StringType 7854 return value; 7855 case -481159832: // warningOnly 7856 this.warningOnly = castToBoolean(value); // BooleanType 7857 return value; 7858 default: return super.setProperty(hash, name, value); 7859 } 7860 7861 } 7862 7863 @Override 7864 public Base setProperty(String name, Base value) throws FHIRException { 7865 if (name.equals("label")) { 7866 this.label = castToString(value); // StringType 7867 } else if (name.equals("description")) { 7868 this.description = castToString(value); // StringType 7869 } else if (name.equals("direction")) { 7870 value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value)); 7871 this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType> 7872 } else if (name.equals("compareToSourceId")) { 7873 this.compareToSourceId = castToString(value); // StringType 7874 } else if (name.equals("compareToSourceExpression")) { 7875 this.compareToSourceExpression = castToString(value); // StringType 7876 } else if (name.equals("compareToSourcePath")) { 7877 this.compareToSourcePath = castToString(value); // StringType 7878 } else if (name.equals("contentType")) { 7879 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 7880 this.contentType = (Enumeration) value; // Enumeration<ContentType> 7881 } else if (name.equals("expression")) { 7882 this.expression = castToString(value); // StringType 7883 } else if (name.equals("headerField")) { 7884 this.headerField = castToString(value); // StringType 7885 } else if (name.equals("minimumId")) { 7886 this.minimumId = castToString(value); // StringType 7887 } else if (name.equals("navigationLinks")) { 7888 this.navigationLinks = castToBoolean(value); // BooleanType 7889 } else if (name.equals("operator")) { 7890 value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value)); 7891 this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType> 7892 } else if (name.equals("path")) { 7893 this.path = castToString(value); // StringType 7894 } else if (name.equals("requestMethod")) { 7895 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 7896 this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 7897 } else if (name.equals("requestURL")) { 7898 this.requestURL = castToString(value); // StringType 7899 } else if (name.equals("resource")) { 7900 this.resource = castToCode(value); // CodeType 7901 } else if (name.equals("response")) { 7902 value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value)); 7903 this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes> 7904 } else if (name.equals("responseCode")) { 7905 this.responseCode = castToString(value); // StringType 7906 } else if (name.equals("rule")) { 7907 this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent 7908 } else if (name.equals("ruleset")) { 7909 this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent 7910 } else if (name.equals("sourceId")) { 7911 this.sourceId = castToId(value); // IdType 7912 } else if (name.equals("validateProfileId")) { 7913 this.validateProfileId = castToId(value); // IdType 7914 } else if (name.equals("value")) { 7915 this.value = castToString(value); // StringType 7916 } else if (name.equals("warningOnly")) { 7917 this.warningOnly = castToBoolean(value); // BooleanType 7918 } else 7919 return super.setProperty(name, value); 7920 return value; 7921 } 7922 7923 @Override 7924 public Base makeProperty(int hash, String name) throws FHIRException { 7925 switch (hash) { 7926 case 102727412: return getLabelElement(); 7927 case -1724546052: return getDescriptionElement(); 7928 case -962590849: return getDirectionElement(); 7929 case 2081856758: return getCompareToSourceIdElement(); 7930 case -1415702669: return getCompareToSourceExpressionElement(); 7931 case -790206144: return getCompareToSourcePathElement(); 7932 case -389131437: return getContentTypeElement(); 7933 case -1795452264: return getExpressionElement(); 7934 case 1160732269: return getHeaderFieldElement(); 7935 case 818925001: return getMinimumIdElement(); 7936 case 1001488901: return getNavigationLinksElement(); 7937 case -500553564: return getOperatorElement(); 7938 case 3433509: return getPathElement(); 7939 case 1217874000: return getRequestMethodElement(); 7940 case 37099616: return getRequestURLElement(); 7941 case -341064690: return getResourceElement(); 7942 case -340323263: return getResponseElement(); 7943 case 1438723534: return getResponseCodeElement(); 7944 case 3512060: return getRule(); 7945 case 1548678118: return getRuleset(); 7946 case 1746327190: return getSourceIdElement(); 7947 case 1555541038: return getValidateProfileIdElement(); 7948 case 111972721: return getValueElement(); 7949 case -481159832: return getWarningOnlyElement(); 7950 default: return super.makeProperty(hash, name); 7951 } 7952 7953 } 7954 7955 @Override 7956 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7957 switch (hash) { 7958 case 102727412: /*label*/ return new String[] {"string"}; 7959 case -1724546052: /*description*/ return new String[] {"string"}; 7960 case -962590849: /*direction*/ return new String[] {"code"}; 7961 case 2081856758: /*compareToSourceId*/ return new String[] {"string"}; 7962 case -1415702669: /*compareToSourceExpression*/ return new String[] {"string"}; 7963 case -790206144: /*compareToSourcePath*/ return new String[] {"string"}; 7964 case -389131437: /*contentType*/ return new String[] {"code"}; 7965 case -1795452264: /*expression*/ return new String[] {"string"}; 7966 case 1160732269: /*headerField*/ return new String[] {"string"}; 7967 case 818925001: /*minimumId*/ return new String[] {"string"}; 7968 case 1001488901: /*navigationLinks*/ return new String[] {"boolean"}; 7969 case -500553564: /*operator*/ return new String[] {"code"}; 7970 case 3433509: /*path*/ return new String[] {"string"}; 7971 case 1217874000: /*requestMethod*/ return new String[] {"code"}; 7972 case 37099616: /*requestURL*/ return new String[] {"string"}; 7973 case -341064690: /*resource*/ return new String[] {"code"}; 7974 case -340323263: /*response*/ return new String[] {"code"}; 7975 case 1438723534: /*responseCode*/ return new String[] {"string"}; 7976 case 3512060: /*rule*/ return new String[] {}; 7977 case 1548678118: /*ruleset*/ return new String[] {}; 7978 case 1746327190: /*sourceId*/ return new String[] {"id"}; 7979 case 1555541038: /*validateProfileId*/ return new String[] {"id"}; 7980 case 111972721: /*value*/ return new String[] {"string"}; 7981 case -481159832: /*warningOnly*/ return new String[] {"boolean"}; 7982 default: return super.getTypesForProperty(hash, name); 7983 } 7984 7985 } 7986 7987 @Override 7988 public Base addChild(String name) throws FHIRException { 7989 if (name.equals("label")) { 7990 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 7991 } 7992 else if (name.equals("description")) { 7993 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 7994 } 7995 else if (name.equals("direction")) { 7996 throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction"); 7997 } 7998 else if (name.equals("compareToSourceId")) { 7999 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId"); 8000 } 8001 else if (name.equals("compareToSourceExpression")) { 8002 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceExpression"); 8003 } 8004 else if (name.equals("compareToSourcePath")) { 8005 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath"); 8006 } 8007 else if (name.equals("contentType")) { 8008 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 8009 } 8010 else if (name.equals("expression")) { 8011 throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression"); 8012 } 8013 else if (name.equals("headerField")) { 8014 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 8015 } 8016 else if (name.equals("minimumId")) { 8017 throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId"); 8018 } 8019 else if (name.equals("navigationLinks")) { 8020 throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks"); 8021 } 8022 else if (name.equals("operator")) { 8023 throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator"); 8024 } 8025 else if (name.equals("path")) { 8026 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 8027 } 8028 else if (name.equals("requestMethod")) { 8029 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestMethod"); 8030 } 8031 else if (name.equals("requestURL")) { 8032 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestURL"); 8033 } 8034 else if (name.equals("resource")) { 8035 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 8036 } 8037 else if (name.equals("response")) { 8038 throw new FHIRException("Cannot call addChild on a primitive type TestScript.response"); 8039 } 8040 else if (name.equals("responseCode")) { 8041 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode"); 8042 } 8043 else if (name.equals("rule")) { 8044 this.rule = new ActionAssertRuleComponent(); 8045 return this.rule; 8046 } 8047 else if (name.equals("ruleset")) { 8048 this.ruleset = new ActionAssertRulesetComponent(); 8049 return this.ruleset; 8050 } 8051 else if (name.equals("sourceId")) { 8052 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 8053 } 8054 else if (name.equals("validateProfileId")) { 8055 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId"); 8056 } 8057 else if (name.equals("value")) { 8058 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 8059 } 8060 else if (name.equals("warningOnly")) { 8061 throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly"); 8062 } 8063 else 8064 return super.addChild(name); 8065 } 8066 8067 public SetupActionAssertComponent copy() { 8068 SetupActionAssertComponent dst = new SetupActionAssertComponent(); 8069 copyValues(dst); 8070 dst.label = label == null ? null : label.copy(); 8071 dst.description = description == null ? null : description.copy(); 8072 dst.direction = direction == null ? null : direction.copy(); 8073 dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy(); 8074 dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy(); 8075 dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy(); 8076 dst.contentType = contentType == null ? null : contentType.copy(); 8077 dst.expression = expression == null ? null : expression.copy(); 8078 dst.headerField = headerField == null ? null : headerField.copy(); 8079 dst.minimumId = minimumId == null ? null : minimumId.copy(); 8080 dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy(); 8081 dst.operator = operator == null ? null : operator.copy(); 8082 dst.path = path == null ? null : path.copy(); 8083 dst.requestMethod = requestMethod == null ? null : requestMethod.copy(); 8084 dst.requestURL = requestURL == null ? null : requestURL.copy(); 8085 dst.resource = resource == null ? null : resource.copy(); 8086 dst.response = response == null ? null : response.copy(); 8087 dst.responseCode = responseCode == null ? null : responseCode.copy(); 8088 dst.rule = rule == null ? null : rule.copy(); 8089 dst.ruleset = ruleset == null ? null : ruleset.copy(); 8090 dst.sourceId = sourceId == null ? null : sourceId.copy(); 8091 dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy(); 8092 dst.value = value == null ? null : value.copy(); 8093 dst.warningOnly = warningOnly == null ? null : warningOnly.copy(); 8094 return dst; 8095 } 8096 8097 @Override 8098 public boolean equalsDeep(Base other) { 8099 if (!super.equalsDeep(other)) 8100 return false; 8101 if (!(other instanceof SetupActionAssertComponent)) 8102 return false; 8103 SetupActionAssertComponent o = (SetupActionAssertComponent) other; 8104 return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true) 8105 && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true) 8106 && compareDeep(compareToSourcePath, o.compareToSourcePath, true) && compareDeep(contentType, o.contentType, true) 8107 && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true) 8108 && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true) 8109 && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true) 8110 && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true) && compareDeep(response, o.response, true) 8111 && compareDeep(responseCode, o.responseCode, true) && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) 8112 && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true) 8113 && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true); 8114 } 8115 8116 @Override 8117 public boolean equalsShallow(Base other) { 8118 if (!super.equalsShallow(other)) 8119 return false; 8120 if (!(other instanceof SetupActionAssertComponent)) 8121 return false; 8122 SetupActionAssertComponent o = (SetupActionAssertComponent) other; 8123 return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true) 8124 && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourceExpression, o.compareToSourceExpression, true) 8125 && compareValues(compareToSourcePath, o.compareToSourcePath, true) && compareValues(contentType, o.contentType, true) 8126 && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true) 8127 && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true) 8128 && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true) 8129 && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true) && compareValues(response, o.response, true) 8130 && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true) 8131 && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true); 8132 } 8133 8134 public boolean isEmpty() { 8135 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction 8136 , compareToSourceId, compareToSourceExpression, compareToSourcePath, contentType, expression 8137 , headerField, minimumId, navigationLinks, operator, path, requestMethod, requestURL 8138 , resource, response, responseCode, rule, ruleset, sourceId, validateProfileId 8139 , value, warningOnly); 8140 } 8141 8142 public String fhirType() { 8143 return "TestScript.setup.action.assert"; 8144 8145 } 8146 8147 } 8148 8149 @Block() 8150 public static class ActionAssertRuleComponent extends BackboneElement implements IBaseBackboneElement { 8151 /** 8152 * The TestScript.rule id value this assert will evaluate. 8153 */ 8154 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8155 @Description(shortDefinition="Id of the TestScript.rule", formalDefinition="The TestScript.rule id value this assert will evaluate." ) 8156 protected IdType ruleId; 8157 8158 /** 8159 * Each rule template can take one or more parameters for rule evaluation. 8160 */ 8161 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8162 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 8163 protected List<ActionAssertRuleParamComponent> param; 8164 8165 private static final long serialVersionUID = -1860715431L; 8166 8167 /** 8168 * Constructor 8169 */ 8170 public ActionAssertRuleComponent() { 8171 super(); 8172 } 8173 8174 /** 8175 * Constructor 8176 */ 8177 public ActionAssertRuleComponent(IdType ruleId) { 8178 super(); 8179 this.ruleId = ruleId; 8180 } 8181 8182 /** 8183 * @return {@link #ruleId} (The TestScript.rule id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 8184 */ 8185 public IdType getRuleIdElement() { 8186 if (this.ruleId == null) 8187 if (Configuration.errorOnAutoCreate()) 8188 throw new Error("Attempt to auto-create ActionAssertRuleComponent.ruleId"); 8189 else if (Configuration.doAutoCreate()) 8190 this.ruleId = new IdType(); // bb 8191 return this.ruleId; 8192 } 8193 8194 public boolean hasRuleIdElement() { 8195 return this.ruleId != null && !this.ruleId.isEmpty(); 8196 } 8197 8198 public boolean hasRuleId() { 8199 return this.ruleId != null && !this.ruleId.isEmpty(); 8200 } 8201 8202 /** 8203 * @param value {@link #ruleId} (The TestScript.rule id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 8204 */ 8205 public ActionAssertRuleComponent setRuleIdElement(IdType value) { 8206 this.ruleId = value; 8207 return this; 8208 } 8209 8210 /** 8211 * @return The TestScript.rule id value this assert will evaluate. 8212 */ 8213 public String getRuleId() { 8214 return this.ruleId == null ? null : this.ruleId.getValue(); 8215 } 8216 8217 /** 8218 * @param value The TestScript.rule id value this assert will evaluate. 8219 */ 8220 public ActionAssertRuleComponent setRuleId(String value) { 8221 if (this.ruleId == null) 8222 this.ruleId = new IdType(); 8223 this.ruleId.setValue(value); 8224 return this; 8225 } 8226 8227 /** 8228 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 8229 */ 8230 public List<ActionAssertRuleParamComponent> getParam() { 8231 if (this.param == null) 8232 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8233 return this.param; 8234 } 8235 8236 /** 8237 * @return Returns a reference to <code>this</code> for easy method chaining 8238 */ 8239 public ActionAssertRuleComponent setParam(List<ActionAssertRuleParamComponent> theParam) { 8240 this.param = theParam; 8241 return this; 8242 } 8243 8244 public boolean hasParam() { 8245 if (this.param == null) 8246 return false; 8247 for (ActionAssertRuleParamComponent item : this.param) 8248 if (!item.isEmpty()) 8249 return true; 8250 return false; 8251 } 8252 8253 public ActionAssertRuleParamComponent addParam() { //3 8254 ActionAssertRuleParamComponent t = new ActionAssertRuleParamComponent(); 8255 if (this.param == null) 8256 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8257 this.param.add(t); 8258 return t; 8259 } 8260 8261 public ActionAssertRuleComponent addParam(ActionAssertRuleParamComponent t) { //3 8262 if (t == null) 8263 return this; 8264 if (this.param == null) 8265 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8266 this.param.add(t); 8267 return this; 8268 } 8269 8270 /** 8271 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 8272 */ 8273 public ActionAssertRuleParamComponent getParamFirstRep() { 8274 if (getParam().isEmpty()) { 8275 addParam(); 8276 } 8277 return getParam().get(0); 8278 } 8279 8280 protected void listChildren(List<Property> childrenList) { 8281 super.listChildren(childrenList); 8282 childrenList.add(new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, ruleId)); 8283 childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 8284 } 8285 8286 @Override 8287 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8288 switch (hash) { 8289 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 8290 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRuleParamComponent 8291 default: return super.getProperty(hash, name, checkValid); 8292 } 8293 8294 } 8295 8296 @Override 8297 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8298 switch (hash) { 8299 case -919875273: // ruleId 8300 this.ruleId = castToId(value); // IdType 8301 return value; 8302 case 106436749: // param 8303 this.getParam().add((ActionAssertRuleParamComponent) value); // ActionAssertRuleParamComponent 8304 return value; 8305 default: return super.setProperty(hash, name, value); 8306 } 8307 8308 } 8309 8310 @Override 8311 public Base setProperty(String name, Base value) throws FHIRException { 8312 if (name.equals("ruleId")) { 8313 this.ruleId = castToId(value); // IdType 8314 } else if (name.equals("param")) { 8315 this.getParam().add((ActionAssertRuleParamComponent) value); 8316 } else 8317 return super.setProperty(name, value); 8318 return value; 8319 } 8320 8321 @Override 8322 public Base makeProperty(int hash, String name) throws FHIRException { 8323 switch (hash) { 8324 case -919875273: return getRuleIdElement(); 8325 case 106436749: return addParam(); 8326 default: return super.makeProperty(hash, name); 8327 } 8328 8329 } 8330 8331 @Override 8332 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8333 switch (hash) { 8334 case -919875273: /*ruleId*/ return new String[] {"id"}; 8335 case 106436749: /*param*/ return new String[] {}; 8336 default: return super.getTypesForProperty(hash, name); 8337 } 8338 8339 } 8340 8341 @Override 8342 public Base addChild(String name) throws FHIRException { 8343 if (name.equals("ruleId")) { 8344 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 8345 } 8346 else if (name.equals("param")) { 8347 return addParam(); 8348 } 8349 else 8350 return super.addChild(name); 8351 } 8352 8353 public ActionAssertRuleComponent copy() { 8354 ActionAssertRuleComponent dst = new ActionAssertRuleComponent(); 8355 copyValues(dst); 8356 dst.ruleId = ruleId == null ? null : ruleId.copy(); 8357 if (param != null) { 8358 dst.param = new ArrayList<ActionAssertRuleParamComponent>(); 8359 for (ActionAssertRuleParamComponent i : param) 8360 dst.param.add(i.copy()); 8361 }; 8362 return dst; 8363 } 8364 8365 @Override 8366 public boolean equalsDeep(Base other) { 8367 if (!super.equalsDeep(other)) 8368 return false; 8369 if (!(other instanceof ActionAssertRuleComponent)) 8370 return false; 8371 ActionAssertRuleComponent o = (ActionAssertRuleComponent) other; 8372 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 8373 } 8374 8375 @Override 8376 public boolean equalsShallow(Base other) { 8377 if (!super.equalsShallow(other)) 8378 return false; 8379 if (!(other instanceof ActionAssertRuleComponent)) 8380 return false; 8381 ActionAssertRuleComponent o = (ActionAssertRuleComponent) other; 8382 return compareValues(ruleId, o.ruleId, true); 8383 } 8384 8385 public boolean isEmpty() { 8386 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 8387 } 8388 8389 public String fhirType() { 8390 return "TestScript.setup.action.assert.rule"; 8391 8392 } 8393 8394 } 8395 8396 @Block() 8397 public static class ActionAssertRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 8398 /** 8399 * Descriptive name for this parameter that matches the external assert rule parameter name. 8400 */ 8401 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8402 @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) 8403 protected StringType name; 8404 8405 /** 8406 * The value for the parameter that will be passed on to the external rule template. 8407 */ 8408 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 8409 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external rule template." ) 8410 protected StringType value; 8411 8412 private static final long serialVersionUID = 395259392L; 8413 8414 /** 8415 * Constructor 8416 */ 8417 public ActionAssertRuleParamComponent() { 8418 super(); 8419 } 8420 8421 /** 8422 * Constructor 8423 */ 8424 public ActionAssertRuleParamComponent(StringType name, StringType value) { 8425 super(); 8426 this.name = name; 8427 this.value = value; 8428 } 8429 8430 /** 8431 * @return {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 8432 */ 8433 public StringType getNameElement() { 8434 if (this.name == null) 8435 if (Configuration.errorOnAutoCreate()) 8436 throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.name"); 8437 else if (Configuration.doAutoCreate()) 8438 this.name = new StringType(); // bb 8439 return this.name; 8440 } 8441 8442 public boolean hasNameElement() { 8443 return this.name != null && !this.name.isEmpty(); 8444 } 8445 8446 public boolean hasName() { 8447 return this.name != null && !this.name.isEmpty(); 8448 } 8449 8450 /** 8451 * @param value {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 8452 */ 8453 public ActionAssertRuleParamComponent setNameElement(StringType value) { 8454 this.name = value; 8455 return this; 8456 } 8457 8458 /** 8459 * @return Descriptive name for this parameter that matches the external assert rule parameter name. 8460 */ 8461 public String getName() { 8462 return this.name == null ? null : this.name.getValue(); 8463 } 8464 8465 /** 8466 * @param value Descriptive name for this parameter that matches the external assert rule parameter name. 8467 */ 8468 public ActionAssertRuleParamComponent setName(String value) { 8469 if (this.name == null) 8470 this.name = new StringType(); 8471 this.name.setValue(value); 8472 return this; 8473 } 8474 8475 /** 8476 * @return {@link #value} (The value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 8477 */ 8478 public StringType getValueElement() { 8479 if (this.value == null) 8480 if (Configuration.errorOnAutoCreate()) 8481 throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.value"); 8482 else if (Configuration.doAutoCreate()) 8483 this.value = new StringType(); // bb 8484 return this.value; 8485 } 8486 8487 public boolean hasValueElement() { 8488 return this.value != null && !this.value.isEmpty(); 8489 } 8490 8491 public boolean hasValue() { 8492 return this.value != null && !this.value.isEmpty(); 8493 } 8494 8495 /** 8496 * @param value {@link #value} (The value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 8497 */ 8498 public ActionAssertRuleParamComponent setValueElement(StringType value) { 8499 this.value = value; 8500 return this; 8501 } 8502 8503 /** 8504 * @return The value for the parameter that will be passed on to the external rule template. 8505 */ 8506 public String getValue() { 8507 return this.value == null ? null : this.value.getValue(); 8508 } 8509 8510 /** 8511 * @param value The value for the parameter that will be passed on to the external rule template. 8512 */ 8513 public ActionAssertRuleParamComponent setValue(String value) { 8514 if (this.value == null) 8515 this.value = new StringType(); 8516 this.value.setValue(value); 8517 return this; 8518 } 8519 8520 protected void listChildren(List<Property> childrenList) { 8521 super.listChildren(childrenList); 8522 childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); 8523 childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, java.lang.Integer.MAX_VALUE, value)); 8524 } 8525 8526 @Override 8527 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8528 switch (hash) { 8529 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 8530 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 8531 default: return super.getProperty(hash, name, checkValid); 8532 } 8533 8534 } 8535 8536 @Override 8537 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8538 switch (hash) { 8539 case 3373707: // name 8540 this.name = castToString(value); // StringType 8541 return value; 8542 case 111972721: // value 8543 this.value = castToString(value); // StringType 8544 return value; 8545 default: return super.setProperty(hash, name, value); 8546 } 8547 8548 } 8549 8550 @Override 8551 public Base setProperty(String name, Base value) throws FHIRException { 8552 if (name.equals("name")) { 8553 this.name = castToString(value); // StringType 8554 } else if (name.equals("value")) { 8555 this.value = castToString(value); // StringType 8556 } else 8557 return super.setProperty(name, value); 8558 return value; 8559 } 8560 8561 @Override 8562 public Base makeProperty(int hash, String name) throws FHIRException { 8563 switch (hash) { 8564 case 3373707: return getNameElement(); 8565 case 111972721: return getValueElement(); 8566 default: return super.makeProperty(hash, name); 8567 } 8568 8569 } 8570 8571 @Override 8572 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8573 switch (hash) { 8574 case 3373707: /*name*/ return new String[] {"string"}; 8575 case 111972721: /*value*/ return new String[] {"string"}; 8576 default: return super.getTypesForProperty(hash, name); 8577 } 8578 8579 } 8580 8581 @Override 8582 public Base addChild(String name) throws FHIRException { 8583 if (name.equals("name")) { 8584 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 8585 } 8586 else if (name.equals("value")) { 8587 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 8588 } 8589 else 8590 return super.addChild(name); 8591 } 8592 8593 public ActionAssertRuleParamComponent copy() { 8594 ActionAssertRuleParamComponent dst = new ActionAssertRuleParamComponent(); 8595 copyValues(dst); 8596 dst.name = name == null ? null : name.copy(); 8597 dst.value = value == null ? null : value.copy(); 8598 return dst; 8599 } 8600 8601 @Override 8602 public boolean equalsDeep(Base other) { 8603 if (!super.equalsDeep(other)) 8604 return false; 8605 if (!(other instanceof ActionAssertRuleParamComponent)) 8606 return false; 8607 ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other; 8608 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 8609 } 8610 8611 @Override 8612 public boolean equalsShallow(Base other) { 8613 if (!super.equalsShallow(other)) 8614 return false; 8615 if (!(other instanceof ActionAssertRuleParamComponent)) 8616 return false; 8617 ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other; 8618 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 8619 } 8620 8621 public boolean isEmpty() { 8622 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 8623 } 8624 8625 public String fhirType() { 8626 return "TestScript.setup.action.assert.rule.param"; 8627 8628 } 8629 8630 } 8631 8632 @Block() 8633 public static class ActionAssertRulesetComponent extends BackboneElement implements IBaseBackboneElement { 8634 /** 8635 * The TestScript.ruleset id value this assert will evaluate. 8636 */ 8637 @Child(name = "rulesetId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8638 @Description(shortDefinition="Id of the TestScript.ruleset", formalDefinition="The TestScript.ruleset id value this assert will evaluate." ) 8639 protected IdType rulesetId; 8640 8641 /** 8642 * The referenced rule within the external ruleset template. 8643 */ 8644 @Child(name = "rule", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8645 @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." ) 8646 protected List<ActionAssertRulesetRuleComponent> rule; 8647 8648 private static final long serialVersionUID = -976736025L; 8649 8650 /** 8651 * Constructor 8652 */ 8653 public ActionAssertRulesetComponent() { 8654 super(); 8655 } 8656 8657 /** 8658 * Constructor 8659 */ 8660 public ActionAssertRulesetComponent(IdType rulesetId) { 8661 super(); 8662 this.rulesetId = rulesetId; 8663 } 8664 8665 /** 8666 * @return {@link #rulesetId} (The TestScript.ruleset id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRulesetId" gives direct access to the value 8667 */ 8668 public IdType getRulesetIdElement() { 8669 if (this.rulesetId == null) 8670 if (Configuration.errorOnAutoCreate()) 8671 throw new Error("Attempt to auto-create ActionAssertRulesetComponent.rulesetId"); 8672 else if (Configuration.doAutoCreate()) 8673 this.rulesetId = new IdType(); // bb 8674 return this.rulesetId; 8675 } 8676 8677 public boolean hasRulesetIdElement() { 8678 return this.rulesetId != null && !this.rulesetId.isEmpty(); 8679 } 8680 8681 public boolean hasRulesetId() { 8682 return this.rulesetId != null && !this.rulesetId.isEmpty(); 8683 } 8684 8685 /** 8686 * @param value {@link #rulesetId} (The TestScript.ruleset id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRulesetId" gives direct access to the value 8687 */ 8688 public ActionAssertRulesetComponent setRulesetIdElement(IdType value) { 8689 this.rulesetId = value; 8690 return this; 8691 } 8692 8693 /** 8694 * @return The TestScript.ruleset id value this assert will evaluate. 8695 */ 8696 public String getRulesetId() { 8697 return this.rulesetId == null ? null : this.rulesetId.getValue(); 8698 } 8699 8700 /** 8701 * @param value The TestScript.ruleset id value this assert will evaluate. 8702 */ 8703 public ActionAssertRulesetComponent setRulesetId(String value) { 8704 if (this.rulesetId == null) 8705 this.rulesetId = new IdType(); 8706 this.rulesetId.setValue(value); 8707 return this; 8708 } 8709 8710 /** 8711 * @return {@link #rule} (The referenced rule within the external ruleset template.) 8712 */ 8713 public List<ActionAssertRulesetRuleComponent> getRule() { 8714 if (this.rule == null) 8715 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 8716 return this.rule; 8717 } 8718 8719 /** 8720 * @return Returns a reference to <code>this</code> for easy method chaining 8721 */ 8722 public ActionAssertRulesetComponent setRule(List<ActionAssertRulesetRuleComponent> theRule) { 8723 this.rule = theRule; 8724 return this; 8725 } 8726 8727 public boolean hasRule() { 8728 if (this.rule == null) 8729 return false; 8730 for (ActionAssertRulesetRuleComponent item : this.rule) 8731 if (!item.isEmpty()) 8732 return true; 8733 return false; 8734 } 8735 8736 public ActionAssertRulesetRuleComponent addRule() { //3 8737 ActionAssertRulesetRuleComponent t = new ActionAssertRulesetRuleComponent(); 8738 if (this.rule == null) 8739 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 8740 this.rule.add(t); 8741 return t; 8742 } 8743 8744 public ActionAssertRulesetComponent addRule(ActionAssertRulesetRuleComponent t) { //3 8745 if (t == null) 8746 return this; 8747 if (this.rule == null) 8748 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 8749 this.rule.add(t); 8750 return this; 8751 } 8752 8753 /** 8754 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 8755 */ 8756 public ActionAssertRulesetRuleComponent getRuleFirstRep() { 8757 if (getRule().isEmpty()) { 8758 addRule(); 8759 } 8760 return getRule().get(0); 8761 } 8762 8763 protected void listChildren(List<Property> childrenList) { 8764 super.listChildren(childrenList); 8765 childrenList.add(new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, rulesetId)); 8766 childrenList.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); 8767 } 8768 8769 @Override 8770 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8771 switch (hash) { 8772 case -2073977951: /*rulesetId*/ return this.rulesetId == null ? new Base[0] : new Base[] {this.rulesetId}; // IdType 8773 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // ActionAssertRulesetRuleComponent 8774 default: return super.getProperty(hash, name, checkValid); 8775 } 8776 8777 } 8778 8779 @Override 8780 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8781 switch (hash) { 8782 case -2073977951: // rulesetId 8783 this.rulesetId = castToId(value); // IdType 8784 return value; 8785 case 3512060: // rule 8786 this.getRule().add((ActionAssertRulesetRuleComponent) value); // ActionAssertRulesetRuleComponent 8787 return value; 8788 default: return super.setProperty(hash, name, value); 8789 } 8790 8791 } 8792 8793 @Override 8794 public Base setProperty(String name, Base value) throws FHIRException { 8795 if (name.equals("rulesetId")) { 8796 this.rulesetId = castToId(value); // IdType 8797 } else if (name.equals("rule")) { 8798 this.getRule().add((ActionAssertRulesetRuleComponent) value); 8799 } else 8800 return super.setProperty(name, value); 8801 return value; 8802 } 8803 8804 @Override 8805 public Base makeProperty(int hash, String name) throws FHIRException { 8806 switch (hash) { 8807 case -2073977951: return getRulesetIdElement(); 8808 case 3512060: return addRule(); 8809 default: return super.makeProperty(hash, name); 8810 } 8811 8812 } 8813 8814 @Override 8815 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8816 switch (hash) { 8817 case -2073977951: /*rulesetId*/ return new String[] {"id"}; 8818 case 3512060: /*rule*/ return new String[] {}; 8819 default: return super.getTypesForProperty(hash, name); 8820 } 8821 8822 } 8823 8824 @Override 8825 public Base addChild(String name) throws FHIRException { 8826 if (name.equals("rulesetId")) { 8827 throw new FHIRException("Cannot call addChild on a primitive type TestScript.rulesetId"); 8828 } 8829 else if (name.equals("rule")) { 8830 return addRule(); 8831 } 8832 else 8833 return super.addChild(name); 8834 } 8835 8836 public ActionAssertRulesetComponent copy() { 8837 ActionAssertRulesetComponent dst = new ActionAssertRulesetComponent(); 8838 copyValues(dst); 8839 dst.rulesetId = rulesetId == null ? null : rulesetId.copy(); 8840 if (rule != null) { 8841 dst.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 8842 for (ActionAssertRulesetRuleComponent i : rule) 8843 dst.rule.add(i.copy()); 8844 }; 8845 return dst; 8846 } 8847 8848 @Override 8849 public boolean equalsDeep(Base other) { 8850 if (!super.equalsDeep(other)) 8851 return false; 8852 if (!(other instanceof ActionAssertRulesetComponent)) 8853 return false; 8854 ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other; 8855 return compareDeep(rulesetId, o.rulesetId, true) && compareDeep(rule, o.rule, true); 8856 } 8857 8858 @Override 8859 public boolean equalsShallow(Base other) { 8860 if (!super.equalsShallow(other)) 8861 return false; 8862 if (!(other instanceof ActionAssertRulesetComponent)) 8863 return false; 8864 ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other; 8865 return compareValues(rulesetId, o.rulesetId, true); 8866 } 8867 8868 public boolean isEmpty() { 8869 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(rulesetId, rule); 8870 } 8871 8872 public String fhirType() { 8873 return "TestScript.setup.action.assert.ruleset"; 8874 8875 } 8876 8877 } 8878 8879 @Block() 8880 public static class ActionAssertRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { 8881 /** 8882 * Id of the referenced rule within the external ruleset template. 8883 */ 8884 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8885 @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) 8886 protected IdType ruleId; 8887 8888 /** 8889 * Each rule template can take one or more parameters for rule evaluation. 8890 */ 8891 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8892 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 8893 protected List<ActionAssertRulesetRuleParamComponent> param; 8894 8895 private static final long serialVersionUID = -1850698529L; 8896 8897 /** 8898 * Constructor 8899 */ 8900 public ActionAssertRulesetRuleComponent() { 8901 super(); 8902 } 8903 8904 /** 8905 * Constructor 8906 */ 8907 public ActionAssertRulesetRuleComponent(IdType ruleId) { 8908 super(); 8909 this.ruleId = ruleId; 8910 } 8911 8912 /** 8913 * @return {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 8914 */ 8915 public IdType getRuleIdElement() { 8916 if (this.ruleId == null) 8917 if (Configuration.errorOnAutoCreate()) 8918 throw new Error("Attempt to auto-create ActionAssertRulesetRuleComponent.ruleId"); 8919 else if (Configuration.doAutoCreate()) 8920 this.ruleId = new IdType(); // bb 8921 return this.ruleId; 8922 } 8923 8924 public boolean hasRuleIdElement() { 8925 return this.ruleId != null && !this.ruleId.isEmpty(); 8926 } 8927 8928 public boolean hasRuleId() { 8929 return this.ruleId != null && !this.ruleId.isEmpty(); 8930 } 8931 8932 /** 8933 * @param value {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 8934 */ 8935 public ActionAssertRulesetRuleComponent setRuleIdElement(IdType value) { 8936 this.ruleId = value; 8937 return this; 8938 } 8939 8940 /** 8941 * @return Id of the referenced rule within the external ruleset template. 8942 */ 8943 public String getRuleId() { 8944 return this.ruleId == null ? null : this.ruleId.getValue(); 8945 } 8946 8947 /** 8948 * @param value Id of the referenced rule within the external ruleset template. 8949 */ 8950 public ActionAssertRulesetRuleComponent setRuleId(String value) { 8951 if (this.ruleId == null) 8952 this.ruleId = new IdType(); 8953 this.ruleId.setValue(value); 8954 return this; 8955 } 8956 8957 /** 8958 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 8959 */ 8960 public List<ActionAssertRulesetRuleParamComponent> getParam() { 8961 if (this.param == null) 8962 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 8963 return this.param; 8964 } 8965 8966 /** 8967 * @return Returns a reference to <code>this</code> for easy method chaining 8968 */ 8969 public ActionAssertRulesetRuleComponent setParam(List<ActionAssertRulesetRuleParamComponent> theParam) { 8970 this.param = theParam; 8971 return this; 8972 } 8973 8974 public boolean hasParam() { 8975 if (this.param == null) 8976 return false; 8977 for (ActionAssertRulesetRuleParamComponent item : this.param) 8978 if (!item.isEmpty()) 8979 return true; 8980 return false; 8981 } 8982 8983 public ActionAssertRulesetRuleParamComponent addParam() { //3 8984 ActionAssertRulesetRuleParamComponent t = new ActionAssertRulesetRuleParamComponent(); 8985 if (this.param == null) 8986 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 8987 this.param.add(t); 8988 return t; 8989 } 8990 8991 public ActionAssertRulesetRuleComponent addParam(ActionAssertRulesetRuleParamComponent t) { //3 8992 if (t == null) 8993 return this; 8994 if (this.param == null) 8995 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 8996 this.param.add(t); 8997 return this; 8998 } 8999 9000 /** 9001 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 9002 */ 9003 public ActionAssertRulesetRuleParamComponent getParamFirstRep() { 9004 if (getParam().isEmpty()) { 9005 addParam(); 9006 } 9007 return getParam().get(0); 9008 } 9009 9010 protected void listChildren(List<Property> childrenList) { 9011 super.listChildren(childrenList); 9012 childrenList.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, ruleId)); 9013 childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 9014 } 9015 9016 @Override 9017 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9018 switch (hash) { 9019 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 9020 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRulesetRuleParamComponent 9021 default: return super.getProperty(hash, name, checkValid); 9022 } 9023 9024 } 9025 9026 @Override 9027 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9028 switch (hash) { 9029 case -919875273: // ruleId 9030 this.ruleId = castToId(value); // IdType 9031 return value; 9032 case 106436749: // param 9033 this.getParam().add((ActionAssertRulesetRuleParamComponent) value); // ActionAssertRulesetRuleParamComponent 9034 return value; 9035 default: return super.setProperty(hash, name, value); 9036 } 9037 9038 } 9039 9040 @Override 9041 public Base setProperty(String name, Base value) throws FHIRException { 9042 if (name.equals("ruleId")) { 9043 this.ruleId = castToId(value); // IdType 9044 } else if (name.equals("param")) { 9045 this.getParam().add((ActionAssertRulesetRuleParamComponent) value); 9046 } else 9047 return super.setProperty(name, value); 9048 return value; 9049 } 9050 9051 @Override 9052 public Base makeProperty(int hash, String name) throws FHIRException { 9053 switch (hash) { 9054 case -919875273: return getRuleIdElement(); 9055 case 106436749: return addParam(); 9056 default: return super.makeProperty(hash, name); 9057 } 9058 9059 } 9060 9061 @Override 9062 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9063 switch (hash) { 9064 case -919875273: /*ruleId*/ return new String[] {"id"}; 9065 case 106436749: /*param*/ return new String[] {}; 9066 default: return super.getTypesForProperty(hash, name); 9067 } 9068 9069 } 9070 9071 @Override 9072 public Base addChild(String name) throws FHIRException { 9073 if (name.equals("ruleId")) { 9074 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 9075 } 9076 else if (name.equals("param")) { 9077 return addParam(); 9078 } 9079 else 9080 return super.addChild(name); 9081 } 9082 9083 public ActionAssertRulesetRuleComponent copy() { 9084 ActionAssertRulesetRuleComponent dst = new ActionAssertRulesetRuleComponent(); 9085 copyValues(dst); 9086 dst.ruleId = ruleId == null ? null : ruleId.copy(); 9087 if (param != null) { 9088 dst.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9089 for (ActionAssertRulesetRuleParamComponent i : param) 9090 dst.param.add(i.copy()); 9091 }; 9092 return dst; 9093 } 9094 9095 @Override 9096 public boolean equalsDeep(Base other) { 9097 if (!super.equalsDeep(other)) 9098 return false; 9099 if (!(other instanceof ActionAssertRulesetRuleComponent)) 9100 return false; 9101 ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other; 9102 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 9103 } 9104 9105 @Override 9106 public boolean equalsShallow(Base other) { 9107 if (!super.equalsShallow(other)) 9108 return false; 9109 if (!(other instanceof ActionAssertRulesetRuleComponent)) 9110 return false; 9111 ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other; 9112 return compareValues(ruleId, o.ruleId, true); 9113 } 9114 9115 public boolean isEmpty() { 9116 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 9117 } 9118 9119 public String fhirType() { 9120 return "TestScript.setup.action.assert.ruleset.rule"; 9121 9122 } 9123 9124 } 9125 9126 @Block() 9127 public static class ActionAssertRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 9128 /** 9129 * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9130 */ 9131 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 9132 @Description(shortDefinition="Parameter name matching external assert ruleset rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert ruleset rule parameter name." ) 9133 protected StringType name; 9134 9135 /** 9136 * The value for the parameter that will be passed on to the external ruleset rule template. 9137 */ 9138 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 9139 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external ruleset rule template." ) 9140 protected StringType value; 9141 9142 private static final long serialVersionUID = 395259392L; 9143 9144 /** 9145 * Constructor 9146 */ 9147 public ActionAssertRulesetRuleParamComponent() { 9148 super(); 9149 } 9150 9151 /** 9152 * Constructor 9153 */ 9154 public ActionAssertRulesetRuleParamComponent(StringType name, StringType value) { 9155 super(); 9156 this.name = name; 9157 this.value = value; 9158 } 9159 9160 /** 9161 * @return {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 9162 */ 9163 public StringType getNameElement() { 9164 if (this.name == null) 9165 if (Configuration.errorOnAutoCreate()) 9166 throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.name"); 9167 else if (Configuration.doAutoCreate()) 9168 this.name = new StringType(); // bb 9169 return this.name; 9170 } 9171 9172 public boolean hasNameElement() { 9173 return this.name != null && !this.name.isEmpty(); 9174 } 9175 9176 public boolean hasName() { 9177 return this.name != null && !this.name.isEmpty(); 9178 } 9179 9180 /** 9181 * @param value {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 9182 */ 9183 public ActionAssertRulesetRuleParamComponent setNameElement(StringType value) { 9184 this.name = value; 9185 return this; 9186 } 9187 9188 /** 9189 * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9190 */ 9191 public String getName() { 9192 return this.name == null ? null : this.name.getValue(); 9193 } 9194 9195 /** 9196 * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9197 */ 9198 public ActionAssertRulesetRuleParamComponent setName(String value) { 9199 if (this.name == null) 9200 this.name = new StringType(); 9201 this.name.setValue(value); 9202 return this; 9203 } 9204 9205 /** 9206 * @return {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 9207 */ 9208 public StringType getValueElement() { 9209 if (this.value == null) 9210 if (Configuration.errorOnAutoCreate()) 9211 throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.value"); 9212 else if (Configuration.doAutoCreate()) 9213 this.value = new StringType(); // bb 9214 return this.value; 9215 } 9216 9217 public boolean hasValueElement() { 9218 return this.value != null && !this.value.isEmpty(); 9219 } 9220 9221 public boolean hasValue() { 9222 return this.value != null && !this.value.isEmpty(); 9223 } 9224 9225 /** 9226 * @param value {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 9227 */ 9228 public ActionAssertRulesetRuleParamComponent setValueElement(StringType value) { 9229 this.value = value; 9230 return this; 9231 } 9232 9233 /** 9234 * @return The value for the parameter that will be passed on to the external ruleset rule template. 9235 */ 9236 public String getValue() { 9237 return this.value == null ? null : this.value.getValue(); 9238 } 9239 9240 /** 9241 * @param value The value for the parameter that will be passed on to the external ruleset rule template. 9242 */ 9243 public ActionAssertRulesetRuleParamComponent setValue(String value) { 9244 if (this.value == null) 9245 this.value = new StringType(); 9246 this.value.setValue(value); 9247 return this; 9248 } 9249 9250 protected void listChildren(List<Property> childrenList) { 9251 super.listChildren(childrenList); 9252 childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); 9253 childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, java.lang.Integer.MAX_VALUE, value)); 9254 } 9255 9256 @Override 9257 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9258 switch (hash) { 9259 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 9260 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 9261 default: return super.getProperty(hash, name, checkValid); 9262 } 9263 9264 } 9265 9266 @Override 9267 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9268 switch (hash) { 9269 case 3373707: // name 9270 this.name = castToString(value); // StringType 9271 return value; 9272 case 111972721: // value 9273 this.value = castToString(value); // StringType 9274 return value; 9275 default: return super.setProperty(hash, name, value); 9276 } 9277 9278 } 9279 9280 @Override 9281 public Base setProperty(String name, Base value) throws FHIRException { 9282 if (name.equals("name")) { 9283 this.name = castToString(value); // StringType 9284 } else if (name.equals("value")) { 9285 this.value = castToString(value); // StringType 9286 } else 9287 return super.setProperty(name, value); 9288 return value; 9289 } 9290 9291 @Override 9292 public Base makeProperty(int hash, String name) throws FHIRException { 9293 switch (hash) { 9294 case 3373707: return getNameElement(); 9295 case 111972721: return getValueElement(); 9296 default: return super.makeProperty(hash, name); 9297 } 9298 9299 } 9300 9301 @Override 9302 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9303 switch (hash) { 9304 case 3373707: /*name*/ return new String[] {"string"}; 9305 case 111972721: /*value*/ return new String[] {"string"}; 9306 default: return super.getTypesForProperty(hash, name); 9307 } 9308 9309 } 9310 9311 @Override 9312 public Base addChild(String name) throws FHIRException { 9313 if (name.equals("name")) { 9314 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 9315 } 9316 else if (name.equals("value")) { 9317 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 9318 } 9319 else 9320 return super.addChild(name); 9321 } 9322 9323 public ActionAssertRulesetRuleParamComponent copy() { 9324 ActionAssertRulesetRuleParamComponent dst = new ActionAssertRulesetRuleParamComponent(); 9325 copyValues(dst); 9326 dst.name = name == null ? null : name.copy(); 9327 dst.value = value == null ? null : value.copy(); 9328 return dst; 9329 } 9330 9331 @Override 9332 public boolean equalsDeep(Base other) { 9333 if (!super.equalsDeep(other)) 9334 return false; 9335 if (!(other instanceof ActionAssertRulesetRuleParamComponent)) 9336 return false; 9337 ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other; 9338 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 9339 } 9340 9341 @Override 9342 public boolean equalsShallow(Base other) { 9343 if (!super.equalsShallow(other)) 9344 return false; 9345 if (!(other instanceof ActionAssertRulesetRuleParamComponent)) 9346 return false; 9347 ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other; 9348 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 9349 } 9350 9351 public boolean isEmpty() { 9352 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 9353 } 9354 9355 public String fhirType() { 9356 return "TestScript.setup.action.assert.ruleset.rule.param"; 9357 9358 } 9359 9360 } 9361 9362 @Block() 9363 public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement { 9364 /** 9365 * The name of this test used for tracking/logging purposes by test engines. 9366 */ 9367 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 9368 @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." ) 9369 protected StringType name; 9370 9371 /** 9372 * A short description of the test used by test engines for tracking and reporting purposes. 9373 */ 9374 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 9375 @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." ) 9376 protected StringType description; 9377 9378 /** 9379 * Action would contain either an operation or an assertion. 9380 */ 9381 @Child(name = "action", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9382 @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 9383 protected List<TestActionComponent> action; 9384 9385 private static final long serialVersionUID = -865006110L; 9386 9387 /** 9388 * Constructor 9389 */ 9390 public TestScriptTestComponent() { 9391 super(); 9392 } 9393 9394 /** 9395 * @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 9396 */ 9397 public StringType getNameElement() { 9398 if (this.name == null) 9399 if (Configuration.errorOnAutoCreate()) 9400 throw new Error("Attempt to auto-create TestScriptTestComponent.name"); 9401 else if (Configuration.doAutoCreate()) 9402 this.name = new StringType(); // bb 9403 return this.name; 9404 } 9405 9406 public boolean hasNameElement() { 9407 return this.name != null && !this.name.isEmpty(); 9408 } 9409 9410 public boolean hasName() { 9411 return this.name != null && !this.name.isEmpty(); 9412 } 9413 9414 /** 9415 * @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 9416 */ 9417 public TestScriptTestComponent setNameElement(StringType value) { 9418 this.name = value; 9419 return this; 9420 } 9421 9422 /** 9423 * @return The name of this test used for tracking/logging purposes by test engines. 9424 */ 9425 public String getName() { 9426 return this.name == null ? null : this.name.getValue(); 9427 } 9428 9429 /** 9430 * @param value The name of this test used for tracking/logging purposes by test engines. 9431 */ 9432 public TestScriptTestComponent setName(String value) { 9433 if (Utilities.noString(value)) 9434 this.name = null; 9435 else { 9436 if (this.name == null) 9437 this.name = new StringType(); 9438 this.name.setValue(value); 9439 } 9440 return this; 9441 } 9442 9443 /** 9444 * @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 9445 */ 9446 public StringType getDescriptionElement() { 9447 if (this.description == null) 9448 if (Configuration.errorOnAutoCreate()) 9449 throw new Error("Attempt to auto-create TestScriptTestComponent.description"); 9450 else if (Configuration.doAutoCreate()) 9451 this.description = new StringType(); // bb 9452 return this.description; 9453 } 9454 9455 public boolean hasDescriptionElement() { 9456 return this.description != null && !this.description.isEmpty(); 9457 } 9458 9459 public boolean hasDescription() { 9460 return this.description != null && !this.description.isEmpty(); 9461 } 9462 9463 /** 9464 * @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 9465 */ 9466 public TestScriptTestComponent setDescriptionElement(StringType value) { 9467 this.description = value; 9468 return this; 9469 } 9470 9471 /** 9472 * @return A short description of the test used by test engines for tracking and reporting purposes. 9473 */ 9474 public String getDescription() { 9475 return this.description == null ? null : this.description.getValue(); 9476 } 9477 9478 /** 9479 * @param value A short description of the test used by test engines for tracking and reporting purposes. 9480 */ 9481 public TestScriptTestComponent setDescription(String value) { 9482 if (Utilities.noString(value)) 9483 this.description = null; 9484 else { 9485 if (this.description == null) 9486 this.description = new StringType(); 9487 this.description.setValue(value); 9488 } 9489 return this; 9490 } 9491 9492 /** 9493 * @return {@link #action} (Action would contain either an operation or an assertion.) 9494 */ 9495 public List<TestActionComponent> getAction() { 9496 if (this.action == null) 9497 this.action = new ArrayList<TestActionComponent>(); 9498 return this.action; 9499 } 9500 9501 /** 9502 * @return Returns a reference to <code>this</code> for easy method chaining 9503 */ 9504 public TestScriptTestComponent setAction(List<TestActionComponent> theAction) { 9505 this.action = theAction; 9506 return this; 9507 } 9508 9509 public boolean hasAction() { 9510 if (this.action == null) 9511 return false; 9512 for (TestActionComponent item : this.action) 9513 if (!item.isEmpty()) 9514 return true; 9515 return false; 9516 } 9517 9518 public TestActionComponent addAction() { //3 9519 TestActionComponent t = new TestActionComponent(); 9520 if (this.action == null) 9521 this.action = new ArrayList<TestActionComponent>(); 9522 this.action.add(t); 9523 return t; 9524 } 9525 9526 public TestScriptTestComponent addAction(TestActionComponent t) { //3 9527 if (t == null) 9528 return this; 9529 if (this.action == null) 9530 this.action = new ArrayList<TestActionComponent>(); 9531 this.action.add(t); 9532 return this; 9533 } 9534 9535 /** 9536 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 9537 */ 9538 public TestActionComponent getActionFirstRep() { 9539 if (getAction().isEmpty()) { 9540 addAction(); 9541 } 9542 return getAction().get(0); 9543 } 9544 9545 protected void listChildren(List<Property> childrenList) { 9546 super.listChildren(childrenList); 9547 childrenList.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, name)); 9548 childrenList.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); 9549 childrenList.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 9550 } 9551 9552 @Override 9553 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9554 switch (hash) { 9555 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 9556 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 9557 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent 9558 default: return super.getProperty(hash, name, checkValid); 9559 } 9560 9561 } 9562 9563 @Override 9564 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9565 switch (hash) { 9566 case 3373707: // name 9567 this.name = castToString(value); // StringType 9568 return value; 9569 case -1724546052: // description 9570 this.description = castToString(value); // StringType 9571 return value; 9572 case -1422950858: // action 9573 this.getAction().add((TestActionComponent) value); // TestActionComponent 9574 return value; 9575 default: return super.setProperty(hash, name, value); 9576 } 9577 9578 } 9579 9580 @Override 9581 public Base setProperty(String name, Base value) throws FHIRException { 9582 if (name.equals("name")) { 9583 this.name = castToString(value); // StringType 9584 } else if (name.equals("description")) { 9585 this.description = castToString(value); // StringType 9586 } else if (name.equals("action")) { 9587 this.getAction().add((TestActionComponent) value); 9588 } else 9589 return super.setProperty(name, value); 9590 return value; 9591 } 9592 9593 @Override 9594 public Base makeProperty(int hash, String name) throws FHIRException { 9595 switch (hash) { 9596 case 3373707: return getNameElement(); 9597 case -1724546052: return getDescriptionElement(); 9598 case -1422950858: return addAction(); 9599 default: return super.makeProperty(hash, name); 9600 } 9601 9602 } 9603 9604 @Override 9605 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9606 switch (hash) { 9607 case 3373707: /*name*/ return new String[] {"string"}; 9608 case -1724546052: /*description*/ return new String[] {"string"}; 9609 case -1422950858: /*action*/ return new String[] {}; 9610 default: return super.getTypesForProperty(hash, name); 9611 } 9612 9613 } 9614 9615 @Override 9616 public Base addChild(String name) throws FHIRException { 9617 if (name.equals("name")) { 9618 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 9619 } 9620 else if (name.equals("description")) { 9621 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 9622 } 9623 else if (name.equals("action")) { 9624 return addAction(); 9625 } 9626 else 9627 return super.addChild(name); 9628 } 9629 9630 public TestScriptTestComponent copy() { 9631 TestScriptTestComponent dst = new TestScriptTestComponent(); 9632 copyValues(dst); 9633 dst.name = name == null ? null : name.copy(); 9634 dst.description = description == null ? null : description.copy(); 9635 if (action != null) { 9636 dst.action = new ArrayList<TestActionComponent>(); 9637 for (TestActionComponent i : action) 9638 dst.action.add(i.copy()); 9639 }; 9640 return dst; 9641 } 9642 9643 @Override 9644 public boolean equalsDeep(Base other) { 9645 if (!super.equalsDeep(other)) 9646 return false; 9647 if (!(other instanceof TestScriptTestComponent)) 9648 return false; 9649 TestScriptTestComponent o = (TestScriptTestComponent) other; 9650 return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(action, o.action, true) 9651 ; 9652 } 9653 9654 @Override 9655 public boolean equalsShallow(Base other) { 9656 if (!super.equalsShallow(other)) 9657 return false; 9658 if (!(other instanceof TestScriptTestComponent)) 9659 return false; 9660 TestScriptTestComponent o = (TestScriptTestComponent) other; 9661 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 9662 } 9663 9664 public boolean isEmpty() { 9665 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action 9666 ); 9667 } 9668 9669 public String fhirType() { 9670 return "TestScript.test"; 9671 9672 } 9673 9674 } 9675 9676 @Block() 9677 public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement { 9678 /** 9679 * An operation would involve a REST request to a server. 9680 */ 9681 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 9682 @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 9683 protected SetupActionOperationComponent operation; 9684 9685 /** 9686 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 9687 */ 9688 @Child(name = "assert", type = {SetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false) 9689 @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 9690 protected SetupActionAssertComponent assert_; 9691 9692 private static final long serialVersionUID = -252088305L; 9693 9694 /** 9695 * Constructor 9696 */ 9697 public TestActionComponent() { 9698 super(); 9699 } 9700 9701 /** 9702 * @return {@link #operation} (An operation would involve a REST request to a server.) 9703 */ 9704 public SetupActionOperationComponent getOperation() { 9705 if (this.operation == null) 9706 if (Configuration.errorOnAutoCreate()) 9707 throw new Error("Attempt to auto-create TestActionComponent.operation"); 9708 else if (Configuration.doAutoCreate()) 9709 this.operation = new SetupActionOperationComponent(); // cc 9710 return this.operation; 9711 } 9712 9713 public boolean hasOperation() { 9714 return this.operation != null && !this.operation.isEmpty(); 9715 } 9716 9717 /** 9718 * @param value {@link #operation} (An operation would involve a REST request to a server.) 9719 */ 9720 public TestActionComponent setOperation(SetupActionOperationComponent value) { 9721 this.operation = value; 9722 return this; 9723 } 9724 9725 /** 9726 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 9727 */ 9728 public SetupActionAssertComponent getAssert() { 9729 if (this.assert_ == null) 9730 if (Configuration.errorOnAutoCreate()) 9731 throw new Error("Attempt to auto-create TestActionComponent.assert_"); 9732 else if (Configuration.doAutoCreate()) 9733 this.assert_ = new SetupActionAssertComponent(); // cc 9734 return this.assert_; 9735 } 9736 9737 public boolean hasAssert() { 9738 return this.assert_ != null && !this.assert_.isEmpty(); 9739 } 9740 9741 /** 9742 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 9743 */ 9744 public TestActionComponent setAssert(SetupActionAssertComponent value) { 9745 this.assert_ = value; 9746 return this; 9747 } 9748 9749 protected void listChildren(List<Property> childrenList) { 9750 super.listChildren(childrenList); 9751 childrenList.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, java.lang.Integer.MAX_VALUE, operation)); 9752 childrenList.add(new Property("assert", "@TestScript.setup.action.assert", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, java.lang.Integer.MAX_VALUE, assert_)); 9753 } 9754 9755 @Override 9756 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9757 switch (hash) { 9758 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 9759 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 9760 default: return super.getProperty(hash, name, checkValid); 9761 } 9762 9763 } 9764 9765 @Override 9766 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9767 switch (hash) { 9768 case 1662702951: // operation 9769 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 9770 return value; 9771 case -1408208058: // assert 9772 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 9773 return value; 9774 default: return super.setProperty(hash, name, value); 9775 } 9776 9777 } 9778 9779 @Override 9780 public Base setProperty(String name, Base value) throws FHIRException { 9781 if (name.equals("operation")) { 9782 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 9783 } else if (name.equals("assert")) { 9784 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 9785 } else 9786 return super.setProperty(name, value); 9787 return value; 9788 } 9789 9790 @Override 9791 public Base makeProperty(int hash, String name) throws FHIRException { 9792 switch (hash) { 9793 case 1662702951: return getOperation(); 9794 case -1408208058: return getAssert(); 9795 default: return super.makeProperty(hash, name); 9796 } 9797 9798 } 9799 9800 @Override 9801 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9802 switch (hash) { 9803 case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"}; 9804 case -1408208058: /*assert*/ return new String[] {"@TestScript.setup.action.assert"}; 9805 default: return super.getTypesForProperty(hash, name); 9806 } 9807 9808 } 9809 9810 @Override 9811 public Base addChild(String name) throws FHIRException { 9812 if (name.equals("operation")) { 9813 this.operation = new SetupActionOperationComponent(); 9814 return this.operation; 9815 } 9816 else if (name.equals("assert")) { 9817 this.assert_ = new SetupActionAssertComponent(); 9818 return this.assert_; 9819 } 9820 else 9821 return super.addChild(name); 9822 } 9823 9824 public TestActionComponent copy() { 9825 TestActionComponent dst = new TestActionComponent(); 9826 copyValues(dst); 9827 dst.operation = operation == null ? null : operation.copy(); 9828 dst.assert_ = assert_ == null ? null : assert_.copy(); 9829 return dst; 9830 } 9831 9832 @Override 9833 public boolean equalsDeep(Base other) { 9834 if (!super.equalsDeep(other)) 9835 return false; 9836 if (!(other instanceof TestActionComponent)) 9837 return false; 9838 TestActionComponent o = (TestActionComponent) other; 9839 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 9840 } 9841 9842 @Override 9843 public boolean equalsShallow(Base other) { 9844 if (!super.equalsShallow(other)) 9845 return false; 9846 if (!(other instanceof TestActionComponent)) 9847 return false; 9848 TestActionComponent o = (TestActionComponent) other; 9849 return true; 9850 } 9851 9852 public boolean isEmpty() { 9853 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_); 9854 } 9855 9856 public String fhirType() { 9857 return "TestScript.test.action"; 9858 9859 } 9860 9861 } 9862 9863 @Block() 9864 public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement { 9865 /** 9866 * The teardown action will only contain an operation. 9867 */ 9868 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9869 @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." ) 9870 protected List<TeardownActionComponent> action; 9871 9872 private static final long serialVersionUID = 1168638089L; 9873 9874 /** 9875 * Constructor 9876 */ 9877 public TestScriptTeardownComponent() { 9878 super(); 9879 } 9880 9881 /** 9882 * @return {@link #action} (The teardown action will only contain an operation.) 9883 */ 9884 public List<TeardownActionComponent> getAction() { 9885 if (this.action == null) 9886 this.action = new ArrayList<TeardownActionComponent>(); 9887 return this.action; 9888 } 9889 9890 /** 9891 * @return Returns a reference to <code>this</code> for easy method chaining 9892 */ 9893 public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) { 9894 this.action = theAction; 9895 return this; 9896 } 9897 9898 public boolean hasAction() { 9899 if (this.action == null) 9900 return false; 9901 for (TeardownActionComponent item : this.action) 9902 if (!item.isEmpty()) 9903 return true; 9904 return false; 9905 } 9906 9907 public TeardownActionComponent addAction() { //3 9908 TeardownActionComponent t = new TeardownActionComponent(); 9909 if (this.action == null) 9910 this.action = new ArrayList<TeardownActionComponent>(); 9911 this.action.add(t); 9912 return t; 9913 } 9914 9915 public TestScriptTeardownComponent addAction(TeardownActionComponent t) { //3 9916 if (t == null) 9917 return this; 9918 if (this.action == null) 9919 this.action = new ArrayList<TeardownActionComponent>(); 9920 this.action.add(t); 9921 return this; 9922 } 9923 9924 /** 9925 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 9926 */ 9927 public TeardownActionComponent getActionFirstRep() { 9928 if (getAction().isEmpty()) { 9929 addAction(); 9930 } 9931 return getAction().get(0); 9932 } 9933 9934 protected void listChildren(List<Property> childrenList) { 9935 super.listChildren(childrenList); 9936 childrenList.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action)); 9937 } 9938 9939 @Override 9940 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9941 switch (hash) { 9942 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent 9943 default: return super.getProperty(hash, name, checkValid); 9944 } 9945 9946 } 9947 9948 @Override 9949 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9950 switch (hash) { 9951 case -1422950858: // action 9952 this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent 9953 return value; 9954 default: return super.setProperty(hash, name, value); 9955 } 9956 9957 } 9958 9959 @Override 9960 public Base setProperty(String name, Base value) throws FHIRException { 9961 if (name.equals("action")) { 9962 this.getAction().add((TeardownActionComponent) value); 9963 } else 9964 return super.setProperty(name, value); 9965 return value; 9966 } 9967 9968 @Override 9969 public Base makeProperty(int hash, String name) throws FHIRException { 9970 switch (hash) { 9971 case -1422950858: return addAction(); 9972 default: return super.makeProperty(hash, name); 9973 } 9974 9975 } 9976 9977 @Override 9978 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9979 switch (hash) { 9980 case -1422950858: /*action*/ return new String[] {}; 9981 default: return super.getTypesForProperty(hash, name); 9982 } 9983 9984 } 9985 9986 @Override 9987 public Base addChild(String name) throws FHIRException { 9988 if (name.equals("action")) { 9989 return addAction(); 9990 } 9991 else 9992 return super.addChild(name); 9993 } 9994 9995 public TestScriptTeardownComponent copy() { 9996 TestScriptTeardownComponent dst = new TestScriptTeardownComponent(); 9997 copyValues(dst); 9998 if (action != null) { 9999 dst.action = new ArrayList<TeardownActionComponent>(); 10000 for (TeardownActionComponent i : action) 10001 dst.action.add(i.copy()); 10002 }; 10003 return dst; 10004 } 10005 10006 @Override 10007 public boolean equalsDeep(Base other) { 10008 if (!super.equalsDeep(other)) 10009 return false; 10010 if (!(other instanceof TestScriptTeardownComponent)) 10011 return false; 10012 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other; 10013 return compareDeep(action, o.action, true); 10014 } 10015 10016 @Override 10017 public boolean equalsShallow(Base other) { 10018 if (!super.equalsShallow(other)) 10019 return false; 10020 if (!(other instanceof TestScriptTeardownComponent)) 10021 return false; 10022 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other; 10023 return true; 10024 } 10025 10026 public boolean isEmpty() { 10027 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action); 10028 } 10029 10030 public String fhirType() { 10031 return "TestScript.teardown"; 10032 10033 } 10034 10035 } 10036 10037 @Block() 10038 public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement { 10039 /** 10040 * An operation would involve a REST request to a server. 10041 */ 10042 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=1, max=1, modifier=false, summary=false) 10043 @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 10044 protected SetupActionOperationComponent operation; 10045 10046 private static final long serialVersionUID = -1099598054L; 10047 10048 /** 10049 * Constructor 10050 */ 10051 public TeardownActionComponent() { 10052 super(); 10053 } 10054 10055 /** 10056 * Constructor 10057 */ 10058 public TeardownActionComponent(SetupActionOperationComponent operation) { 10059 super(); 10060 this.operation = operation; 10061 } 10062 10063 /** 10064 * @return {@link #operation} (An operation would involve a REST request to a server.) 10065 */ 10066 public SetupActionOperationComponent getOperation() { 10067 if (this.operation == null) 10068 if (Configuration.errorOnAutoCreate()) 10069 throw new Error("Attempt to auto-create TeardownActionComponent.operation"); 10070 else if (Configuration.doAutoCreate()) 10071 this.operation = new SetupActionOperationComponent(); // cc 10072 return this.operation; 10073 } 10074 10075 public boolean hasOperation() { 10076 return this.operation != null && !this.operation.isEmpty(); 10077 } 10078 10079 /** 10080 * @param value {@link #operation} (An operation would involve a REST request to a server.) 10081 */ 10082 public TeardownActionComponent setOperation(SetupActionOperationComponent value) { 10083 this.operation = value; 10084 return this; 10085 } 10086 10087 protected void listChildren(List<Property> childrenList) { 10088 super.listChildren(childrenList); 10089 childrenList.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, java.lang.Integer.MAX_VALUE, operation)); 10090 } 10091 10092 @Override 10093 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10094 switch (hash) { 10095 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 10096 default: return super.getProperty(hash, name, checkValid); 10097 } 10098 10099 } 10100 10101 @Override 10102 public Base setProperty(int hash, String name, Base value) throws FHIRException { 10103 switch (hash) { 10104 case 1662702951: // operation 10105 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10106 return value; 10107 default: return super.setProperty(hash, name, value); 10108 } 10109 10110 } 10111 10112 @Override 10113 public Base setProperty(String name, Base value) throws FHIRException { 10114 if (name.equals("operation")) { 10115 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10116 } else 10117 return super.setProperty(name, value); 10118 return value; 10119 } 10120 10121 @Override 10122 public Base makeProperty(int hash, String name) throws FHIRException { 10123 switch (hash) { 10124 case 1662702951: return getOperation(); 10125 default: return super.makeProperty(hash, name); 10126 } 10127 10128 } 10129 10130 @Override 10131 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 10132 switch (hash) { 10133 case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"}; 10134 default: return super.getTypesForProperty(hash, name); 10135 } 10136 10137 } 10138 10139 @Override 10140 public Base addChild(String name) throws FHIRException { 10141 if (name.equals("operation")) { 10142 this.operation = new SetupActionOperationComponent(); 10143 return this.operation; 10144 } 10145 else 10146 return super.addChild(name); 10147 } 10148 10149 public TeardownActionComponent copy() { 10150 TeardownActionComponent dst = new TeardownActionComponent(); 10151 copyValues(dst); 10152 dst.operation = operation == null ? null : operation.copy(); 10153 return dst; 10154 } 10155 10156 @Override 10157 public boolean equalsDeep(Base other) { 10158 if (!super.equalsDeep(other)) 10159 return false; 10160 if (!(other instanceof TeardownActionComponent)) 10161 return false; 10162 TeardownActionComponent o = (TeardownActionComponent) other; 10163 return compareDeep(operation, o.operation, true); 10164 } 10165 10166 @Override 10167 public boolean equalsShallow(Base other) { 10168 if (!super.equalsShallow(other)) 10169 return false; 10170 if (!(other instanceof TeardownActionComponent)) 10171 return false; 10172 TeardownActionComponent o = (TeardownActionComponent) other; 10173 return true; 10174 } 10175 10176 public boolean isEmpty() { 10177 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation); 10178 } 10179 10180 public String fhirType() { 10181 return "TestScript.teardown.action"; 10182 10183 } 10184 10185 } 10186 10187 /** 10188 * A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance. 10189 */ 10190 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 10191 @Description(shortDefinition="Additional identifier for the test script", formalDefinition="A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance." ) 10192 protected Identifier identifier; 10193 10194 /** 10195 * Explaination of why this test script is needed and why it has been designed as it has. 10196 */ 10197 @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false) 10198 @Description(shortDefinition="Why this test script is defined", formalDefinition="Explaination of why this test script is needed and why it has been designed as it has." ) 10199 protected MarkdownType purpose; 10200 10201 /** 10202 * A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script. 10203 */ 10204 @Child(name = "copyright", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 10205 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script." ) 10206 protected MarkdownType copyright; 10207 10208 /** 10209 * An abstract server used in operations within this test script in the origin element. 10210 */ 10211 @Child(name = "origin", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10212 @Description(shortDefinition="An abstract server representing a client or sender in a message exchange", formalDefinition="An abstract server used in operations within this test script in the origin element." ) 10213 protected List<TestScriptOriginComponent> origin; 10214 10215 /** 10216 * An abstract server used in operations within this test script in the destination element. 10217 */ 10218 @Child(name = "destination", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10219 @Description(shortDefinition="An abstract server representing a destination or receiver in a message exchange", formalDefinition="An abstract server used in operations within this test script in the destination element." ) 10220 protected List<TestScriptDestinationComponent> destination; 10221 10222 /** 10223 * The required capability must exist and are assumed to function correctly on the FHIR server being tested. 10224 */ 10225 @Child(name = "metadata", type = {}, order=5, min=0, max=1, modifier=false, summary=false) 10226 @Description(shortDefinition="Required capability that is assumed to function correctly on the FHIR server being tested", formalDefinition="The required capability must exist and are assumed to function correctly on the FHIR server being tested." ) 10227 protected TestScriptMetadataComponent metadata; 10228 10229 /** 10230 * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute. 10231 */ 10232 @Child(name = "fixture", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10233 @Description(shortDefinition="Fixture in the test script - by reference (uri)", formalDefinition="Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute." ) 10234 protected List<TestScriptFixtureComponent> fixture; 10235 10236 /** 10237 * Reference to the profile to be used for validation. 10238 */ 10239 @Child(name = "profile", type = {Reference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10240 @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." ) 10241 protected List<Reference> profile; 10242 /** 10243 * The actual objects that are the target of the reference (Reference to the profile to be used for validation.) 10244 */ 10245 protected List<Resource> profileTarget; 10246 10247 10248 /** 10249 * Variable is set based either on element value in response body or on header field value in the response headers. 10250 */ 10251 @Child(name = "variable", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10252 @Description(shortDefinition="Placeholder for evaluated elements", formalDefinition="Variable is set based either on element value in response body or on header field value in the response headers." ) 10253 protected List<TestScriptVariableComponent> variable; 10254 10255 /** 10256 * Assert rule to be used in one or more asserts within the test script. 10257 */ 10258 @Child(name = "rule", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10259 @Description(shortDefinition="Assert rule used within the test script", formalDefinition="Assert rule to be used in one or more asserts within the test script." ) 10260 protected List<TestScriptRuleComponent> rule; 10261 10262 /** 10263 * Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied. 10264 */ 10265 @Child(name = "ruleset", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10266 @Description(shortDefinition="Assert ruleset used within the test script", formalDefinition="Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied." ) 10267 protected List<TestScriptRulesetComponent> ruleset; 10268 10269 /** 10270 * A series of required setup operations before tests are executed. 10271 */ 10272 @Child(name = "setup", type = {}, order=11, min=0, max=1, modifier=false, summary=false) 10273 @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." ) 10274 protected TestScriptSetupComponent setup; 10275 10276 /** 10277 * A test in this script. 10278 */ 10279 @Child(name = "test", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10280 @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." ) 10281 protected List<TestScriptTestComponent> test; 10282 10283 /** 10284 * A series of operations required to clean up after the all the tests are executed (successfully or otherwise). 10285 */ 10286 @Child(name = "teardown", type = {}, order=13, min=0, max=1, modifier=false, summary=false) 10287 @Description(shortDefinition="A series of required clean up steps", formalDefinition="A series of operations required to clean up after the all the tests are executed (successfully or otherwise)." ) 10288 protected TestScriptTeardownComponent teardown; 10289 10290 private static final long serialVersionUID = 1164952373L; 10291 10292 /** 10293 * Constructor 10294 */ 10295 public TestScript() { 10296 super(); 10297 } 10298 10299 /** 10300 * Constructor 10301 */ 10302 public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) { 10303 super(); 10304 this.url = url; 10305 this.name = name; 10306 this.status = status; 10307 } 10308 10309 /** 10310 * @return {@link #url} (An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 10311 */ 10312 public UriType getUrlElement() { 10313 if (this.url == null) 10314 if (Configuration.errorOnAutoCreate()) 10315 throw new Error("Attempt to auto-create TestScript.url"); 10316 else if (Configuration.doAutoCreate()) 10317 this.url = new UriType(); // bb 10318 return this.url; 10319 } 10320 10321 public boolean hasUrlElement() { 10322 return this.url != null && !this.url.isEmpty(); 10323 } 10324 10325 public boolean hasUrl() { 10326 return this.url != null && !this.url.isEmpty(); 10327 } 10328 10329 /** 10330 * @param value {@link #url} (An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 10331 */ 10332 public TestScript setUrlElement(UriType value) { 10333 this.url = value; 10334 return this; 10335 } 10336 10337 /** 10338 * @return An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions). 10339 */ 10340 public String getUrl() { 10341 return this.url == null ? null : this.url.getValue(); 10342 } 10343 10344 /** 10345 * @param value An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions). 10346 */ 10347 public TestScript setUrl(String value) { 10348 if (this.url == null) 10349 this.url = new UriType(); 10350 this.url.setValue(value); 10351 return this; 10352 } 10353 10354 /** 10355 * @return {@link #identifier} (A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.) 10356 */ 10357 public Identifier getIdentifier() { 10358 if (this.identifier == null) 10359 if (Configuration.errorOnAutoCreate()) 10360 throw new Error("Attempt to auto-create TestScript.identifier"); 10361 else if (Configuration.doAutoCreate()) 10362 this.identifier = new Identifier(); // cc 10363 return this.identifier; 10364 } 10365 10366 public boolean hasIdentifier() { 10367 return this.identifier != null && !this.identifier.isEmpty(); 10368 } 10369 10370 /** 10371 * @param value {@link #identifier} (A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.) 10372 */ 10373 public TestScript setIdentifier(Identifier value) { 10374 this.identifier = value; 10375 return this; 10376 } 10377 10378 /** 10379 * @return {@link #version} (The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 10380 */ 10381 public StringType getVersionElement() { 10382 if (this.version == null) 10383 if (Configuration.errorOnAutoCreate()) 10384 throw new Error("Attempt to auto-create TestScript.version"); 10385 else if (Configuration.doAutoCreate()) 10386 this.version = new StringType(); // bb 10387 return this.version; 10388 } 10389 10390 public boolean hasVersionElement() { 10391 return this.version != null && !this.version.isEmpty(); 10392 } 10393 10394 public boolean hasVersion() { 10395 return this.version != null && !this.version.isEmpty(); 10396 } 10397 10398 /** 10399 * @param value {@link #version} (The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 10400 */ 10401 public TestScript setVersionElement(StringType value) { 10402 this.version = value; 10403 return this; 10404 } 10405 10406 /** 10407 * @return The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 10408 */ 10409 public String getVersion() { 10410 return this.version == null ? null : this.version.getValue(); 10411 } 10412 10413 /** 10414 * @param value The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. 10415 */ 10416 public TestScript setVersion(String value) { 10417 if (Utilities.noString(value)) 10418 this.version = null; 10419 else { 10420 if (this.version == null) 10421 this.version = new StringType(); 10422 this.version.setValue(value); 10423 } 10424 return this; 10425 } 10426 10427 /** 10428 * @return {@link #name} (A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 10429 */ 10430 public StringType getNameElement() { 10431 if (this.name == null) 10432 if (Configuration.errorOnAutoCreate()) 10433 throw new Error("Attempt to auto-create TestScript.name"); 10434 else if (Configuration.doAutoCreate()) 10435 this.name = new StringType(); // bb 10436 return this.name; 10437 } 10438 10439 public boolean hasNameElement() { 10440 return this.name != null && !this.name.isEmpty(); 10441 } 10442 10443 public boolean hasName() { 10444 return this.name != null && !this.name.isEmpty(); 10445 } 10446 10447 /** 10448 * @param value {@link #name} (A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 10449 */ 10450 public TestScript setNameElement(StringType value) { 10451 this.name = value; 10452 return this; 10453 } 10454 10455 /** 10456 * @return A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation. 10457 */ 10458 public String getName() { 10459 return this.name == null ? null : this.name.getValue(); 10460 } 10461 10462 /** 10463 * @param value A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation. 10464 */ 10465 public TestScript setName(String value) { 10466 if (this.name == null) 10467 this.name = new StringType(); 10468 this.name.setValue(value); 10469 return this; 10470 } 10471 10472 /** 10473 * @return {@link #title} (A short, descriptive, user-friendly title for the test script.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 10474 */ 10475 public StringType getTitleElement() { 10476 if (this.title == null) 10477 if (Configuration.errorOnAutoCreate()) 10478 throw new Error("Attempt to auto-create TestScript.title"); 10479 else if (Configuration.doAutoCreate()) 10480 this.title = new StringType(); // bb 10481 return this.title; 10482 } 10483 10484 public boolean hasTitleElement() { 10485 return this.title != null && !this.title.isEmpty(); 10486 } 10487 10488 public boolean hasTitle() { 10489 return this.title != null && !this.title.isEmpty(); 10490 } 10491 10492 /** 10493 * @param value {@link #title} (A short, descriptive, user-friendly title for the test script.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 10494 */ 10495 public TestScript setTitleElement(StringType value) { 10496 this.title = value; 10497 return this; 10498 } 10499 10500 /** 10501 * @return A short, descriptive, user-friendly title for the test script. 10502 */ 10503 public String getTitle() { 10504 return this.title == null ? null : this.title.getValue(); 10505 } 10506 10507 /** 10508 * @param value A short, descriptive, user-friendly title for the test script. 10509 */ 10510 public TestScript setTitle(String value) { 10511 if (Utilities.noString(value)) 10512 this.title = null; 10513 else { 10514 if (this.title == null) 10515 this.title = new StringType(); 10516 this.title.setValue(value); 10517 } 10518 return this; 10519 } 10520 10521 /** 10522 * @return {@link #status} (The status of this test script. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 10523 */ 10524 public Enumeration<PublicationStatus> getStatusElement() { 10525 if (this.status == null) 10526 if (Configuration.errorOnAutoCreate()) 10527 throw new Error("Attempt to auto-create TestScript.status"); 10528 else if (Configuration.doAutoCreate()) 10529 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 10530 return this.status; 10531 } 10532 10533 public boolean hasStatusElement() { 10534 return this.status != null && !this.status.isEmpty(); 10535 } 10536 10537 public boolean hasStatus() { 10538 return this.status != null && !this.status.isEmpty(); 10539 } 10540 10541 /** 10542 * @param value {@link #status} (The status of this test script. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 10543 */ 10544 public TestScript setStatusElement(Enumeration<PublicationStatus> value) { 10545 this.status = value; 10546 return this; 10547 } 10548 10549 /** 10550 * @return The status of this test script. Enables tracking the life-cycle of the content. 10551 */ 10552 public PublicationStatus getStatus() { 10553 return this.status == null ? null : this.status.getValue(); 10554 } 10555 10556 /** 10557 * @param value The status of this test script. Enables tracking the life-cycle of the content. 10558 */ 10559 public TestScript setStatus(PublicationStatus value) { 10560 if (this.status == null) 10561 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 10562 this.status.setValue(value); 10563 return this; 10564 } 10565 10566 /** 10567 * @return {@link #experimental} (A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 10568 */ 10569 public BooleanType getExperimentalElement() { 10570 if (this.experimental == null) 10571 if (Configuration.errorOnAutoCreate()) 10572 throw new Error("Attempt to auto-create TestScript.experimental"); 10573 else if (Configuration.doAutoCreate()) 10574 this.experimental = new BooleanType(); // bb 10575 return this.experimental; 10576 } 10577 10578 public boolean hasExperimentalElement() { 10579 return this.experimental != null && !this.experimental.isEmpty(); 10580 } 10581 10582 public boolean hasExperimental() { 10583 return this.experimental != null && !this.experimental.isEmpty(); 10584 } 10585 10586 /** 10587 * @param value {@link #experimental} (A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 10588 */ 10589 public TestScript setExperimentalElement(BooleanType value) { 10590 this.experimental = value; 10591 return this; 10592 } 10593 10594 /** 10595 * @return A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 10596 */ 10597 public boolean getExperimental() { 10598 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 10599 } 10600 10601 /** 10602 * @param value A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 10603 */ 10604 public TestScript setExperimental(boolean value) { 10605 if (this.experimental == null) 10606 this.experimental = new BooleanType(); 10607 this.experimental.setValue(value); 10608 return this; 10609 } 10610 10611 /** 10612 * @return {@link #date} (The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 10613 */ 10614 public DateTimeType getDateElement() { 10615 if (this.date == null) 10616 if (Configuration.errorOnAutoCreate()) 10617 throw new Error("Attempt to auto-create TestScript.date"); 10618 else if (Configuration.doAutoCreate()) 10619 this.date = new DateTimeType(); // bb 10620 return this.date; 10621 } 10622 10623 public boolean hasDateElement() { 10624 return this.date != null && !this.date.isEmpty(); 10625 } 10626 10627 public boolean hasDate() { 10628 return this.date != null && !this.date.isEmpty(); 10629 } 10630 10631 /** 10632 * @param value {@link #date} (The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 10633 */ 10634 public TestScript setDateElement(DateTimeType value) { 10635 this.date = value; 10636 return this; 10637 } 10638 10639 /** 10640 * @return The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes. 10641 */ 10642 public Date getDate() { 10643 return this.date == null ? null : this.date.getValue(); 10644 } 10645 10646 /** 10647 * @param value The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes. 10648 */ 10649 public TestScript setDate(Date value) { 10650 if (value == null) 10651 this.date = null; 10652 else { 10653 if (this.date == null) 10654 this.date = new DateTimeType(); 10655 this.date.setValue(value); 10656 } 10657 return this; 10658 } 10659 10660 /** 10661 * @return {@link #publisher} (The name of the individual or organization that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 10662 */ 10663 public StringType getPublisherElement() { 10664 if (this.publisher == null) 10665 if (Configuration.errorOnAutoCreate()) 10666 throw new Error("Attempt to auto-create TestScript.publisher"); 10667 else if (Configuration.doAutoCreate()) 10668 this.publisher = new StringType(); // bb 10669 return this.publisher; 10670 } 10671 10672 public boolean hasPublisherElement() { 10673 return this.publisher != null && !this.publisher.isEmpty(); 10674 } 10675 10676 public boolean hasPublisher() { 10677 return this.publisher != null && !this.publisher.isEmpty(); 10678 } 10679 10680 /** 10681 * @param value {@link #publisher} (The name of the individual or organization that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 10682 */ 10683 public TestScript setPublisherElement(StringType value) { 10684 this.publisher = value; 10685 return this; 10686 } 10687 10688 /** 10689 * @return The name of the individual or organization that published the test script. 10690 */ 10691 public String getPublisher() { 10692 return this.publisher == null ? null : this.publisher.getValue(); 10693 } 10694 10695 /** 10696 * @param value The name of the individual or organization that published the test script. 10697 */ 10698 public TestScript setPublisher(String value) { 10699 if (Utilities.noString(value)) 10700 this.publisher = null; 10701 else { 10702 if (this.publisher == null) 10703 this.publisher = new StringType(); 10704 this.publisher.setValue(value); 10705 } 10706 return this; 10707 } 10708 10709 /** 10710 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 10711 */ 10712 public List<ContactDetail> getContact() { 10713 if (this.contact == null) 10714 this.contact = new ArrayList<ContactDetail>(); 10715 return this.contact; 10716 } 10717 10718 /** 10719 * @return Returns a reference to <code>this</code> for easy method chaining 10720 */ 10721 public TestScript setContact(List<ContactDetail> theContact) { 10722 this.contact = theContact; 10723 return this; 10724 } 10725 10726 public boolean hasContact() { 10727 if (this.contact == null) 10728 return false; 10729 for (ContactDetail item : this.contact) 10730 if (!item.isEmpty()) 10731 return true; 10732 return false; 10733 } 10734 10735 public ContactDetail addContact() { //3 10736 ContactDetail t = new ContactDetail(); 10737 if (this.contact == null) 10738 this.contact = new ArrayList<ContactDetail>(); 10739 this.contact.add(t); 10740 return t; 10741 } 10742 10743 public TestScript addContact(ContactDetail t) { //3 10744 if (t == null) 10745 return this; 10746 if (this.contact == null) 10747 this.contact = new ArrayList<ContactDetail>(); 10748 this.contact.add(t); 10749 return this; 10750 } 10751 10752 /** 10753 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 10754 */ 10755 public ContactDetail getContactFirstRep() { 10756 if (getContact().isEmpty()) { 10757 addContact(); 10758 } 10759 return getContact().get(0); 10760 } 10761 10762 /** 10763 * @return {@link #description} (A free text natural language description of the test script from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 10764 */ 10765 public MarkdownType getDescriptionElement() { 10766 if (this.description == null) 10767 if (Configuration.errorOnAutoCreate()) 10768 throw new Error("Attempt to auto-create TestScript.description"); 10769 else if (Configuration.doAutoCreate()) 10770 this.description = new MarkdownType(); // bb 10771 return this.description; 10772 } 10773 10774 public boolean hasDescriptionElement() { 10775 return this.description != null && !this.description.isEmpty(); 10776 } 10777 10778 public boolean hasDescription() { 10779 return this.description != null && !this.description.isEmpty(); 10780 } 10781 10782 /** 10783 * @param value {@link #description} (A free text natural language description of the test script from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 10784 */ 10785 public TestScript setDescriptionElement(MarkdownType value) { 10786 this.description = value; 10787 return this; 10788 } 10789 10790 /** 10791 * @return A free text natural language description of the test script from a consumer's perspective. 10792 */ 10793 public String getDescription() { 10794 return this.description == null ? null : this.description.getValue(); 10795 } 10796 10797 /** 10798 * @param value A free text natural language description of the test script from a consumer's perspective. 10799 */ 10800 public TestScript setDescription(String value) { 10801 if (value == null) 10802 this.description = null; 10803 else { 10804 if (this.description == null) 10805 this.description = new MarkdownType(); 10806 this.description.setValue(value); 10807 } 10808 return this; 10809 } 10810 10811 /** 10812 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.) 10813 */ 10814 public List<UsageContext> getUseContext() { 10815 if (this.useContext == null) 10816 this.useContext = new ArrayList<UsageContext>(); 10817 return this.useContext; 10818 } 10819 10820 /** 10821 * @return Returns a reference to <code>this</code> for easy method chaining 10822 */ 10823 public TestScript setUseContext(List<UsageContext> theUseContext) { 10824 this.useContext = theUseContext; 10825 return this; 10826 } 10827 10828 public boolean hasUseContext() { 10829 if (this.useContext == null) 10830 return false; 10831 for (UsageContext item : this.useContext) 10832 if (!item.isEmpty()) 10833 return true; 10834 return false; 10835 } 10836 10837 public UsageContext addUseContext() { //3 10838 UsageContext t = new UsageContext(); 10839 if (this.useContext == null) 10840 this.useContext = new ArrayList<UsageContext>(); 10841 this.useContext.add(t); 10842 return t; 10843 } 10844 10845 public TestScript addUseContext(UsageContext t) { //3 10846 if (t == null) 10847 return this; 10848 if (this.useContext == null) 10849 this.useContext = new ArrayList<UsageContext>(); 10850 this.useContext.add(t); 10851 return this; 10852 } 10853 10854 /** 10855 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 10856 */ 10857 public UsageContext getUseContextFirstRep() { 10858 if (getUseContext().isEmpty()) { 10859 addUseContext(); 10860 } 10861 return getUseContext().get(0); 10862 } 10863 10864 /** 10865 * @return {@link #jurisdiction} (A legal or geographic region in which the test script is intended to be used.) 10866 */ 10867 public List<CodeableConcept> getJurisdiction() { 10868 if (this.jurisdiction == null) 10869 this.jurisdiction = new ArrayList<CodeableConcept>(); 10870 return this.jurisdiction; 10871 } 10872 10873 /** 10874 * @return Returns a reference to <code>this</code> for easy method chaining 10875 */ 10876 public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) { 10877 this.jurisdiction = theJurisdiction; 10878 return this; 10879 } 10880 10881 public boolean hasJurisdiction() { 10882 if (this.jurisdiction == null) 10883 return false; 10884 for (CodeableConcept item : this.jurisdiction) 10885 if (!item.isEmpty()) 10886 return true; 10887 return false; 10888 } 10889 10890 public CodeableConcept addJurisdiction() { //3 10891 CodeableConcept t = new CodeableConcept(); 10892 if (this.jurisdiction == null) 10893 this.jurisdiction = new ArrayList<CodeableConcept>(); 10894 this.jurisdiction.add(t); 10895 return t; 10896 } 10897 10898 public TestScript addJurisdiction(CodeableConcept t) { //3 10899 if (t == null) 10900 return this; 10901 if (this.jurisdiction == null) 10902 this.jurisdiction = new ArrayList<CodeableConcept>(); 10903 this.jurisdiction.add(t); 10904 return this; 10905 } 10906 10907 /** 10908 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 10909 */ 10910 public CodeableConcept getJurisdictionFirstRep() { 10911 if (getJurisdiction().isEmpty()) { 10912 addJurisdiction(); 10913 } 10914 return getJurisdiction().get(0); 10915 } 10916 10917 /** 10918 * @return {@link #purpose} (Explaination of why this test script is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 10919 */ 10920 public MarkdownType getPurposeElement() { 10921 if (this.purpose == null) 10922 if (Configuration.errorOnAutoCreate()) 10923 throw new Error("Attempt to auto-create TestScript.purpose"); 10924 else if (Configuration.doAutoCreate()) 10925 this.purpose = new MarkdownType(); // bb 10926 return this.purpose; 10927 } 10928 10929 public boolean hasPurposeElement() { 10930 return this.purpose != null && !this.purpose.isEmpty(); 10931 } 10932 10933 public boolean hasPurpose() { 10934 return this.purpose != null && !this.purpose.isEmpty(); 10935 } 10936 10937 /** 10938 * @param value {@link #purpose} (Explaination of why this test script is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 10939 */ 10940 public TestScript setPurposeElement(MarkdownType value) { 10941 this.purpose = value; 10942 return this; 10943 } 10944 10945 /** 10946 * @return Explaination of why this test script is needed and why it has been designed as it has. 10947 */ 10948 public String getPurpose() { 10949 return this.purpose == null ? null : this.purpose.getValue(); 10950 } 10951 10952 /** 10953 * @param value Explaination of why this test script is needed and why it has been designed as it has. 10954 */ 10955 public TestScript setPurpose(String value) { 10956 if (value == null) 10957 this.purpose = null; 10958 else { 10959 if (this.purpose == null) 10960 this.purpose = new MarkdownType(); 10961 this.purpose.setValue(value); 10962 } 10963 return this; 10964 } 10965 10966 /** 10967 * @return {@link #copyright} (A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 10968 */ 10969 public MarkdownType getCopyrightElement() { 10970 if (this.copyright == null) 10971 if (Configuration.errorOnAutoCreate()) 10972 throw new Error("Attempt to auto-create TestScript.copyright"); 10973 else if (Configuration.doAutoCreate()) 10974 this.copyright = new MarkdownType(); // bb 10975 return this.copyright; 10976 } 10977 10978 public boolean hasCopyrightElement() { 10979 return this.copyright != null && !this.copyright.isEmpty(); 10980 } 10981 10982 public boolean hasCopyright() { 10983 return this.copyright != null && !this.copyright.isEmpty(); 10984 } 10985 10986 /** 10987 * @param value {@link #copyright} (A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 10988 */ 10989 public TestScript setCopyrightElement(MarkdownType value) { 10990 this.copyright = value; 10991 return this; 10992 } 10993 10994 /** 10995 * @return A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script. 10996 */ 10997 public String getCopyright() { 10998 return this.copyright == null ? null : this.copyright.getValue(); 10999 } 11000 11001 /** 11002 * @param value A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script. 11003 */ 11004 public TestScript setCopyright(String value) { 11005 if (value == null) 11006 this.copyright = null; 11007 else { 11008 if (this.copyright == null) 11009 this.copyright = new MarkdownType(); 11010 this.copyright.setValue(value); 11011 } 11012 return this; 11013 } 11014 11015 /** 11016 * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) 11017 */ 11018 public List<TestScriptOriginComponent> getOrigin() { 11019 if (this.origin == null) 11020 this.origin = new ArrayList<TestScriptOriginComponent>(); 11021 return this.origin; 11022 } 11023 11024 /** 11025 * @return Returns a reference to <code>this</code> for easy method chaining 11026 */ 11027 public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) { 11028 this.origin = theOrigin; 11029 return this; 11030 } 11031 11032 public boolean hasOrigin() { 11033 if (this.origin == null) 11034 return false; 11035 for (TestScriptOriginComponent item : this.origin) 11036 if (!item.isEmpty()) 11037 return true; 11038 return false; 11039 } 11040 11041 public TestScriptOriginComponent addOrigin() { //3 11042 TestScriptOriginComponent t = new TestScriptOriginComponent(); 11043 if (this.origin == null) 11044 this.origin = new ArrayList<TestScriptOriginComponent>(); 11045 this.origin.add(t); 11046 return t; 11047 } 11048 11049 public TestScript addOrigin(TestScriptOriginComponent t) { //3 11050 if (t == null) 11051 return this; 11052 if (this.origin == null) 11053 this.origin = new ArrayList<TestScriptOriginComponent>(); 11054 this.origin.add(t); 11055 return this; 11056 } 11057 11058 /** 11059 * @return The first repetition of repeating field {@link #origin}, creating it if it does not already exist 11060 */ 11061 public TestScriptOriginComponent getOriginFirstRep() { 11062 if (getOrigin().isEmpty()) { 11063 addOrigin(); 11064 } 11065 return getOrigin().get(0); 11066 } 11067 11068 /** 11069 * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.) 11070 */ 11071 public List<TestScriptDestinationComponent> getDestination() { 11072 if (this.destination == null) 11073 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11074 return this.destination; 11075 } 11076 11077 /** 11078 * @return Returns a reference to <code>this</code> for easy method chaining 11079 */ 11080 public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) { 11081 this.destination = theDestination; 11082 return this; 11083 } 11084 11085 public boolean hasDestination() { 11086 if (this.destination == null) 11087 return false; 11088 for (TestScriptDestinationComponent item : this.destination) 11089 if (!item.isEmpty()) 11090 return true; 11091 return false; 11092 } 11093 11094 public TestScriptDestinationComponent addDestination() { //3 11095 TestScriptDestinationComponent t = new TestScriptDestinationComponent(); 11096 if (this.destination == null) 11097 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11098 this.destination.add(t); 11099 return t; 11100 } 11101 11102 public TestScript addDestination(TestScriptDestinationComponent t) { //3 11103 if (t == null) 11104 return this; 11105 if (this.destination == null) 11106 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11107 this.destination.add(t); 11108 return this; 11109 } 11110 11111 /** 11112 * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist 11113 */ 11114 public TestScriptDestinationComponent getDestinationFirstRep() { 11115 if (getDestination().isEmpty()) { 11116 addDestination(); 11117 } 11118 return getDestination().get(0); 11119 } 11120 11121 /** 11122 * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 11123 */ 11124 public TestScriptMetadataComponent getMetadata() { 11125 if (this.metadata == null) 11126 if (Configuration.errorOnAutoCreate()) 11127 throw new Error("Attempt to auto-create TestScript.metadata"); 11128 else if (Configuration.doAutoCreate()) 11129 this.metadata = new TestScriptMetadataComponent(); // cc 11130 return this.metadata; 11131 } 11132 11133 public boolean hasMetadata() { 11134 return this.metadata != null && !this.metadata.isEmpty(); 11135 } 11136 11137 /** 11138 * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 11139 */ 11140 public TestScript setMetadata(TestScriptMetadataComponent value) { 11141 this.metadata = value; 11142 return this; 11143 } 11144 11145 /** 11146 * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) 11147 */ 11148 public List<TestScriptFixtureComponent> getFixture() { 11149 if (this.fixture == null) 11150 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11151 return this.fixture; 11152 } 11153 11154 /** 11155 * @return Returns a reference to <code>this</code> for easy method chaining 11156 */ 11157 public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) { 11158 this.fixture = theFixture; 11159 return this; 11160 } 11161 11162 public boolean hasFixture() { 11163 if (this.fixture == null) 11164 return false; 11165 for (TestScriptFixtureComponent item : this.fixture) 11166 if (!item.isEmpty()) 11167 return true; 11168 return false; 11169 } 11170 11171 public TestScriptFixtureComponent addFixture() { //3 11172 TestScriptFixtureComponent t = new TestScriptFixtureComponent(); 11173 if (this.fixture == null) 11174 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11175 this.fixture.add(t); 11176 return t; 11177 } 11178 11179 public TestScript addFixture(TestScriptFixtureComponent t) { //3 11180 if (t == null) 11181 return this; 11182 if (this.fixture == null) 11183 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11184 this.fixture.add(t); 11185 return this; 11186 } 11187 11188 /** 11189 * @return The first repetition of repeating field {@link #fixture}, creating it if it does not already exist 11190 */ 11191 public TestScriptFixtureComponent getFixtureFirstRep() { 11192 if (getFixture().isEmpty()) { 11193 addFixture(); 11194 } 11195 return getFixture().get(0); 11196 } 11197 11198 /** 11199 * @return {@link #profile} (Reference to the profile to be used for validation.) 11200 */ 11201 public List<Reference> getProfile() { 11202 if (this.profile == null) 11203 this.profile = new ArrayList<Reference>(); 11204 return this.profile; 11205 } 11206 11207 /** 11208 * @return Returns a reference to <code>this</code> for easy method chaining 11209 */ 11210 public TestScript setProfile(List<Reference> theProfile) { 11211 this.profile = theProfile; 11212 return this; 11213 } 11214 11215 public boolean hasProfile() { 11216 if (this.profile == null) 11217 return false; 11218 for (Reference item : this.profile) 11219 if (!item.isEmpty()) 11220 return true; 11221 return false; 11222 } 11223 11224 public Reference addProfile() { //3 11225 Reference t = new Reference(); 11226 if (this.profile == null) 11227 this.profile = new ArrayList<Reference>(); 11228 this.profile.add(t); 11229 return t; 11230 } 11231 11232 public TestScript addProfile(Reference t) { //3 11233 if (t == null) 11234 return this; 11235 if (this.profile == null) 11236 this.profile = new ArrayList<Reference>(); 11237 this.profile.add(t); 11238 return this; 11239 } 11240 11241 /** 11242 * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist 11243 */ 11244 public Reference getProfileFirstRep() { 11245 if (getProfile().isEmpty()) { 11246 addProfile(); 11247 } 11248 return getProfile().get(0); 11249 } 11250 11251 /** 11252 * @deprecated Use Reference#setResource(IBaseResource) instead 11253 */ 11254 @Deprecated 11255 public List<Resource> getProfileTarget() { 11256 if (this.profileTarget == null) 11257 this.profileTarget = new ArrayList<Resource>(); 11258 return this.profileTarget; 11259 } 11260 11261 /** 11262 * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) 11263 */ 11264 public List<TestScriptVariableComponent> getVariable() { 11265 if (this.variable == null) 11266 this.variable = new ArrayList<TestScriptVariableComponent>(); 11267 return this.variable; 11268 } 11269 11270 /** 11271 * @return Returns a reference to <code>this</code> for easy method chaining 11272 */ 11273 public TestScript setVariable(List<TestScriptVariableComponent> theVariable) { 11274 this.variable = theVariable; 11275 return this; 11276 } 11277 11278 public boolean hasVariable() { 11279 if (this.variable == null) 11280 return false; 11281 for (TestScriptVariableComponent item : this.variable) 11282 if (!item.isEmpty()) 11283 return true; 11284 return false; 11285 } 11286 11287 public TestScriptVariableComponent addVariable() { //3 11288 TestScriptVariableComponent t = new TestScriptVariableComponent(); 11289 if (this.variable == null) 11290 this.variable = new ArrayList<TestScriptVariableComponent>(); 11291 this.variable.add(t); 11292 return t; 11293 } 11294 11295 public TestScript addVariable(TestScriptVariableComponent t) { //3 11296 if (t == null) 11297 return this; 11298 if (this.variable == null) 11299 this.variable = new ArrayList<TestScriptVariableComponent>(); 11300 this.variable.add(t); 11301 return this; 11302 } 11303 11304 /** 11305 * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist 11306 */ 11307 public TestScriptVariableComponent getVariableFirstRep() { 11308 if (getVariable().isEmpty()) { 11309 addVariable(); 11310 } 11311 return getVariable().get(0); 11312 } 11313 11314 /** 11315 * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.) 11316 */ 11317 public List<TestScriptRuleComponent> getRule() { 11318 if (this.rule == null) 11319 this.rule = new ArrayList<TestScriptRuleComponent>(); 11320 return this.rule; 11321 } 11322 11323 /** 11324 * @return Returns a reference to <code>this</code> for easy method chaining 11325 */ 11326 public TestScript setRule(List<TestScriptRuleComponent> theRule) { 11327 this.rule = theRule; 11328 return this; 11329 } 11330 11331 public boolean hasRule() { 11332 if (this.rule == null) 11333 return false; 11334 for (TestScriptRuleComponent item : this.rule) 11335 if (!item.isEmpty()) 11336 return true; 11337 return false; 11338 } 11339 11340 public TestScriptRuleComponent addRule() { //3 11341 TestScriptRuleComponent t = new TestScriptRuleComponent(); 11342 if (this.rule == null) 11343 this.rule = new ArrayList<TestScriptRuleComponent>(); 11344 this.rule.add(t); 11345 return t; 11346 } 11347 11348 public TestScript addRule(TestScriptRuleComponent t) { //3 11349 if (t == null) 11350 return this; 11351 if (this.rule == null) 11352 this.rule = new ArrayList<TestScriptRuleComponent>(); 11353 this.rule.add(t); 11354 return this; 11355 } 11356 11357 /** 11358 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 11359 */ 11360 public TestScriptRuleComponent getRuleFirstRep() { 11361 if (getRule().isEmpty()) { 11362 addRule(); 11363 } 11364 return getRule().get(0); 11365 } 11366 11367 /** 11368 * @return {@link #ruleset} (Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.) 11369 */ 11370 public List<TestScriptRulesetComponent> getRuleset() { 11371 if (this.ruleset == null) 11372 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11373 return this.ruleset; 11374 } 11375 11376 /** 11377 * @return Returns a reference to <code>this</code> for easy method chaining 11378 */ 11379 public TestScript setRuleset(List<TestScriptRulesetComponent> theRuleset) { 11380 this.ruleset = theRuleset; 11381 return this; 11382 } 11383 11384 public boolean hasRuleset() { 11385 if (this.ruleset == null) 11386 return false; 11387 for (TestScriptRulesetComponent item : this.ruleset) 11388 if (!item.isEmpty()) 11389 return true; 11390 return false; 11391 } 11392 11393 public TestScriptRulesetComponent addRuleset() { //3 11394 TestScriptRulesetComponent t = new TestScriptRulesetComponent(); 11395 if (this.ruleset == null) 11396 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11397 this.ruleset.add(t); 11398 return t; 11399 } 11400 11401 public TestScript addRuleset(TestScriptRulesetComponent t) { //3 11402 if (t == null) 11403 return this; 11404 if (this.ruleset == null) 11405 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11406 this.ruleset.add(t); 11407 return this; 11408 } 11409 11410 /** 11411 * @return The first repetition of repeating field {@link #ruleset}, creating it if it does not already exist 11412 */ 11413 public TestScriptRulesetComponent getRulesetFirstRep() { 11414 if (getRuleset().isEmpty()) { 11415 addRuleset(); 11416 } 11417 return getRuleset().get(0); 11418 } 11419 11420 /** 11421 * @return {@link #setup} (A series of required setup operations before tests are executed.) 11422 */ 11423 public TestScriptSetupComponent getSetup() { 11424 if (this.setup == null) 11425 if (Configuration.errorOnAutoCreate()) 11426 throw new Error("Attempt to auto-create TestScript.setup"); 11427 else if (Configuration.doAutoCreate()) 11428 this.setup = new TestScriptSetupComponent(); // cc 11429 return this.setup; 11430 } 11431 11432 public boolean hasSetup() { 11433 return this.setup != null && !this.setup.isEmpty(); 11434 } 11435 11436 /** 11437 * @param value {@link #setup} (A series of required setup operations before tests are executed.) 11438 */ 11439 public TestScript setSetup(TestScriptSetupComponent value) { 11440 this.setup = value; 11441 return this; 11442 } 11443 11444 /** 11445 * @return {@link #test} (A test in this script.) 11446 */ 11447 public List<TestScriptTestComponent> getTest() { 11448 if (this.test == null) 11449 this.test = new ArrayList<TestScriptTestComponent>(); 11450 return this.test; 11451 } 11452 11453 /** 11454 * @return Returns a reference to <code>this</code> for easy method chaining 11455 */ 11456 public TestScript setTest(List<TestScriptTestComponent> theTest) { 11457 this.test = theTest; 11458 return this; 11459 } 11460 11461 public boolean hasTest() { 11462 if (this.test == null) 11463 return false; 11464 for (TestScriptTestComponent item : this.test) 11465 if (!item.isEmpty()) 11466 return true; 11467 return false; 11468 } 11469 11470 public TestScriptTestComponent addTest() { //3 11471 TestScriptTestComponent t = new TestScriptTestComponent(); 11472 if (this.test == null) 11473 this.test = new ArrayList<TestScriptTestComponent>(); 11474 this.test.add(t); 11475 return t; 11476 } 11477 11478 public TestScript addTest(TestScriptTestComponent t) { //3 11479 if (t == null) 11480 return this; 11481 if (this.test == null) 11482 this.test = new ArrayList<TestScriptTestComponent>(); 11483 this.test.add(t); 11484 return this; 11485 } 11486 11487 /** 11488 * @return The first repetition of repeating field {@link #test}, creating it if it does not already exist 11489 */ 11490 public TestScriptTestComponent getTestFirstRep() { 11491 if (getTest().isEmpty()) { 11492 addTest(); 11493 } 11494 return getTest().get(0); 11495 } 11496 11497 /** 11498 * @return {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 11499 */ 11500 public TestScriptTeardownComponent getTeardown() { 11501 if (this.teardown == null) 11502 if (Configuration.errorOnAutoCreate()) 11503 throw new Error("Attempt to auto-create TestScript.teardown"); 11504 else if (Configuration.doAutoCreate()) 11505 this.teardown = new TestScriptTeardownComponent(); // cc 11506 return this.teardown; 11507 } 11508 11509 public boolean hasTeardown() { 11510 return this.teardown != null && !this.teardown.isEmpty(); 11511 } 11512 11513 /** 11514 * @param value {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 11515 */ 11516 public TestScript setTeardown(TestScriptTeardownComponent value) { 11517 this.teardown = value; 11518 return this; 11519 } 11520 11521 protected void listChildren(List<Property> childrenList) { 11522 super.listChildren(childrenList); 11523 childrenList.add(new Property("url", "uri", "An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).", 0, java.lang.Integer.MAX_VALUE, url)); 11524 childrenList.add(new Property("identifier", "Identifier", "A formal identifier that is used to identify this test script when it is represented in other formats, or referenced in a specification, model, design or an instance.", 0, java.lang.Integer.MAX_VALUE, identifier)); 11525 childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the test script when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the test script author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence.", 0, java.lang.Integer.MAX_VALUE, version)); 11526 childrenList.add(new Property("name", "string", "A natural language name identifying the test script. This name should be usable as an identifier for the module by machine processing applications such as code generation.", 0, java.lang.Integer.MAX_VALUE, name)); 11527 childrenList.add(new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, java.lang.Integer.MAX_VALUE, title)); 11528 childrenList.add(new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, java.lang.Integer.MAX_VALUE, status)); 11529 childrenList.add(new Property("experimental", "boolean", "A boolean value to indicate that this test script is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); 11530 childrenList.add(new Property("date", "dateTime", "The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.", 0, java.lang.Integer.MAX_VALUE, date)); 11531 childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the test script.", 0, java.lang.Integer.MAX_VALUE, publisher)); 11532 childrenList.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 11533 childrenList.add(new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, java.lang.Integer.MAX_VALUE, description)); 11534 childrenList.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 11535 childrenList.add(new Property("jurisdiction", "CodeableConcept", "A legal or geographic region in which the test script is intended to be used.", 0, java.lang.Integer.MAX_VALUE, jurisdiction)); 11536 childrenList.add(new Property("purpose", "markdown", "Explaination of why this test script is needed and why it has been designed as it has.", 0, java.lang.Integer.MAX_VALUE, purpose)); 11537 childrenList.add(new Property("copyright", "markdown", "A copyright statement relating to the test script and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the test script.", 0, java.lang.Integer.MAX_VALUE, copyright)); 11538 childrenList.add(new Property("origin", "", "An abstract server used in operations within this test script in the origin element.", 0, java.lang.Integer.MAX_VALUE, origin)); 11539 childrenList.add(new Property("destination", "", "An abstract server used in operations within this test script in the destination element.", 0, java.lang.Integer.MAX_VALUE, destination)); 11540 childrenList.add(new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); 11541 childrenList.add(new Property("fixture", "", "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", 0, java.lang.Integer.MAX_VALUE, fixture)); 11542 childrenList.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile)); 11543 childrenList.add(new Property("variable", "", "Variable is set based either on element value in response body or on header field value in the response headers.", 0, java.lang.Integer.MAX_VALUE, variable)); 11544 childrenList.add(new Property("rule", "", "Assert rule to be used in one or more asserts within the test script.", 0, java.lang.Integer.MAX_VALUE, rule)); 11545 childrenList.add(new Property("ruleset", "", "Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.", 0, java.lang.Integer.MAX_VALUE, ruleset)); 11546 childrenList.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, java.lang.Integer.MAX_VALUE, setup)); 11547 childrenList.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test)); 11548 childrenList.add(new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, java.lang.Integer.MAX_VALUE, teardown)); 11549 } 11550 11551 @Override 11552 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 11553 switch (hash) { 11554 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 11555 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 11556 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 11557 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 11558 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 11559 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 11560 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 11561 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 11562 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 11563 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 11564 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 11565 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 11566 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 11567 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 11568 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 11569 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent 11570 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent 11571 case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent 11572 case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent 11573 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference 11574 case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent 11575 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // TestScriptRuleComponent 11576 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : this.ruleset.toArray(new Base[this.ruleset.size()]); // TestScriptRulesetComponent 11577 case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent 11578 case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent 11579 case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent 11580 default: return super.getProperty(hash, name, checkValid); 11581 } 11582 11583 } 11584 11585 @Override 11586 public Base setProperty(int hash, String name, Base value) throws FHIRException { 11587 switch (hash) { 11588 case 116079: // url 11589 this.url = castToUri(value); // UriType 11590 return value; 11591 case -1618432855: // identifier 11592 this.identifier = castToIdentifier(value); // Identifier 11593 return value; 11594 case 351608024: // version 11595 this.version = castToString(value); // StringType 11596 return value; 11597 case 3373707: // name 11598 this.name = castToString(value); // StringType 11599 return value; 11600 case 110371416: // title 11601 this.title = castToString(value); // StringType 11602 return value; 11603 case -892481550: // status 11604 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 11605 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 11606 return value; 11607 case -404562712: // experimental 11608 this.experimental = castToBoolean(value); // BooleanType 11609 return value; 11610 case 3076014: // date 11611 this.date = castToDateTime(value); // DateTimeType 11612 return value; 11613 case 1447404028: // publisher 11614 this.publisher = castToString(value); // StringType 11615 return value; 11616 case 951526432: // contact 11617 this.getContact().add(castToContactDetail(value)); // ContactDetail 11618 return value; 11619 case -1724546052: // description 11620 this.description = castToMarkdown(value); // MarkdownType 11621 return value; 11622 case -669707736: // useContext 11623 this.getUseContext().add(castToUsageContext(value)); // UsageContext 11624 return value; 11625 case -507075711: // jurisdiction 11626 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 11627 return value; 11628 case -220463842: // purpose 11629 this.purpose = castToMarkdown(value); // MarkdownType 11630 return value; 11631 case 1522889671: // copyright 11632 this.copyright = castToMarkdown(value); // MarkdownType 11633 return value; 11634 case -1008619738: // origin 11635 this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent 11636 return value; 11637 case -1429847026: // destination 11638 this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent 11639 return value; 11640 case -450004177: // metadata 11641 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 11642 return value; 11643 case -843449847: // fixture 11644 this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent 11645 return value; 11646 case -309425751: // profile 11647 this.getProfile().add(castToReference(value)); // Reference 11648 return value; 11649 case -1249586564: // variable 11650 this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent 11651 return value; 11652 case 3512060: // rule 11653 this.getRule().add((TestScriptRuleComponent) value); // TestScriptRuleComponent 11654 return value; 11655 case 1548678118: // ruleset 11656 this.getRuleset().add((TestScriptRulesetComponent) value); // TestScriptRulesetComponent 11657 return value; 11658 case 109329021: // setup 11659 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 11660 return value; 11661 case 3556498: // test 11662 this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent 11663 return value; 11664 case -1663474172: // teardown 11665 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 11666 return value; 11667 default: return super.setProperty(hash, name, value); 11668 } 11669 11670 } 11671 11672 @Override 11673 public Base setProperty(String name, Base value) throws FHIRException { 11674 if (name.equals("url")) { 11675 this.url = castToUri(value); // UriType 11676 } else if (name.equals("identifier")) { 11677 this.identifier = castToIdentifier(value); // Identifier 11678 } else if (name.equals("version")) { 11679 this.version = castToString(value); // StringType 11680 } else if (name.equals("name")) { 11681 this.name = castToString(value); // StringType 11682 } else if (name.equals("title")) { 11683 this.title = castToString(value); // StringType 11684 } else if (name.equals("status")) { 11685 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 11686 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 11687 } else if (name.equals("experimental")) { 11688 this.experimental = castToBoolean(value); // BooleanType 11689 } else if (name.equals("date")) { 11690 this.date = castToDateTime(value); // DateTimeType 11691 } else if (name.equals("publisher")) { 11692 this.publisher = castToString(value); // StringType 11693 } else if (name.equals("contact")) { 11694 this.getContact().add(castToContactDetail(value)); 11695 } else if (name.equals("description")) { 11696 this.description = castToMarkdown(value); // MarkdownType 11697 } else if (name.equals("useContext")) { 11698 this.getUseContext().add(castToUsageContext(value)); 11699 } else if (name.equals("jurisdiction")) { 11700 this.getJurisdiction().add(castToCodeableConcept(value)); 11701 } else if (name.equals("purpose")) { 11702 this.purpose = castToMarkdown(value); // MarkdownType 11703 } else if (name.equals("copyright")) { 11704 this.copyright = castToMarkdown(value); // MarkdownType 11705 } else if (name.equals("origin")) { 11706 this.getOrigin().add((TestScriptOriginComponent) value); 11707 } else if (name.equals("destination")) { 11708 this.getDestination().add((TestScriptDestinationComponent) value); 11709 } else if (name.equals("metadata")) { 11710 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 11711 } else if (name.equals("fixture")) { 11712 this.getFixture().add((TestScriptFixtureComponent) value); 11713 } else if (name.equals("profile")) { 11714 this.getProfile().add(castToReference(value)); 11715 } else if (name.equals("variable")) { 11716 this.getVariable().add((TestScriptVariableComponent) value); 11717 } else if (name.equals("rule")) { 11718 this.getRule().add((TestScriptRuleComponent) value); 11719 } else if (name.equals("ruleset")) { 11720 this.getRuleset().add((TestScriptRulesetComponent) value); 11721 } else if (name.equals("setup")) { 11722 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 11723 } else if (name.equals("test")) { 11724 this.getTest().add((TestScriptTestComponent) value); 11725 } else if (name.equals("teardown")) { 11726 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 11727 } else 11728 return super.setProperty(name, value); 11729 return value; 11730 } 11731 11732 @Override 11733 public Base makeProperty(int hash, String name) throws FHIRException { 11734 switch (hash) { 11735 case 116079: return getUrlElement(); 11736 case -1618432855: return getIdentifier(); 11737 case 351608024: return getVersionElement(); 11738 case 3373707: return getNameElement(); 11739 case 110371416: return getTitleElement(); 11740 case -892481550: return getStatusElement(); 11741 case -404562712: return getExperimentalElement(); 11742 case 3076014: return getDateElement(); 11743 case 1447404028: return getPublisherElement(); 11744 case 951526432: return addContact(); 11745 case -1724546052: return getDescriptionElement(); 11746 case -669707736: return addUseContext(); 11747 case -507075711: return addJurisdiction(); 11748 case -220463842: return getPurposeElement(); 11749 case 1522889671: return getCopyrightElement(); 11750 case -1008619738: return addOrigin(); 11751 case -1429847026: return addDestination(); 11752 case -450004177: return getMetadata(); 11753 case -843449847: return addFixture(); 11754 case -309425751: return addProfile(); 11755 case -1249586564: return addVariable(); 11756 case 3512060: return addRule(); 11757 case 1548678118: return addRuleset(); 11758 case 109329021: return getSetup(); 11759 case 3556498: return addTest(); 11760 case -1663474172: return getTeardown(); 11761 default: return super.makeProperty(hash, name); 11762 } 11763 11764 } 11765 11766 @Override 11767 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 11768 switch (hash) { 11769 case 116079: /*url*/ return new String[] {"uri"}; 11770 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 11771 case 351608024: /*version*/ return new String[] {"string"}; 11772 case 3373707: /*name*/ return new String[] {"string"}; 11773 case 110371416: /*title*/ return new String[] {"string"}; 11774 case -892481550: /*status*/ return new String[] {"code"}; 11775 case -404562712: /*experimental*/ return new String[] {"boolean"}; 11776 case 3076014: /*date*/ return new String[] {"dateTime"}; 11777 case 1447404028: /*publisher*/ return new String[] {"string"}; 11778 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 11779 case -1724546052: /*description*/ return new String[] {"markdown"}; 11780 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 11781 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 11782 case -220463842: /*purpose*/ return new String[] {"markdown"}; 11783 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 11784 case -1008619738: /*origin*/ return new String[] {}; 11785 case -1429847026: /*destination*/ return new String[] {}; 11786 case -450004177: /*metadata*/ return new String[] {}; 11787 case -843449847: /*fixture*/ return new String[] {}; 11788 case -309425751: /*profile*/ return new String[] {"Reference"}; 11789 case -1249586564: /*variable*/ return new String[] {}; 11790 case 3512060: /*rule*/ return new String[] {}; 11791 case 1548678118: /*ruleset*/ return new String[] {}; 11792 case 109329021: /*setup*/ return new String[] {}; 11793 case 3556498: /*test*/ return new String[] {}; 11794 case -1663474172: /*teardown*/ return new String[] {}; 11795 default: return super.getTypesForProperty(hash, name); 11796 } 11797 11798 } 11799 11800 @Override 11801 public Base addChild(String name) throws FHIRException { 11802 if (name.equals("url")) { 11803 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 11804 } 11805 else if (name.equals("identifier")) { 11806 this.identifier = new Identifier(); 11807 return this.identifier; 11808 } 11809 else if (name.equals("version")) { 11810 throw new FHIRException("Cannot call addChild on a primitive type TestScript.version"); 11811 } 11812 else if (name.equals("name")) { 11813 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 11814 } 11815 else if (name.equals("title")) { 11816 throw new FHIRException("Cannot call addChild on a primitive type TestScript.title"); 11817 } 11818 else if (name.equals("status")) { 11819 throw new FHIRException("Cannot call addChild on a primitive type TestScript.status"); 11820 } 11821 else if (name.equals("experimental")) { 11822 throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental"); 11823 } 11824 else if (name.equals("date")) { 11825 throw new FHIRException("Cannot call addChild on a primitive type TestScript.date"); 11826 } 11827 else if (name.equals("publisher")) { 11828 throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher"); 11829 } 11830 else if (name.equals("contact")) { 11831 return addContact(); 11832 } 11833 else if (name.equals("description")) { 11834 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 11835 } 11836 else if (name.equals("useContext")) { 11837 return addUseContext(); 11838 } 11839 else if (name.equals("jurisdiction")) { 11840 return addJurisdiction(); 11841 } 11842 else if (name.equals("purpose")) { 11843 throw new FHIRException("Cannot call addChild on a primitive type TestScript.purpose"); 11844 } 11845 else if (name.equals("copyright")) { 11846 throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright"); 11847 } 11848 else if (name.equals("origin")) { 11849 return addOrigin(); 11850 } 11851 else if (name.equals("destination")) { 11852 return addDestination(); 11853 } 11854 else if (name.equals("metadata")) { 11855 this.metadata = new TestScriptMetadataComponent(); 11856 return this.metadata; 11857 } 11858 else if (name.equals("fixture")) { 11859 return addFixture(); 11860 } 11861 else if (name.equals("profile")) { 11862 return addProfile(); 11863 } 11864 else if (name.equals("variable")) { 11865 return addVariable(); 11866 } 11867 else if (name.equals("rule")) { 11868 return addRule(); 11869 } 11870 else if (name.equals("ruleset")) { 11871 return addRuleset(); 11872 } 11873 else if (name.equals("setup")) { 11874 this.setup = new TestScriptSetupComponent(); 11875 return this.setup; 11876 } 11877 else if (name.equals("test")) { 11878 return addTest(); 11879 } 11880 else if (name.equals("teardown")) { 11881 this.teardown = new TestScriptTeardownComponent(); 11882 return this.teardown; 11883 } 11884 else 11885 return super.addChild(name); 11886 } 11887 11888 public String fhirType() { 11889 return "TestScript"; 11890 11891 } 11892 11893 public TestScript copy() { 11894 TestScript dst = new TestScript(); 11895 copyValues(dst); 11896 dst.url = url == null ? null : url.copy(); 11897 dst.identifier = identifier == null ? null : identifier.copy(); 11898 dst.version = version == null ? null : version.copy(); 11899 dst.name = name == null ? null : name.copy(); 11900 dst.title = title == null ? null : title.copy(); 11901 dst.status = status == null ? null : status.copy(); 11902 dst.experimental = experimental == null ? null : experimental.copy(); 11903 dst.date = date == null ? null : date.copy(); 11904 dst.publisher = publisher == null ? null : publisher.copy(); 11905 if (contact != null) { 11906 dst.contact = new ArrayList<ContactDetail>(); 11907 for (ContactDetail i : contact) 11908 dst.contact.add(i.copy()); 11909 }; 11910 dst.description = description == null ? null : description.copy(); 11911 if (useContext != null) { 11912 dst.useContext = new ArrayList<UsageContext>(); 11913 for (UsageContext i : useContext) 11914 dst.useContext.add(i.copy()); 11915 }; 11916 if (jurisdiction != null) { 11917 dst.jurisdiction = new ArrayList<CodeableConcept>(); 11918 for (CodeableConcept i : jurisdiction) 11919 dst.jurisdiction.add(i.copy()); 11920 }; 11921 dst.purpose = purpose == null ? null : purpose.copy(); 11922 dst.copyright = copyright == null ? null : copyright.copy(); 11923 if (origin != null) { 11924 dst.origin = new ArrayList<TestScriptOriginComponent>(); 11925 for (TestScriptOriginComponent i : origin) 11926 dst.origin.add(i.copy()); 11927 }; 11928 if (destination != null) { 11929 dst.destination = new ArrayList<TestScriptDestinationComponent>(); 11930 for (TestScriptDestinationComponent i : destination) 11931 dst.destination.add(i.copy()); 11932 }; 11933 dst.metadata = metadata == null ? null : metadata.copy(); 11934 if (fixture != null) { 11935 dst.fixture = new ArrayList<TestScriptFixtureComponent>(); 11936 for (TestScriptFixtureComponent i : fixture) 11937 dst.fixture.add(i.copy()); 11938 }; 11939 if (profile != null) { 11940 dst.profile = new ArrayList<Reference>(); 11941 for (Reference i : profile) 11942 dst.profile.add(i.copy()); 11943 }; 11944 if (variable != null) { 11945 dst.variable = new ArrayList<TestScriptVariableComponent>(); 11946 for (TestScriptVariableComponent i : variable) 11947 dst.variable.add(i.copy()); 11948 }; 11949 if (rule != null) { 11950 dst.rule = new ArrayList<TestScriptRuleComponent>(); 11951 for (TestScriptRuleComponent i : rule) 11952 dst.rule.add(i.copy()); 11953 }; 11954 if (ruleset != null) { 11955 dst.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11956 for (TestScriptRulesetComponent i : ruleset) 11957 dst.ruleset.add(i.copy()); 11958 }; 11959 dst.setup = setup == null ? null : setup.copy(); 11960 if (test != null) { 11961 dst.test = new ArrayList<TestScriptTestComponent>(); 11962 for (TestScriptTestComponent i : test) 11963 dst.test.add(i.copy()); 11964 }; 11965 dst.teardown = teardown == null ? null : teardown.copy(); 11966 return dst; 11967 } 11968 11969 protected TestScript typedCopy() { 11970 return copy(); 11971 } 11972 11973 @Override 11974 public boolean equalsDeep(Base other) { 11975 if (!super.equalsDeep(other)) 11976 return false; 11977 if (!(other instanceof TestScript)) 11978 return false; 11979 TestScript o = (TestScript) other; 11980 return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true) 11981 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true) 11982 && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true) 11983 && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(setup, o.setup, true) 11984 && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true); 11985 } 11986 11987 @Override 11988 public boolean equalsShallow(Base other) { 11989 if (!super.equalsShallow(other)) 11990 return false; 11991 if (!(other instanceof TestScript)) 11992 return false; 11993 TestScript o = (TestScript) other; 11994 return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true); 11995 } 11996 11997 public boolean isEmpty() { 11998 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright 11999 , origin, destination, metadata, fixture, profile, variable, rule, ruleset, setup 12000 , test, teardown); 12001 } 12002 12003 @Override 12004 public ResourceType getResourceType() { 12005 return ResourceType.TestScript; 12006 } 12007 12008 /** 12009 * Search parameter: <b>date</b> 12010 * <p> 12011 * Description: <b>The test script publication date</b><br> 12012 * Type: <b>date</b><br> 12013 * Path: <b>TestScript.date</b><br> 12014 * </p> 12015 */ 12016 @SearchParamDefinition(name="date", path="TestScript.date", description="The test script publication date", type="date" ) 12017 public static final String SP_DATE = "date"; 12018 /** 12019 * <b>Fluent Client</b> search parameter constant for <b>date</b> 12020 * <p> 12021 * Description: <b>The test script publication date</b><br> 12022 * Type: <b>date</b><br> 12023 * Path: <b>TestScript.date</b><br> 12024 * </p> 12025 */ 12026 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 12027 12028 /** 12029 * Search parameter: <b>identifier</b> 12030 * <p> 12031 * Description: <b>External identifier for the test script</b><br> 12032 * Type: <b>token</b><br> 12033 * Path: <b>TestScript.identifier</b><br> 12034 * </p> 12035 */ 12036 @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier for the test script", type="token" ) 12037 public static final String SP_IDENTIFIER = "identifier"; 12038 /** 12039 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 12040 * <p> 12041 * Description: <b>External identifier for the test script</b><br> 12042 * Type: <b>token</b><br> 12043 * Path: <b>TestScript.identifier</b><br> 12044 * </p> 12045 */ 12046 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 12047 12048 /** 12049 * Search parameter: <b>jurisdiction</b> 12050 * <p> 12051 * Description: <b>Intended jurisdiction for the test script</b><br> 12052 * Type: <b>token</b><br> 12053 * Path: <b>TestScript.jurisdiction</b><br> 12054 * </p> 12055 */ 12056 @SearchParamDefinition(name="jurisdiction", path="TestScript.jurisdiction", description="Intended jurisdiction for the test script", type="token" ) 12057 public static final String SP_JURISDICTION = "jurisdiction"; 12058 /** 12059 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 12060 * <p> 12061 * Description: <b>Intended jurisdiction for the test script</b><br> 12062 * Type: <b>token</b><br> 12063 * Path: <b>TestScript.jurisdiction</b><br> 12064 * </p> 12065 */ 12066 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 12067 12068 /** 12069 * Search parameter: <b>name</b> 12070 * <p> 12071 * Description: <b>Computationally friendly name of the test script</b><br> 12072 * Type: <b>string</b><br> 12073 * Path: <b>TestScript.name</b><br> 12074 * </p> 12075 */ 12076 @SearchParamDefinition(name="name", path="TestScript.name", description="Computationally friendly name of the test script", type="string" ) 12077 public static final String SP_NAME = "name"; 12078 /** 12079 * <b>Fluent Client</b> search parameter constant for <b>name</b> 12080 * <p> 12081 * Description: <b>Computationally friendly name of the test script</b><br> 12082 * Type: <b>string</b><br> 12083 * Path: <b>TestScript.name</b><br> 12084 * </p> 12085 */ 12086 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 12087 12088 /** 12089 * Search parameter: <b>description</b> 12090 * <p> 12091 * Description: <b>The description of the test script</b><br> 12092 * Type: <b>string</b><br> 12093 * Path: <b>TestScript.description</b><br> 12094 * </p> 12095 */ 12096 @SearchParamDefinition(name="description", path="TestScript.description", description="The description of the test script", type="string" ) 12097 public static final String SP_DESCRIPTION = "description"; 12098 /** 12099 * <b>Fluent Client</b> search parameter constant for <b>description</b> 12100 * <p> 12101 * Description: <b>The description of the test script</b><br> 12102 * Type: <b>string</b><br> 12103 * Path: <b>TestScript.description</b><br> 12104 * </p> 12105 */ 12106 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 12107 12108 /** 12109 * Search parameter: <b>publisher</b> 12110 * <p> 12111 * Description: <b>Name of the publisher of the test script</b><br> 12112 * Type: <b>string</b><br> 12113 * Path: <b>TestScript.publisher</b><br> 12114 * </p> 12115 */ 12116 @SearchParamDefinition(name="publisher", path="TestScript.publisher", description="Name of the publisher of the test script", type="string" ) 12117 public static final String SP_PUBLISHER = "publisher"; 12118 /** 12119 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 12120 * <p> 12121 * Description: <b>Name of the publisher of the test script</b><br> 12122 * Type: <b>string</b><br> 12123 * Path: <b>TestScript.publisher</b><br> 12124 * </p> 12125 */ 12126 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 12127 12128 /** 12129 * Search parameter: <b>testscript-capability</b> 12130 * <p> 12131 * Description: <b>TestScript required and validated capability</b><br> 12132 * Type: <b>string</b><br> 12133 * Path: <b>TestScript.metadata.capability.description</b><br> 12134 * </p> 12135 */ 12136 @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" ) 12137 public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability"; 12138 /** 12139 * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b> 12140 * <p> 12141 * Description: <b>TestScript required and validated capability</b><br> 12142 * Type: <b>string</b><br> 12143 * Path: <b>TestScript.metadata.capability.description</b><br> 12144 * </p> 12145 */ 12146 public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY); 12147 12148 /** 12149 * Search parameter: <b>title</b> 12150 * <p> 12151 * Description: <b>The human-friendly name of the test script</b><br> 12152 * Type: <b>string</b><br> 12153 * Path: <b>TestScript.title</b><br> 12154 * </p> 12155 */ 12156 @SearchParamDefinition(name="title", path="TestScript.title", description="The human-friendly name of the test script", type="string" ) 12157 public static final String SP_TITLE = "title"; 12158 /** 12159 * <b>Fluent Client</b> search parameter constant for <b>title</b> 12160 * <p> 12161 * Description: <b>The human-friendly name of the test script</b><br> 12162 * Type: <b>string</b><br> 12163 * Path: <b>TestScript.title</b><br> 12164 * </p> 12165 */ 12166 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 12167 12168 /** 12169 * Search parameter: <b>version</b> 12170 * <p> 12171 * Description: <b>The business version of the test script</b><br> 12172 * Type: <b>token</b><br> 12173 * Path: <b>TestScript.version</b><br> 12174 * </p> 12175 */ 12176 @SearchParamDefinition(name="version", path="TestScript.version", description="The business version of the test script", type="token" ) 12177 public static final String SP_VERSION = "version"; 12178 /** 12179 * <b>Fluent Client</b> search parameter constant for <b>version</b> 12180 * <p> 12181 * Description: <b>The business version of the test script</b><br> 12182 * Type: <b>token</b><br> 12183 * Path: <b>TestScript.version</b><br> 12184 * </p> 12185 */ 12186 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 12187 12188 /** 12189 * Search parameter: <b>url</b> 12190 * <p> 12191 * Description: <b>The uri that identifies the test script</b><br> 12192 * Type: <b>uri</b><br> 12193 * Path: <b>TestScript.url</b><br> 12194 * </p> 12195 */ 12196 @SearchParamDefinition(name="url", path="TestScript.url", description="The uri that identifies the test script", type="uri" ) 12197 public static final String SP_URL = "url"; 12198 /** 12199 * <b>Fluent Client</b> search parameter constant for <b>url</b> 12200 * <p> 12201 * Description: <b>The uri that identifies the test script</b><br> 12202 * Type: <b>uri</b><br> 12203 * Path: <b>TestScript.url</b><br> 12204 * </p> 12205 */ 12206 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 12207 12208 /** 12209 * Search parameter: <b>status</b> 12210 * <p> 12211 * Description: <b>The current status of the test script</b><br> 12212 * Type: <b>token</b><br> 12213 * Path: <b>TestScript.status</b><br> 12214 * </p> 12215 */ 12216 @SearchParamDefinition(name="status", path="TestScript.status", description="The current status of the test script", type="token" ) 12217 public static final String SP_STATUS = "status"; 12218 /** 12219 * <b>Fluent Client</b> search parameter constant for <b>status</b> 12220 * <p> 12221 * Description: <b>The current status of the test script</b><br> 12222 * Type: <b>token</b><br> 12223 * Path: <b>TestScript.status</b><br> 12224 * </p> 12225 */ 12226 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 12227 12228 12229} 12230