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 Fri, Mar 16, 2018 15:21+1100 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; 046import org.hl7.fhir.exceptions.FHIRFormatError; 047/** 048 * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification. 049 */ 050@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/StructureDefinition/TestScript") 051@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"}) 052public class TestScript extends MetadataResource { 053 054 public enum ContentType { 055 /** 056 * XML content-type corresponding to the application/fhir+xml mime-type. 057 */ 058 XML, 059 /** 060 * JSON content-type corresponding to the application/fhir+json mime-type. 061 */ 062 JSON, 063 /** 064 * RDF content-type corresponding to the text/turtle mime-type. 065 */ 066 TTL, 067 /** 068 * Prevent the use of the corresponding http header. 069 */ 070 NONE, 071 /** 072 * added to help the parsers with the generic types 073 */ 074 NULL; 075 public static ContentType fromCode(String codeString) throws FHIRException { 076 if (codeString == null || "".equals(codeString)) 077 return null; 078 if ("xml".equals(codeString)) 079 return XML; 080 if ("json".equals(codeString)) 081 return JSON; 082 if ("ttl".equals(codeString)) 083 return TTL; 084 if ("none".equals(codeString)) 085 return NONE; 086 if (Configuration.isAcceptInvalidEnums()) 087 return null; 088 else 089 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 090 } 091 public String toCode() { 092 switch (this) { 093 case XML: return "xml"; 094 case JSON: return "json"; 095 case TTL: return "ttl"; 096 case NONE: return "none"; 097 default: return "?"; 098 } 099 } 100 public String getSystem() { 101 switch (this) { 102 case XML: return "http://hl7.org/fhir/content-type"; 103 case JSON: return "http://hl7.org/fhir/content-type"; 104 case TTL: return "http://hl7.org/fhir/content-type"; 105 case NONE: return "http://hl7.org/fhir/content-type"; 106 default: return "?"; 107 } 108 } 109 public String getDefinition() { 110 switch (this) { 111 case XML: return "XML content-type corresponding to the application/fhir+xml mime-type."; 112 case JSON: return "JSON content-type corresponding to the application/fhir+json mime-type."; 113 case TTL: return "RDF content-type corresponding to the text/turtle mime-type."; 114 case NONE: return "Prevent the use of the corresponding http header."; 115 default: return "?"; 116 } 117 } 118 public String getDisplay() { 119 switch (this) { 120 case XML: return "xml"; 121 case JSON: return "json"; 122 case TTL: return "ttl"; 123 case NONE: return "none"; 124 default: return "?"; 125 } 126 } 127 } 128 129 public static class ContentTypeEnumFactory implements EnumFactory<ContentType> { 130 public ContentType fromCode(String codeString) throws IllegalArgumentException { 131 if (codeString == null || "".equals(codeString)) 132 if (codeString == null || "".equals(codeString)) 133 return null; 134 if ("xml".equals(codeString)) 135 return ContentType.XML; 136 if ("json".equals(codeString)) 137 return ContentType.JSON; 138 if ("ttl".equals(codeString)) 139 return ContentType.TTL; 140 if ("none".equals(codeString)) 141 return ContentType.NONE; 142 throw new IllegalArgumentException("Unknown ContentType code '"+codeString+"'"); 143 } 144 public Enumeration<ContentType> fromType(Base code) throws FHIRException { 145 if (code == null) 146 return null; 147 if (code.isEmpty()) 148 return new Enumeration<ContentType>(this); 149 String codeString = ((PrimitiveType) code).asStringValue(); 150 if (codeString == null || "".equals(codeString)) 151 return null; 152 if ("xml".equals(codeString)) 153 return new Enumeration<ContentType>(this, ContentType.XML); 154 if ("json".equals(codeString)) 155 return new Enumeration<ContentType>(this, ContentType.JSON); 156 if ("ttl".equals(codeString)) 157 return new Enumeration<ContentType>(this, ContentType.TTL); 158 if ("none".equals(codeString)) 159 return new Enumeration<ContentType>(this, ContentType.NONE); 160 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 161 } 162 public String toCode(ContentType code) { 163 if (code == ContentType.XML) 164 return "xml"; 165 if (code == ContentType.JSON) 166 return "json"; 167 if (code == ContentType.TTL) 168 return "ttl"; 169 if (code == ContentType.NONE) 170 return "none"; 171 return "?"; 172 } 173 public String toSystem(ContentType code) { 174 return code.getSystem(); 175 } 176 } 177 178 public enum AssertionDirectionType { 179 /** 180 * The assertion is evaluated on the response. This is the default value. 181 */ 182 RESPONSE, 183 /** 184 * The assertion is evaluated on the request. 185 */ 186 REQUEST, 187 /** 188 * added to help the parsers with the generic types 189 */ 190 NULL; 191 public static AssertionDirectionType fromCode(String codeString) throws FHIRException { 192 if (codeString == null || "".equals(codeString)) 193 return null; 194 if ("response".equals(codeString)) 195 return RESPONSE; 196 if ("request".equals(codeString)) 197 return REQUEST; 198 if (Configuration.isAcceptInvalidEnums()) 199 return null; 200 else 201 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 202 } 203 public String toCode() { 204 switch (this) { 205 case RESPONSE: return "response"; 206 case REQUEST: return "request"; 207 default: return "?"; 208 } 209 } 210 public String getSystem() { 211 switch (this) { 212 case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes"; 213 case REQUEST: return "http://hl7.org/fhir/assert-direction-codes"; 214 default: return "?"; 215 } 216 } 217 public String getDefinition() { 218 switch (this) { 219 case RESPONSE: return "The assertion is evaluated on the response. This is the default value."; 220 case REQUEST: return "The assertion is evaluated on the request."; 221 default: return "?"; 222 } 223 } 224 public String getDisplay() { 225 switch (this) { 226 case RESPONSE: return "response"; 227 case REQUEST: return "request"; 228 default: return "?"; 229 } 230 } 231 } 232 233 public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> { 234 public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException { 235 if (codeString == null || "".equals(codeString)) 236 if (codeString == null || "".equals(codeString)) 237 return null; 238 if ("response".equals(codeString)) 239 return AssertionDirectionType.RESPONSE; 240 if ("request".equals(codeString)) 241 return AssertionDirectionType.REQUEST; 242 throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'"); 243 } 244 public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException { 245 if (code == null) 246 return null; 247 if (code.isEmpty()) 248 return new Enumeration<AssertionDirectionType>(this); 249 String codeString = ((PrimitiveType) code).asStringValue(); 250 if (codeString == null || "".equals(codeString)) 251 return null; 252 if ("response".equals(codeString)) 253 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE); 254 if ("request".equals(codeString)) 255 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST); 256 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 257 } 258 public String toCode(AssertionDirectionType code) { 259 if (code == AssertionDirectionType.RESPONSE) 260 return "response"; 261 if (code == AssertionDirectionType.REQUEST) 262 return "request"; 263 return "?"; 264 } 265 public String toSystem(AssertionDirectionType code) { 266 return code.getSystem(); 267 } 268 } 269 270 public enum AssertionOperatorType { 271 /** 272 * Default value. Equals comparison. 273 */ 274 EQUALS, 275 /** 276 * Not equals comparison. 277 */ 278 NOTEQUALS, 279 /** 280 * Compare value within a known set of values. 281 */ 282 IN, 283 /** 284 * Compare value not within a known set of values. 285 */ 286 NOTIN, 287 /** 288 * Compare value to be greater than a known value. 289 */ 290 GREATERTHAN, 291 /** 292 * Compare value to be less than a known value. 293 */ 294 LESSTHAN, 295 /** 296 * Compare value is empty. 297 */ 298 EMPTY, 299 /** 300 * Compare value is not empty. 301 */ 302 NOTEMPTY, 303 /** 304 * Compare value string contains a known value. 305 */ 306 CONTAINS, 307 /** 308 * Compare value string does not contain a known value. 309 */ 310 NOTCONTAINS, 311 /** 312 * Evaluate the fluentpath expression as a boolean condition. 313 */ 314 EVAL, 315 /** 316 * added to help the parsers with the generic types 317 */ 318 NULL; 319 public static AssertionOperatorType fromCode(String codeString) throws FHIRException { 320 if (codeString == null || "".equals(codeString)) 321 return null; 322 if ("equals".equals(codeString)) 323 return EQUALS; 324 if ("notEquals".equals(codeString)) 325 return NOTEQUALS; 326 if ("in".equals(codeString)) 327 return IN; 328 if ("notIn".equals(codeString)) 329 return NOTIN; 330 if ("greaterThan".equals(codeString)) 331 return GREATERTHAN; 332 if ("lessThan".equals(codeString)) 333 return LESSTHAN; 334 if ("empty".equals(codeString)) 335 return EMPTY; 336 if ("notEmpty".equals(codeString)) 337 return NOTEMPTY; 338 if ("contains".equals(codeString)) 339 return CONTAINS; 340 if ("notContains".equals(codeString)) 341 return NOTCONTAINS; 342 if ("eval".equals(codeString)) 343 return EVAL; 344 if (Configuration.isAcceptInvalidEnums()) 345 return null; 346 else 347 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 348 } 349 public String toCode() { 350 switch (this) { 351 case EQUALS: return "equals"; 352 case NOTEQUALS: return "notEquals"; 353 case IN: return "in"; 354 case NOTIN: return "notIn"; 355 case GREATERTHAN: return "greaterThan"; 356 case LESSTHAN: return "lessThan"; 357 case EMPTY: return "empty"; 358 case NOTEMPTY: return "notEmpty"; 359 case CONTAINS: return "contains"; 360 case NOTCONTAINS: return "notContains"; 361 case EVAL: return "eval"; 362 default: return "?"; 363 } 364 } 365 public String getSystem() { 366 switch (this) { 367 case EQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 368 case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 369 case IN: return "http://hl7.org/fhir/assert-operator-codes"; 370 case NOTIN: return "http://hl7.org/fhir/assert-operator-codes"; 371 case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 372 case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 373 case EMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 374 case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 375 case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 376 case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 377 case EVAL: return "http://hl7.org/fhir/assert-operator-codes"; 378 default: return "?"; 379 } 380 } 381 public String getDefinition() { 382 switch (this) { 383 case EQUALS: return "Default value. Equals comparison."; 384 case NOTEQUALS: return "Not equals comparison."; 385 case IN: return "Compare value within a known set of values."; 386 case NOTIN: return "Compare value not within a known set of values."; 387 case GREATERTHAN: return "Compare value to be greater than a known value."; 388 case LESSTHAN: return "Compare value to be less than a known value."; 389 case EMPTY: return "Compare value is empty."; 390 case NOTEMPTY: return "Compare value is not empty."; 391 case CONTAINS: return "Compare value string contains a known value."; 392 case NOTCONTAINS: return "Compare value string does not contain a known value."; 393 case EVAL: return "Evaluate the fluentpath expression as a boolean condition."; 394 default: return "?"; 395 } 396 } 397 public String getDisplay() { 398 switch (this) { 399 case EQUALS: return "equals"; 400 case NOTEQUALS: return "notEquals"; 401 case IN: return "in"; 402 case NOTIN: return "notIn"; 403 case GREATERTHAN: return "greaterThan"; 404 case LESSTHAN: return "lessThan"; 405 case EMPTY: return "empty"; 406 case NOTEMPTY: return "notEmpty"; 407 case CONTAINS: return "contains"; 408 case NOTCONTAINS: return "notContains"; 409 case EVAL: return "evaluate"; 410 default: return "?"; 411 } 412 } 413 } 414 415 public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> { 416 public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException { 417 if (codeString == null || "".equals(codeString)) 418 if (codeString == null || "".equals(codeString)) 419 return null; 420 if ("equals".equals(codeString)) 421 return AssertionOperatorType.EQUALS; 422 if ("notEquals".equals(codeString)) 423 return AssertionOperatorType.NOTEQUALS; 424 if ("in".equals(codeString)) 425 return AssertionOperatorType.IN; 426 if ("notIn".equals(codeString)) 427 return AssertionOperatorType.NOTIN; 428 if ("greaterThan".equals(codeString)) 429 return AssertionOperatorType.GREATERTHAN; 430 if ("lessThan".equals(codeString)) 431 return AssertionOperatorType.LESSTHAN; 432 if ("empty".equals(codeString)) 433 return AssertionOperatorType.EMPTY; 434 if ("notEmpty".equals(codeString)) 435 return AssertionOperatorType.NOTEMPTY; 436 if ("contains".equals(codeString)) 437 return AssertionOperatorType.CONTAINS; 438 if ("notContains".equals(codeString)) 439 return AssertionOperatorType.NOTCONTAINS; 440 if ("eval".equals(codeString)) 441 return AssertionOperatorType.EVAL; 442 throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'"); 443 } 444 public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException { 445 if (code == null) 446 return null; 447 if (code.isEmpty()) 448 return new Enumeration<AssertionOperatorType>(this); 449 String codeString = ((PrimitiveType) code).asStringValue(); 450 if (codeString == null || "".equals(codeString)) 451 return null; 452 if ("equals".equals(codeString)) 453 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS); 454 if ("notEquals".equals(codeString)) 455 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS); 456 if ("in".equals(codeString)) 457 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN); 458 if ("notIn".equals(codeString)) 459 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN); 460 if ("greaterThan".equals(codeString)) 461 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN); 462 if ("lessThan".equals(codeString)) 463 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN); 464 if ("empty".equals(codeString)) 465 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY); 466 if ("notEmpty".equals(codeString)) 467 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY); 468 if ("contains".equals(codeString)) 469 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS); 470 if ("notContains".equals(codeString)) 471 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS); 472 if ("eval".equals(codeString)) 473 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL); 474 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 475 } 476 public String toCode(AssertionOperatorType code) { 477 if (code == AssertionOperatorType.EQUALS) 478 return "equals"; 479 if (code == AssertionOperatorType.NOTEQUALS) 480 return "notEquals"; 481 if (code == AssertionOperatorType.IN) 482 return "in"; 483 if (code == AssertionOperatorType.NOTIN) 484 return "notIn"; 485 if (code == AssertionOperatorType.GREATERTHAN) 486 return "greaterThan"; 487 if (code == AssertionOperatorType.LESSTHAN) 488 return "lessThan"; 489 if (code == AssertionOperatorType.EMPTY) 490 return "empty"; 491 if (code == AssertionOperatorType.NOTEMPTY) 492 return "notEmpty"; 493 if (code == AssertionOperatorType.CONTAINS) 494 return "contains"; 495 if (code == AssertionOperatorType.NOTCONTAINS) 496 return "notContains"; 497 if (code == AssertionOperatorType.EVAL) 498 return "eval"; 499 return "?"; 500 } 501 public String toSystem(AssertionOperatorType code) { 502 return code.getSystem(); 503 } 504 } 505 506 public enum TestScriptRequestMethodCode { 507 /** 508 * HTTP DELETE operation 509 */ 510 DELETE, 511 /** 512 * HTTP GET operation 513 */ 514 GET, 515 /** 516 * HTTP OPTIONS operation 517 */ 518 OPTIONS, 519 /** 520 * HTTP PATCH operation 521 */ 522 PATCH, 523 /** 524 * HTTP POST operation 525 */ 526 POST, 527 /** 528 * HTTP PUT operation 529 */ 530 PUT, 531 /** 532 * added to help the parsers with the generic types 533 */ 534 NULL; 535 public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException { 536 if (codeString == null || "".equals(codeString)) 537 return null; 538 if ("delete".equals(codeString)) 539 return DELETE; 540 if ("get".equals(codeString)) 541 return GET; 542 if ("options".equals(codeString)) 543 return OPTIONS; 544 if ("patch".equals(codeString)) 545 return PATCH; 546 if ("post".equals(codeString)) 547 return POST; 548 if ("put".equals(codeString)) 549 return PUT; 550 if (Configuration.isAcceptInvalidEnums()) 551 return null; 552 else 553 throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 554 } 555 public String toCode() { 556 switch (this) { 557 case DELETE: return "delete"; 558 case GET: return "get"; 559 case OPTIONS: return "options"; 560 case PATCH: return "patch"; 561 case POST: return "post"; 562 case PUT: return "put"; 563 default: return "?"; 564 } 565 } 566 public String getSystem() { 567 switch (this) { 568 case DELETE: return "http://hl7.org/fhir/http-operations"; 569 case GET: return "http://hl7.org/fhir/http-operations"; 570 case OPTIONS: return "http://hl7.org/fhir/http-operations"; 571 case PATCH: return "http://hl7.org/fhir/http-operations"; 572 case POST: return "http://hl7.org/fhir/http-operations"; 573 case PUT: return "http://hl7.org/fhir/http-operations"; 574 default: return "?"; 575 } 576 } 577 public String getDefinition() { 578 switch (this) { 579 case DELETE: return "HTTP DELETE operation"; 580 case GET: return "HTTP GET operation"; 581 case OPTIONS: return "HTTP OPTIONS operation"; 582 case PATCH: return "HTTP PATCH operation"; 583 case POST: return "HTTP POST operation"; 584 case PUT: return "HTTP PUT operation"; 585 default: return "?"; 586 } 587 } 588 public String getDisplay() { 589 switch (this) { 590 case DELETE: return "DELETE"; 591 case GET: return "GET"; 592 case OPTIONS: return "OPTIONS"; 593 case PATCH: return "PATCH"; 594 case POST: return "POST"; 595 case PUT: return "PUT"; 596 default: return "?"; 597 } 598 } 599 } 600 601 public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> { 602 public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException { 603 if (codeString == null || "".equals(codeString)) 604 if (codeString == null || "".equals(codeString)) 605 return null; 606 if ("delete".equals(codeString)) 607 return TestScriptRequestMethodCode.DELETE; 608 if ("get".equals(codeString)) 609 return TestScriptRequestMethodCode.GET; 610 if ("options".equals(codeString)) 611 return TestScriptRequestMethodCode.OPTIONS; 612 if ("patch".equals(codeString)) 613 return TestScriptRequestMethodCode.PATCH; 614 if ("post".equals(codeString)) 615 return TestScriptRequestMethodCode.POST; 616 if ("put".equals(codeString)) 617 return TestScriptRequestMethodCode.PUT; 618 throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 619 } 620 public Enumeration<TestScriptRequestMethodCode> fromType(Base code) throws FHIRException { 621 if (code == null) 622 return null; 623 if (code.isEmpty()) 624 return new Enumeration<TestScriptRequestMethodCode>(this); 625 String codeString = ((PrimitiveType) code).asStringValue(); 626 if (codeString == null || "".equals(codeString)) 627 return null; 628 if ("delete".equals(codeString)) 629 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE); 630 if ("get".equals(codeString)) 631 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET); 632 if ("options".equals(codeString)) 633 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS); 634 if ("patch".equals(codeString)) 635 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH); 636 if ("post".equals(codeString)) 637 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST); 638 if ("put".equals(codeString)) 639 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT); 640 throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 641 } 642 public String toCode(TestScriptRequestMethodCode code) { 643 if (code == TestScriptRequestMethodCode.DELETE) 644 return "delete"; 645 if (code == TestScriptRequestMethodCode.GET) 646 return "get"; 647 if (code == TestScriptRequestMethodCode.OPTIONS) 648 return "options"; 649 if (code == TestScriptRequestMethodCode.PATCH) 650 return "patch"; 651 if (code == TestScriptRequestMethodCode.POST) 652 return "post"; 653 if (code == TestScriptRequestMethodCode.PUT) 654 return "put"; 655 return "?"; 656 } 657 public String toSystem(TestScriptRequestMethodCode code) { 658 return code.getSystem(); 659 } 660 } 661 662 public enum AssertionResponseTypes { 663 /** 664 * Response code is 200. 665 */ 666 OKAY, 667 /** 668 * Response code is 201. 669 */ 670 CREATED, 671 /** 672 * Response code is 204. 673 */ 674 NOCONTENT, 675 /** 676 * Response code is 304. 677 */ 678 NOTMODIFIED, 679 /** 680 * Response code is 400. 681 */ 682 BAD, 683 /** 684 * Response code is 403. 685 */ 686 FORBIDDEN, 687 /** 688 * Response code is 404. 689 */ 690 NOTFOUND, 691 /** 692 * Response code is 405. 693 */ 694 METHODNOTALLOWED, 695 /** 696 * Response code is 409. 697 */ 698 CONFLICT, 699 /** 700 * Response code is 410. 701 */ 702 GONE, 703 /** 704 * Response code is 412. 705 */ 706 PRECONDITIONFAILED, 707 /** 708 * Response code is 422. 709 */ 710 UNPROCESSABLE, 711 /** 712 * added to help the parsers with the generic types 713 */ 714 NULL; 715 public static AssertionResponseTypes fromCode(String codeString) throws FHIRException { 716 if (codeString == null || "".equals(codeString)) 717 return null; 718 if ("okay".equals(codeString)) 719 return OKAY; 720 if ("created".equals(codeString)) 721 return CREATED; 722 if ("noContent".equals(codeString)) 723 return NOCONTENT; 724 if ("notModified".equals(codeString)) 725 return NOTMODIFIED; 726 if ("bad".equals(codeString)) 727 return BAD; 728 if ("forbidden".equals(codeString)) 729 return FORBIDDEN; 730 if ("notFound".equals(codeString)) 731 return NOTFOUND; 732 if ("methodNotAllowed".equals(codeString)) 733 return METHODNOTALLOWED; 734 if ("conflict".equals(codeString)) 735 return CONFLICT; 736 if ("gone".equals(codeString)) 737 return GONE; 738 if ("preconditionFailed".equals(codeString)) 739 return PRECONDITIONFAILED; 740 if ("unprocessable".equals(codeString)) 741 return UNPROCESSABLE; 742 if (Configuration.isAcceptInvalidEnums()) 743 return null; 744 else 745 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 746 } 747 public String toCode() { 748 switch (this) { 749 case OKAY: return "okay"; 750 case CREATED: return "created"; 751 case NOCONTENT: return "noContent"; 752 case NOTMODIFIED: return "notModified"; 753 case BAD: return "bad"; 754 case FORBIDDEN: return "forbidden"; 755 case NOTFOUND: return "notFound"; 756 case METHODNOTALLOWED: return "methodNotAllowed"; 757 case CONFLICT: return "conflict"; 758 case GONE: return "gone"; 759 case PRECONDITIONFAILED: return "preconditionFailed"; 760 case UNPROCESSABLE: return "unprocessable"; 761 default: return "?"; 762 } 763 } 764 public String getSystem() { 765 switch (this) { 766 case OKAY: return "http://hl7.org/fhir/assert-response-code-types"; 767 case CREATED: return "http://hl7.org/fhir/assert-response-code-types"; 768 case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types"; 769 case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types"; 770 case BAD: return "http://hl7.org/fhir/assert-response-code-types"; 771 case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types"; 772 case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types"; 773 case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types"; 774 case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types"; 775 case GONE: return "http://hl7.org/fhir/assert-response-code-types"; 776 case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types"; 777 case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types"; 778 default: return "?"; 779 } 780 } 781 public String getDefinition() { 782 switch (this) { 783 case OKAY: return "Response code is 200."; 784 case CREATED: return "Response code is 201."; 785 case NOCONTENT: return "Response code is 204."; 786 case NOTMODIFIED: return "Response code is 304."; 787 case BAD: return "Response code is 400."; 788 case FORBIDDEN: return "Response code is 403."; 789 case NOTFOUND: return "Response code is 404."; 790 case METHODNOTALLOWED: return "Response code is 405."; 791 case CONFLICT: return "Response code is 409."; 792 case GONE: return "Response code is 410."; 793 case PRECONDITIONFAILED: return "Response code is 412."; 794 case UNPROCESSABLE: return "Response code is 422."; 795 default: return "?"; 796 } 797 } 798 public String getDisplay() { 799 switch (this) { 800 case OKAY: return "okay"; 801 case CREATED: return "created"; 802 case NOCONTENT: return "noContent"; 803 case NOTMODIFIED: return "notModified"; 804 case BAD: return "bad"; 805 case FORBIDDEN: return "forbidden"; 806 case NOTFOUND: return "notFound"; 807 case METHODNOTALLOWED: return "methodNotAllowed"; 808 case CONFLICT: return "conflict"; 809 case GONE: return "gone"; 810 case PRECONDITIONFAILED: return "preconditionFailed"; 811 case UNPROCESSABLE: return "unprocessable"; 812 default: return "?"; 813 } 814 } 815 } 816 817 public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> { 818 public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException { 819 if (codeString == null || "".equals(codeString)) 820 if (codeString == null || "".equals(codeString)) 821 return null; 822 if ("okay".equals(codeString)) 823 return AssertionResponseTypes.OKAY; 824 if ("created".equals(codeString)) 825 return AssertionResponseTypes.CREATED; 826 if ("noContent".equals(codeString)) 827 return AssertionResponseTypes.NOCONTENT; 828 if ("notModified".equals(codeString)) 829 return AssertionResponseTypes.NOTMODIFIED; 830 if ("bad".equals(codeString)) 831 return AssertionResponseTypes.BAD; 832 if ("forbidden".equals(codeString)) 833 return AssertionResponseTypes.FORBIDDEN; 834 if ("notFound".equals(codeString)) 835 return AssertionResponseTypes.NOTFOUND; 836 if ("methodNotAllowed".equals(codeString)) 837 return AssertionResponseTypes.METHODNOTALLOWED; 838 if ("conflict".equals(codeString)) 839 return AssertionResponseTypes.CONFLICT; 840 if ("gone".equals(codeString)) 841 return AssertionResponseTypes.GONE; 842 if ("preconditionFailed".equals(codeString)) 843 return AssertionResponseTypes.PRECONDITIONFAILED; 844 if ("unprocessable".equals(codeString)) 845 return AssertionResponseTypes.UNPROCESSABLE; 846 throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'"); 847 } 848 public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException { 849 if (code == null) 850 return null; 851 if (code.isEmpty()) 852 return new Enumeration<AssertionResponseTypes>(this); 853 String codeString = ((PrimitiveType) code).asStringValue(); 854 if (codeString == null || "".equals(codeString)) 855 return null; 856 if ("okay".equals(codeString)) 857 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY); 858 if ("created".equals(codeString)) 859 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED); 860 if ("noContent".equals(codeString)) 861 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT); 862 if ("notModified".equals(codeString)) 863 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED); 864 if ("bad".equals(codeString)) 865 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD); 866 if ("forbidden".equals(codeString)) 867 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN); 868 if ("notFound".equals(codeString)) 869 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND); 870 if ("methodNotAllowed".equals(codeString)) 871 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED); 872 if ("conflict".equals(codeString)) 873 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT); 874 if ("gone".equals(codeString)) 875 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE); 876 if ("preconditionFailed".equals(codeString)) 877 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED); 878 if ("unprocessable".equals(codeString)) 879 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE); 880 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 881 } 882 public String toCode(AssertionResponseTypes code) { 883 if (code == AssertionResponseTypes.OKAY) 884 return "okay"; 885 if (code == AssertionResponseTypes.CREATED) 886 return "created"; 887 if (code == AssertionResponseTypes.NOCONTENT) 888 return "noContent"; 889 if (code == AssertionResponseTypes.NOTMODIFIED) 890 return "notModified"; 891 if (code == AssertionResponseTypes.BAD) 892 return "bad"; 893 if (code == AssertionResponseTypes.FORBIDDEN) 894 return "forbidden"; 895 if (code == AssertionResponseTypes.NOTFOUND) 896 return "notFound"; 897 if (code == AssertionResponseTypes.METHODNOTALLOWED) 898 return "methodNotAllowed"; 899 if (code == AssertionResponseTypes.CONFLICT) 900 return "conflict"; 901 if (code == AssertionResponseTypes.GONE) 902 return "gone"; 903 if (code == AssertionResponseTypes.PRECONDITIONFAILED) 904 return "preconditionFailed"; 905 if (code == AssertionResponseTypes.UNPROCESSABLE) 906 return "unprocessable"; 907 return "?"; 908 } 909 public String toSystem(AssertionResponseTypes code) { 910 return code.getSystem(); 911 } 912 } 913 914 @Block() 915 public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement { 916 /** 917 * Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 918 */ 919 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 920 @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." ) 921 protected IntegerType index; 922 923 /** 924 * The type of origin profile the test system supports. 925 */ 926 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 927 @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." ) 928 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types") 929 protected Coding profile; 930 931 private static final long serialVersionUID = -1239935149L; 932 933 /** 934 * Constructor 935 */ 936 public TestScriptOriginComponent() { 937 super(); 938 } 939 940 /** 941 * Constructor 942 */ 943 public TestScriptOriginComponent(IntegerType index, Coding profile) { 944 super(); 945 this.index = index; 946 this.profile = profile; 947 } 948 949 /** 950 * @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 951 */ 952 public IntegerType getIndexElement() { 953 if (this.index == null) 954 if (Configuration.errorOnAutoCreate()) 955 throw new Error("Attempt to auto-create TestScriptOriginComponent.index"); 956 else if (Configuration.doAutoCreate()) 957 this.index = new IntegerType(); // bb 958 return this.index; 959 } 960 961 public boolean hasIndexElement() { 962 return this.index != null && !this.index.isEmpty(); 963 } 964 965 public boolean hasIndex() { 966 return this.index != null && !this.index.isEmpty(); 967 } 968 969 /** 970 * @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 971 */ 972 public TestScriptOriginComponent setIndexElement(IntegerType value) { 973 this.index = value; 974 return this; 975 } 976 977 /** 978 * @return Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 979 */ 980 public int getIndex() { 981 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 982 } 983 984 /** 985 * @param value Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 986 */ 987 public TestScriptOriginComponent setIndex(int value) { 988 if (this.index == null) 989 this.index = new IntegerType(); 990 this.index.setValue(value); 991 return this; 992 } 993 994 /** 995 * @return {@link #profile} (The type of origin profile the test system supports.) 996 */ 997 public Coding getProfile() { 998 if (this.profile == null) 999 if (Configuration.errorOnAutoCreate()) 1000 throw new Error("Attempt to auto-create TestScriptOriginComponent.profile"); 1001 else if (Configuration.doAutoCreate()) 1002 this.profile = new Coding(); // cc 1003 return this.profile; 1004 } 1005 1006 public boolean hasProfile() { 1007 return this.profile != null && !this.profile.isEmpty(); 1008 } 1009 1010 /** 1011 * @param value {@link #profile} (The type of origin profile the test system supports.) 1012 */ 1013 public TestScriptOriginComponent setProfile(Coding value) { 1014 this.profile = value; 1015 return this; 1016 } 1017 1018 protected void listChildren(List<Property> children) { 1019 super.listChildren(children); 1020 children.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, 1, index)); 1021 children.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile)); 1022 } 1023 1024 @Override 1025 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1026 switch (_hash) { 1027 case 100346066: /*index*/ return 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, 1, index); 1028 case -309425751: /*profile*/ return new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile); 1029 default: return super.getNamedProperty(_hash, _name, _checkValid); 1030 } 1031 1032 } 1033 1034 @Override 1035 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1036 switch (hash) { 1037 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1038 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1039 default: return super.getProperty(hash, name, checkValid); 1040 } 1041 1042 } 1043 1044 @Override 1045 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1046 switch (hash) { 1047 case 100346066: // index 1048 this.index = castToInteger(value); // IntegerType 1049 return value; 1050 case -309425751: // profile 1051 this.profile = castToCoding(value); // Coding 1052 return value; 1053 default: return super.setProperty(hash, name, value); 1054 } 1055 1056 } 1057 1058 @Override 1059 public Base setProperty(String name, Base value) throws FHIRException { 1060 if (name.equals("index")) { 1061 this.index = castToInteger(value); // IntegerType 1062 } else if (name.equals("profile")) { 1063 this.profile = castToCoding(value); // Coding 1064 } else 1065 return super.setProperty(name, value); 1066 return value; 1067 } 1068 1069 @Override 1070 public Base makeProperty(int hash, String name) throws FHIRException { 1071 switch (hash) { 1072 case 100346066: return getIndexElement(); 1073 case -309425751: return getProfile(); 1074 default: return super.makeProperty(hash, name); 1075 } 1076 1077 } 1078 1079 @Override 1080 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1081 switch (hash) { 1082 case 100346066: /*index*/ return new String[] {"integer"}; 1083 case -309425751: /*profile*/ return new String[] {"Coding"}; 1084 default: return super.getTypesForProperty(hash, name); 1085 } 1086 1087 } 1088 1089 @Override 1090 public Base addChild(String name) throws FHIRException { 1091 if (name.equals("index")) { 1092 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1093 } 1094 else if (name.equals("profile")) { 1095 this.profile = new Coding(); 1096 return this.profile; 1097 } 1098 else 1099 return super.addChild(name); 1100 } 1101 1102 public TestScriptOriginComponent copy() { 1103 TestScriptOriginComponent dst = new TestScriptOriginComponent(); 1104 copyValues(dst); 1105 dst.index = index == null ? null : index.copy(); 1106 dst.profile = profile == null ? null : profile.copy(); 1107 return dst; 1108 } 1109 1110 @Override 1111 public boolean equalsDeep(Base other_) { 1112 if (!super.equalsDeep(other_)) 1113 return false; 1114 if (!(other_ instanceof TestScriptOriginComponent)) 1115 return false; 1116 TestScriptOriginComponent o = (TestScriptOriginComponent) other_; 1117 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1118 } 1119 1120 @Override 1121 public boolean equalsShallow(Base other_) { 1122 if (!super.equalsShallow(other_)) 1123 return false; 1124 if (!(other_ instanceof TestScriptOriginComponent)) 1125 return false; 1126 TestScriptOriginComponent o = (TestScriptOriginComponent) other_; 1127 return compareValues(index, o.index, true); 1128 } 1129 1130 public boolean isEmpty() { 1131 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile); 1132 } 1133 1134 public String fhirType() { 1135 return "TestScript.origin"; 1136 1137 } 1138 1139 } 1140 1141 @Block() 1142 public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement { 1143 /** 1144 * Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1145 */ 1146 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1147 @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." ) 1148 protected IntegerType index; 1149 1150 /** 1151 * The type of destination profile the test system supports. 1152 */ 1153 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 1154 @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." ) 1155 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types") 1156 protected Coding profile; 1157 1158 private static final long serialVersionUID = -1239935149L; 1159 1160 /** 1161 * Constructor 1162 */ 1163 public TestScriptDestinationComponent() { 1164 super(); 1165 } 1166 1167 /** 1168 * Constructor 1169 */ 1170 public TestScriptDestinationComponent(IntegerType index, Coding profile) { 1171 super(); 1172 this.index = index; 1173 this.profile = profile; 1174 } 1175 1176 /** 1177 * @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 1178 */ 1179 public IntegerType getIndexElement() { 1180 if (this.index == null) 1181 if (Configuration.errorOnAutoCreate()) 1182 throw new Error("Attempt to auto-create TestScriptDestinationComponent.index"); 1183 else if (Configuration.doAutoCreate()) 1184 this.index = new IntegerType(); // bb 1185 return this.index; 1186 } 1187 1188 public boolean hasIndexElement() { 1189 return this.index != null && !this.index.isEmpty(); 1190 } 1191 1192 public boolean hasIndex() { 1193 return this.index != null && !this.index.isEmpty(); 1194 } 1195 1196 /** 1197 * @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 1198 */ 1199 public TestScriptDestinationComponent setIndexElement(IntegerType value) { 1200 this.index = value; 1201 return this; 1202 } 1203 1204 /** 1205 * @return Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1206 */ 1207 public int getIndex() { 1208 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 1209 } 1210 1211 /** 1212 * @param value Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1213 */ 1214 public TestScriptDestinationComponent setIndex(int value) { 1215 if (this.index == null) 1216 this.index = new IntegerType(); 1217 this.index.setValue(value); 1218 return this; 1219 } 1220 1221 /** 1222 * @return {@link #profile} (The type of destination profile the test system supports.) 1223 */ 1224 public Coding getProfile() { 1225 if (this.profile == null) 1226 if (Configuration.errorOnAutoCreate()) 1227 throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile"); 1228 else if (Configuration.doAutoCreate()) 1229 this.profile = new Coding(); // cc 1230 return this.profile; 1231 } 1232 1233 public boolean hasProfile() { 1234 return this.profile != null && !this.profile.isEmpty(); 1235 } 1236 1237 /** 1238 * @param value {@link #profile} (The type of destination profile the test system supports.) 1239 */ 1240 public TestScriptDestinationComponent setProfile(Coding value) { 1241 this.profile = value; 1242 return this; 1243 } 1244 1245 protected void listChildren(List<Property> children) { 1246 super.listChildren(children); 1247 children.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, 1, index)); 1248 children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile)); 1249 } 1250 1251 @Override 1252 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1253 switch (_hash) { 1254 case 100346066: /*index*/ return 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, 1, index); 1255 case -309425751: /*profile*/ return new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile); 1256 default: return super.getNamedProperty(_hash, _name, _checkValid); 1257 } 1258 1259 } 1260 1261 @Override 1262 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1263 switch (hash) { 1264 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1265 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1266 default: return super.getProperty(hash, name, checkValid); 1267 } 1268 1269 } 1270 1271 @Override 1272 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1273 switch (hash) { 1274 case 100346066: // index 1275 this.index = castToInteger(value); // IntegerType 1276 return value; 1277 case -309425751: // profile 1278 this.profile = castToCoding(value); // Coding 1279 return value; 1280 default: return super.setProperty(hash, name, value); 1281 } 1282 1283 } 1284 1285 @Override 1286 public Base setProperty(String name, Base value) throws FHIRException { 1287 if (name.equals("index")) { 1288 this.index = castToInteger(value); // IntegerType 1289 } else if (name.equals("profile")) { 1290 this.profile = castToCoding(value); // Coding 1291 } else 1292 return super.setProperty(name, value); 1293 return value; 1294 } 1295 1296 @Override 1297 public Base makeProperty(int hash, String name) throws FHIRException { 1298 switch (hash) { 1299 case 100346066: return getIndexElement(); 1300 case -309425751: return getProfile(); 1301 default: return super.makeProperty(hash, name); 1302 } 1303 1304 } 1305 1306 @Override 1307 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1308 switch (hash) { 1309 case 100346066: /*index*/ return new String[] {"integer"}; 1310 case -309425751: /*profile*/ return new String[] {"Coding"}; 1311 default: return super.getTypesForProperty(hash, name); 1312 } 1313 1314 } 1315 1316 @Override 1317 public Base addChild(String name) throws FHIRException { 1318 if (name.equals("index")) { 1319 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1320 } 1321 else if (name.equals("profile")) { 1322 this.profile = new Coding(); 1323 return this.profile; 1324 } 1325 else 1326 return super.addChild(name); 1327 } 1328 1329 public TestScriptDestinationComponent copy() { 1330 TestScriptDestinationComponent dst = new TestScriptDestinationComponent(); 1331 copyValues(dst); 1332 dst.index = index == null ? null : index.copy(); 1333 dst.profile = profile == null ? null : profile.copy(); 1334 return dst; 1335 } 1336 1337 @Override 1338 public boolean equalsDeep(Base other_) { 1339 if (!super.equalsDeep(other_)) 1340 return false; 1341 if (!(other_ instanceof TestScriptDestinationComponent)) 1342 return false; 1343 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_; 1344 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1345 } 1346 1347 @Override 1348 public boolean equalsShallow(Base other_) { 1349 if (!super.equalsShallow(other_)) 1350 return false; 1351 if (!(other_ instanceof TestScriptDestinationComponent)) 1352 return false; 1353 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_; 1354 return compareValues(index, o.index, true); 1355 } 1356 1357 public boolean isEmpty() { 1358 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile); 1359 } 1360 1361 public String fhirType() { 1362 return "TestScript.destination"; 1363 1364 } 1365 1366 } 1367 1368 @Block() 1369 public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement { 1370 /** 1371 * A link to the FHIR specification that this test is covering. 1372 */ 1373 @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1374 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." ) 1375 protected List<TestScriptMetadataLinkComponent> link; 1376 1377 /** 1378 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 1379 */ 1380 @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1381 @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." ) 1382 protected List<TestScriptMetadataCapabilityComponent> capability; 1383 1384 private static final long serialVersionUID = 745183328L; 1385 1386 /** 1387 * Constructor 1388 */ 1389 public TestScriptMetadataComponent() { 1390 super(); 1391 } 1392 1393 /** 1394 * @return {@link #link} (A link to the FHIR specification that this test is covering.) 1395 */ 1396 public List<TestScriptMetadataLinkComponent> getLink() { 1397 if (this.link == null) 1398 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1399 return this.link; 1400 } 1401 1402 /** 1403 * @return Returns a reference to <code>this</code> for easy method chaining 1404 */ 1405 public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 1406 this.link = theLink; 1407 return this; 1408 } 1409 1410 public boolean hasLink() { 1411 if (this.link == null) 1412 return false; 1413 for (TestScriptMetadataLinkComponent item : this.link) 1414 if (!item.isEmpty()) 1415 return true; 1416 return false; 1417 } 1418 1419 public TestScriptMetadataLinkComponent addLink() { //3 1420 TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent(); 1421 if (this.link == null) 1422 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1423 this.link.add(t); 1424 return t; 1425 } 1426 1427 public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3 1428 if (t == null) 1429 return this; 1430 if (this.link == null) 1431 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1432 this.link.add(t); 1433 return this; 1434 } 1435 1436 /** 1437 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist 1438 */ 1439 public TestScriptMetadataLinkComponent getLinkFirstRep() { 1440 if (getLink().isEmpty()) { 1441 addLink(); 1442 } 1443 return getLink().get(0); 1444 } 1445 1446 /** 1447 * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 1448 */ 1449 public List<TestScriptMetadataCapabilityComponent> getCapability() { 1450 if (this.capability == null) 1451 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1452 return this.capability; 1453 } 1454 1455 /** 1456 * @return Returns a reference to <code>this</code> for easy method chaining 1457 */ 1458 public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 1459 this.capability = theCapability; 1460 return this; 1461 } 1462 1463 public boolean hasCapability() { 1464 if (this.capability == null) 1465 return false; 1466 for (TestScriptMetadataCapabilityComponent item : this.capability) 1467 if (!item.isEmpty()) 1468 return true; 1469 return false; 1470 } 1471 1472 public TestScriptMetadataCapabilityComponent addCapability() { //3 1473 TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent(); 1474 if (this.capability == null) 1475 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1476 this.capability.add(t); 1477 return t; 1478 } 1479 1480 public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3 1481 if (t == null) 1482 return this; 1483 if (this.capability == null) 1484 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1485 this.capability.add(t); 1486 return this; 1487 } 1488 1489 /** 1490 * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist 1491 */ 1492 public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 1493 if (getCapability().isEmpty()) { 1494 addCapability(); 1495 } 1496 return getCapability().get(0); 1497 } 1498 1499 protected void listChildren(List<Property> children) { 1500 super.listChildren(children); 1501 children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link)); 1502 children.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)); 1503 } 1504 1505 @Override 1506 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1507 switch (_hash) { 1508 case 3321850: /*link*/ return new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link); 1509 case -783669992: /*capability*/ return 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); 1510 default: return super.getNamedProperty(_hash, _name, _checkValid); 1511 } 1512 1513 } 1514 1515 @Override 1516 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1517 switch (hash) { 1518 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent 1519 case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent 1520 default: return super.getProperty(hash, name, checkValid); 1521 } 1522 1523 } 1524 1525 @Override 1526 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1527 switch (hash) { 1528 case 3321850: // link 1529 this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent 1530 return value; 1531 case -783669992: // capability 1532 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent 1533 return value; 1534 default: return super.setProperty(hash, name, value); 1535 } 1536 1537 } 1538 1539 @Override 1540 public Base setProperty(String name, Base value) throws FHIRException { 1541 if (name.equals("link")) { 1542 this.getLink().add((TestScriptMetadataLinkComponent) value); 1543 } else if (name.equals("capability")) { 1544 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); 1545 } else 1546 return super.setProperty(name, value); 1547 return value; 1548 } 1549 1550 @Override 1551 public Base makeProperty(int hash, String name) throws FHIRException { 1552 switch (hash) { 1553 case 3321850: return addLink(); 1554 case -783669992: return addCapability(); 1555 default: return super.makeProperty(hash, name); 1556 } 1557 1558 } 1559 1560 @Override 1561 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1562 switch (hash) { 1563 case 3321850: /*link*/ return new String[] {}; 1564 case -783669992: /*capability*/ return new String[] {}; 1565 default: return super.getTypesForProperty(hash, name); 1566 } 1567 1568 } 1569 1570 @Override 1571 public Base addChild(String name) throws FHIRException { 1572 if (name.equals("link")) { 1573 return addLink(); 1574 } 1575 else if (name.equals("capability")) { 1576 return addCapability(); 1577 } 1578 else 1579 return super.addChild(name); 1580 } 1581 1582 public TestScriptMetadataComponent copy() { 1583 TestScriptMetadataComponent dst = new TestScriptMetadataComponent(); 1584 copyValues(dst); 1585 if (link != null) { 1586 dst.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1587 for (TestScriptMetadataLinkComponent i : link) 1588 dst.link.add(i.copy()); 1589 }; 1590 if (capability != null) { 1591 dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1592 for (TestScriptMetadataCapabilityComponent i : capability) 1593 dst.capability.add(i.copy()); 1594 }; 1595 return dst; 1596 } 1597 1598 @Override 1599 public boolean equalsDeep(Base other_) { 1600 if (!super.equalsDeep(other_)) 1601 return false; 1602 if (!(other_ instanceof TestScriptMetadataComponent)) 1603 return false; 1604 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_; 1605 return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true); 1606 } 1607 1608 @Override 1609 public boolean equalsShallow(Base other_) { 1610 if (!super.equalsShallow(other_)) 1611 return false; 1612 if (!(other_ instanceof TestScriptMetadataComponent)) 1613 return false; 1614 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_; 1615 return true; 1616 } 1617 1618 public boolean isEmpty() { 1619 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability); 1620 } 1621 1622 public String fhirType() { 1623 return "TestScript.metadata"; 1624 1625 } 1626 1627 } 1628 1629 @Block() 1630 public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement { 1631 /** 1632 * URL to a particular requirement or feature within the FHIR specification. 1633 */ 1634 @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1635 @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." ) 1636 protected UriType url; 1637 1638 /** 1639 * Short description of the link. 1640 */ 1641 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1642 @Description(shortDefinition="Short description", formalDefinition="Short description of the link." ) 1643 protected StringType description; 1644 1645 private static final long serialVersionUID = 213372298L; 1646 1647 /** 1648 * Constructor 1649 */ 1650 public TestScriptMetadataLinkComponent() { 1651 super(); 1652 } 1653 1654 /** 1655 * Constructor 1656 */ 1657 public TestScriptMetadataLinkComponent(UriType url) { 1658 super(); 1659 this.url = url; 1660 } 1661 1662 /** 1663 * @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 1664 */ 1665 public UriType getUrlElement() { 1666 if (this.url == null) 1667 if (Configuration.errorOnAutoCreate()) 1668 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url"); 1669 else if (Configuration.doAutoCreate()) 1670 this.url = new UriType(); // bb 1671 return this.url; 1672 } 1673 1674 public boolean hasUrlElement() { 1675 return this.url != null && !this.url.isEmpty(); 1676 } 1677 1678 public boolean hasUrl() { 1679 return this.url != null && !this.url.isEmpty(); 1680 } 1681 1682 /** 1683 * @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 1684 */ 1685 public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 1686 this.url = value; 1687 return this; 1688 } 1689 1690 /** 1691 * @return URL to a particular requirement or feature within the FHIR specification. 1692 */ 1693 public String getUrl() { 1694 return this.url == null ? null : this.url.getValue(); 1695 } 1696 1697 /** 1698 * @param value URL to a particular requirement or feature within the FHIR specification. 1699 */ 1700 public TestScriptMetadataLinkComponent setUrl(String value) { 1701 if (this.url == null) 1702 this.url = new UriType(); 1703 this.url.setValue(value); 1704 return this; 1705 } 1706 1707 /** 1708 * @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 1709 */ 1710 public StringType getDescriptionElement() { 1711 if (this.description == null) 1712 if (Configuration.errorOnAutoCreate()) 1713 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description"); 1714 else if (Configuration.doAutoCreate()) 1715 this.description = new StringType(); // bb 1716 return this.description; 1717 } 1718 1719 public boolean hasDescriptionElement() { 1720 return this.description != null && !this.description.isEmpty(); 1721 } 1722 1723 public boolean hasDescription() { 1724 return this.description != null && !this.description.isEmpty(); 1725 } 1726 1727 /** 1728 * @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 1729 */ 1730 public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 1731 this.description = value; 1732 return this; 1733 } 1734 1735 /** 1736 * @return Short description of the link. 1737 */ 1738 public String getDescription() { 1739 return this.description == null ? null : this.description.getValue(); 1740 } 1741 1742 /** 1743 * @param value Short description of the link. 1744 */ 1745 public TestScriptMetadataLinkComponent setDescription(String value) { 1746 if (Utilities.noString(value)) 1747 this.description = null; 1748 else { 1749 if (this.description == null) 1750 this.description = new StringType(); 1751 this.description.setValue(value); 1752 } 1753 return this; 1754 } 1755 1756 protected void listChildren(List<Property> children) { 1757 super.listChildren(children); 1758 children.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url)); 1759 children.add(new Property("description", "string", "Short description of the link.", 0, 1, description)); 1760 } 1761 1762 @Override 1763 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1764 switch (_hash) { 1765 case 116079: /*url*/ return new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url); 1766 case -1724546052: /*description*/ return new Property("description", "string", "Short description of the link.", 0, 1, description); 1767 default: return super.getNamedProperty(_hash, _name, _checkValid); 1768 } 1769 1770 } 1771 1772 @Override 1773 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1774 switch (hash) { 1775 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1776 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1777 default: return super.getProperty(hash, name, checkValid); 1778 } 1779 1780 } 1781 1782 @Override 1783 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1784 switch (hash) { 1785 case 116079: // url 1786 this.url = castToUri(value); // UriType 1787 return value; 1788 case -1724546052: // description 1789 this.description = castToString(value); // StringType 1790 return value; 1791 default: return super.setProperty(hash, name, value); 1792 } 1793 1794 } 1795 1796 @Override 1797 public Base setProperty(String name, Base value) throws FHIRException { 1798 if (name.equals("url")) { 1799 this.url = castToUri(value); // UriType 1800 } else if (name.equals("description")) { 1801 this.description = castToString(value); // StringType 1802 } else 1803 return super.setProperty(name, value); 1804 return value; 1805 } 1806 1807 @Override 1808 public Base makeProperty(int hash, String name) throws FHIRException { 1809 switch (hash) { 1810 case 116079: return getUrlElement(); 1811 case -1724546052: return getDescriptionElement(); 1812 default: return super.makeProperty(hash, name); 1813 } 1814 1815 } 1816 1817 @Override 1818 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1819 switch (hash) { 1820 case 116079: /*url*/ return new String[] {"uri"}; 1821 case -1724546052: /*description*/ return new String[] {"string"}; 1822 default: return super.getTypesForProperty(hash, name); 1823 } 1824 1825 } 1826 1827 @Override 1828 public Base addChild(String name) throws FHIRException { 1829 if (name.equals("url")) { 1830 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 1831 } 1832 else if (name.equals("description")) { 1833 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 1834 } 1835 else 1836 return super.addChild(name); 1837 } 1838 1839 public TestScriptMetadataLinkComponent copy() { 1840 TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent(); 1841 copyValues(dst); 1842 dst.url = url == null ? null : url.copy(); 1843 dst.description = description == null ? null : description.copy(); 1844 return dst; 1845 } 1846 1847 @Override 1848 public boolean equalsDeep(Base other_) { 1849 if (!super.equalsDeep(other_)) 1850 return false; 1851 if (!(other_ instanceof TestScriptMetadataLinkComponent)) 1852 return false; 1853 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_; 1854 return compareDeep(url, o.url, true) && compareDeep(description, o.description, true); 1855 } 1856 1857 @Override 1858 public boolean equalsShallow(Base other_) { 1859 if (!super.equalsShallow(other_)) 1860 return false; 1861 if (!(other_ instanceof TestScriptMetadataLinkComponent)) 1862 return false; 1863 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_; 1864 return compareValues(url, o.url, true) && compareValues(description, o.description, true); 1865 } 1866 1867 public boolean isEmpty() { 1868 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description); 1869 } 1870 1871 public String fhirType() { 1872 return "TestScript.metadata.link"; 1873 1874 } 1875 1876 } 1877 1878 @Block() 1879 public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement { 1880 /** 1881 * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1882 */ 1883 @Child(name = "required", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1884 @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." ) 1885 protected BooleanType required; 1886 1887 /** 1888 * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1889 */ 1890 @Child(name = "validated", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1891 @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." ) 1892 protected BooleanType validated; 1893 1894 /** 1895 * Description of the capabilities that this test script is requiring the server to support. 1896 */ 1897 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1898 @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." ) 1899 protected StringType description; 1900 1901 /** 1902 * Which origin server these requirements apply to. 1903 */ 1904 @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1905 @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." ) 1906 protected List<IntegerType> origin; 1907 1908 /** 1909 * Which server these requirements apply to. 1910 */ 1911 @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1912 @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." ) 1913 protected IntegerType destination; 1914 1915 /** 1916 * Links to the FHIR specification that describes this interaction and the resources involved in more detail. 1917 */ 1918 @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1919 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." ) 1920 protected List<UriType> link; 1921 1922 /** 1923 * 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. 1924 */ 1925 @Child(name = "capabilities", type = {CapabilityStatement.class}, order=7, min=1, max=1, modifier=false, summary=false) 1926 @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." ) 1927 protected Reference capabilities; 1928 1929 /** 1930 * 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.) 1931 */ 1932 protected CapabilityStatement capabilitiesTarget; 1933 1934 private static final long serialVersionUID = -106110735L; 1935 1936 /** 1937 * Constructor 1938 */ 1939 public TestScriptMetadataCapabilityComponent() { 1940 super(); 1941 } 1942 1943 /** 1944 * Constructor 1945 */ 1946 public TestScriptMetadataCapabilityComponent(Reference capabilities) { 1947 super(); 1948 this.capabilities = capabilities; 1949 } 1950 1951 /** 1952 * @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 1953 */ 1954 public BooleanType getRequiredElement() { 1955 if (this.required == null) 1956 if (Configuration.errorOnAutoCreate()) 1957 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required"); 1958 else if (Configuration.doAutoCreate()) 1959 this.required = new BooleanType(); // bb 1960 return this.required; 1961 } 1962 1963 public boolean hasRequiredElement() { 1964 return this.required != null && !this.required.isEmpty(); 1965 } 1966 1967 public boolean hasRequired() { 1968 return this.required != null && !this.required.isEmpty(); 1969 } 1970 1971 /** 1972 * @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 1973 */ 1974 public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 1975 this.required = value; 1976 return this; 1977 } 1978 1979 /** 1980 * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1981 */ 1982 public boolean getRequired() { 1983 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 1984 } 1985 1986 /** 1987 * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1988 */ 1989 public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 1990 if (this.required == null) 1991 this.required = new BooleanType(); 1992 this.required.setValue(value); 1993 return this; 1994 } 1995 1996 /** 1997 * @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 1998 */ 1999 public BooleanType getValidatedElement() { 2000 if (this.validated == null) 2001 if (Configuration.errorOnAutoCreate()) 2002 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated"); 2003 else if (Configuration.doAutoCreate()) 2004 this.validated = new BooleanType(); // bb 2005 return this.validated; 2006 } 2007 2008 public boolean hasValidatedElement() { 2009 return this.validated != null && !this.validated.isEmpty(); 2010 } 2011 2012 public boolean hasValidated() { 2013 return this.validated != null && !this.validated.isEmpty(); 2014 } 2015 2016 /** 2017 * @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 2018 */ 2019 public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 2020 this.validated = value; 2021 return this; 2022 } 2023 2024 /** 2025 * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 2026 */ 2027 public boolean getValidated() { 2028 return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue(); 2029 } 2030 2031 /** 2032 * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 2033 */ 2034 public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 2035 if (this.validated == null) 2036 this.validated = new BooleanType(); 2037 this.validated.setValue(value); 2038 return this; 2039 } 2040 2041 /** 2042 * @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 2043 */ 2044 public StringType getDescriptionElement() { 2045 if (this.description == null) 2046 if (Configuration.errorOnAutoCreate()) 2047 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description"); 2048 else if (Configuration.doAutoCreate()) 2049 this.description = new StringType(); // bb 2050 return this.description; 2051 } 2052 2053 public boolean hasDescriptionElement() { 2054 return this.description != null && !this.description.isEmpty(); 2055 } 2056 2057 public boolean hasDescription() { 2058 return this.description != null && !this.description.isEmpty(); 2059 } 2060 2061 /** 2062 * @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 2063 */ 2064 public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 2065 this.description = value; 2066 return this; 2067 } 2068 2069 /** 2070 * @return Description of the capabilities that this test script is requiring the server to support. 2071 */ 2072 public String getDescription() { 2073 return this.description == null ? null : this.description.getValue(); 2074 } 2075 2076 /** 2077 * @param value Description of the capabilities that this test script is requiring the server to support. 2078 */ 2079 public TestScriptMetadataCapabilityComponent setDescription(String value) { 2080 if (Utilities.noString(value)) 2081 this.description = null; 2082 else { 2083 if (this.description == null) 2084 this.description = new StringType(); 2085 this.description.setValue(value); 2086 } 2087 return this; 2088 } 2089 2090 /** 2091 * @return {@link #origin} (Which origin server these requirements apply to.) 2092 */ 2093 public List<IntegerType> getOrigin() { 2094 if (this.origin == null) 2095 this.origin = new ArrayList<IntegerType>(); 2096 return this.origin; 2097 } 2098 2099 /** 2100 * @return Returns a reference to <code>this</code> for easy method chaining 2101 */ 2102 public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 2103 this.origin = theOrigin; 2104 return this; 2105 } 2106 2107 public boolean hasOrigin() { 2108 if (this.origin == null) 2109 return false; 2110 for (IntegerType item : this.origin) 2111 if (!item.isEmpty()) 2112 return true; 2113 return false; 2114 } 2115 2116 /** 2117 * @return {@link #origin} (Which origin server these requirements apply to.) 2118 */ 2119 public IntegerType addOriginElement() {//2 2120 IntegerType t = new IntegerType(); 2121 if (this.origin == null) 2122 this.origin = new ArrayList<IntegerType>(); 2123 this.origin.add(t); 2124 return t; 2125 } 2126 2127 /** 2128 * @param value {@link #origin} (Which origin server these requirements apply to.) 2129 */ 2130 public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1 2131 IntegerType t = new IntegerType(); 2132 t.setValue(value); 2133 if (this.origin == null) 2134 this.origin = new ArrayList<IntegerType>(); 2135 this.origin.add(t); 2136 return this; 2137 } 2138 2139 /** 2140 * @param value {@link #origin} (Which origin server these requirements apply to.) 2141 */ 2142 public boolean hasOrigin(int value) { 2143 if (this.origin == null) 2144 return false; 2145 for (IntegerType v : this.origin) 2146 if (v.getValue().equals(value)) // integer 2147 return true; 2148 return false; 2149 } 2150 2151 /** 2152 * @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 2153 */ 2154 public IntegerType getDestinationElement() { 2155 if (this.destination == null) 2156 if (Configuration.errorOnAutoCreate()) 2157 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination"); 2158 else if (Configuration.doAutoCreate()) 2159 this.destination = new IntegerType(); // bb 2160 return this.destination; 2161 } 2162 2163 public boolean hasDestinationElement() { 2164 return this.destination != null && !this.destination.isEmpty(); 2165 } 2166 2167 public boolean hasDestination() { 2168 return this.destination != null && !this.destination.isEmpty(); 2169 } 2170 2171 /** 2172 * @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 2173 */ 2174 public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 2175 this.destination = value; 2176 return this; 2177 } 2178 2179 /** 2180 * @return Which server these requirements apply to. 2181 */ 2182 public int getDestination() { 2183 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 2184 } 2185 2186 /** 2187 * @param value Which server these requirements apply to. 2188 */ 2189 public TestScriptMetadataCapabilityComponent setDestination(int value) { 2190 if (this.destination == null) 2191 this.destination = new IntegerType(); 2192 this.destination.setValue(value); 2193 return this; 2194 } 2195 2196 /** 2197 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2198 */ 2199 public List<UriType> getLink() { 2200 if (this.link == null) 2201 this.link = new ArrayList<UriType>(); 2202 return this.link; 2203 } 2204 2205 /** 2206 * @return Returns a reference to <code>this</code> for easy method chaining 2207 */ 2208 public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 2209 this.link = theLink; 2210 return this; 2211 } 2212 2213 public boolean hasLink() { 2214 if (this.link == null) 2215 return false; 2216 for (UriType item : this.link) 2217 if (!item.isEmpty()) 2218 return true; 2219 return false; 2220 } 2221 2222 /** 2223 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2224 */ 2225 public UriType addLinkElement() {//2 2226 UriType t = new UriType(); 2227 if (this.link == null) 2228 this.link = new ArrayList<UriType>(); 2229 this.link.add(t); 2230 return t; 2231 } 2232 2233 /** 2234 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2235 */ 2236 public TestScriptMetadataCapabilityComponent addLink(String value) { //1 2237 UriType t = new UriType(); 2238 t.setValue(value); 2239 if (this.link == null) 2240 this.link = new ArrayList<UriType>(); 2241 this.link.add(t); 2242 return this; 2243 } 2244 2245 /** 2246 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2247 */ 2248 public boolean hasLink(String value) { 2249 if (this.link == null) 2250 return false; 2251 for (UriType v : this.link) 2252 if (v.getValue().equals(value)) // uri 2253 return true; 2254 return false; 2255 } 2256 2257 /** 2258 * @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.) 2259 */ 2260 public Reference getCapabilities() { 2261 if (this.capabilities == null) 2262 if (Configuration.errorOnAutoCreate()) 2263 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities"); 2264 else if (Configuration.doAutoCreate()) 2265 this.capabilities = new Reference(); // cc 2266 return this.capabilities; 2267 } 2268 2269 public boolean hasCapabilities() { 2270 return this.capabilities != null && !this.capabilities.isEmpty(); 2271 } 2272 2273 /** 2274 * @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.) 2275 */ 2276 public TestScriptMetadataCapabilityComponent setCapabilities(Reference value) { 2277 this.capabilities = value; 2278 return this; 2279 } 2280 2281 /** 2282 * @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.) 2283 */ 2284 public CapabilityStatement getCapabilitiesTarget() { 2285 if (this.capabilitiesTarget == null) 2286 if (Configuration.errorOnAutoCreate()) 2287 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities"); 2288 else if (Configuration.doAutoCreate()) 2289 this.capabilitiesTarget = new CapabilityStatement(); // aa 2290 return this.capabilitiesTarget; 2291 } 2292 2293 /** 2294 * @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.) 2295 */ 2296 public TestScriptMetadataCapabilityComponent setCapabilitiesTarget(CapabilityStatement value) { 2297 this.capabilitiesTarget = value; 2298 return this; 2299 } 2300 2301 protected void listChildren(List<Property> children) { 2302 super.listChildren(children); 2303 children.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, 1, required)); 2304 children.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, 1, validated)); 2305 children.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description)); 2306 children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin)); 2307 children.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination)); 2308 children.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)); 2309 children.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, 1, capabilities)); 2310 } 2311 2312 @Override 2313 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2314 switch (_hash) { 2315 case -393139297: /*required*/ return 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, 1, required); 2316 case -1109784050: /*validated*/ return 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, 1, validated); 2317 case -1724546052: /*description*/ return new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description); 2318 case -1008619738: /*origin*/ return new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin); 2319 case -1429847026: /*destination*/ return new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination); 2320 case 3321850: /*link*/ return 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); 2321 case -1487597642: /*capabilities*/ return 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, 1, capabilities); 2322 default: return super.getNamedProperty(_hash, _name, _checkValid); 2323 } 2324 2325 } 2326 2327 @Override 2328 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2329 switch (hash) { 2330 case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType 2331 case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType 2332 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2333 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType 2334 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 2335 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType 2336 case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // Reference 2337 default: return super.getProperty(hash, name, checkValid); 2338 } 2339 2340 } 2341 2342 @Override 2343 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2344 switch (hash) { 2345 case -393139297: // required 2346 this.required = castToBoolean(value); // BooleanType 2347 return value; 2348 case -1109784050: // validated 2349 this.validated = castToBoolean(value); // BooleanType 2350 return value; 2351 case -1724546052: // description 2352 this.description = castToString(value); // StringType 2353 return value; 2354 case -1008619738: // origin 2355 this.getOrigin().add(castToInteger(value)); // IntegerType 2356 return value; 2357 case -1429847026: // destination 2358 this.destination = castToInteger(value); // IntegerType 2359 return value; 2360 case 3321850: // link 2361 this.getLink().add(castToUri(value)); // UriType 2362 return value; 2363 case -1487597642: // capabilities 2364 this.capabilities = castToReference(value); // Reference 2365 return value; 2366 default: return super.setProperty(hash, name, value); 2367 } 2368 2369 } 2370 2371 @Override 2372 public Base setProperty(String name, Base value) throws FHIRException { 2373 if (name.equals("required")) { 2374 this.required = castToBoolean(value); // BooleanType 2375 } else if (name.equals("validated")) { 2376 this.validated = castToBoolean(value); // BooleanType 2377 } else if (name.equals("description")) { 2378 this.description = castToString(value); // StringType 2379 } else if (name.equals("origin")) { 2380 this.getOrigin().add(castToInteger(value)); 2381 } else if (name.equals("destination")) { 2382 this.destination = castToInteger(value); // IntegerType 2383 } else if (name.equals("link")) { 2384 this.getLink().add(castToUri(value)); 2385 } else if (name.equals("capabilities")) { 2386 this.capabilities = castToReference(value); // Reference 2387 } else 2388 return super.setProperty(name, value); 2389 return value; 2390 } 2391 2392 @Override 2393 public Base makeProperty(int hash, String name) throws FHIRException { 2394 switch (hash) { 2395 case -393139297: return getRequiredElement(); 2396 case -1109784050: return getValidatedElement(); 2397 case -1724546052: return getDescriptionElement(); 2398 case -1008619738: return addOriginElement(); 2399 case -1429847026: return getDestinationElement(); 2400 case 3321850: return addLinkElement(); 2401 case -1487597642: return getCapabilities(); 2402 default: return super.makeProperty(hash, name); 2403 } 2404 2405 } 2406 2407 @Override 2408 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2409 switch (hash) { 2410 case -393139297: /*required*/ return new String[] {"boolean"}; 2411 case -1109784050: /*validated*/ return new String[] {"boolean"}; 2412 case -1724546052: /*description*/ return new String[] {"string"}; 2413 case -1008619738: /*origin*/ return new String[] {"integer"}; 2414 case -1429847026: /*destination*/ return new String[] {"integer"}; 2415 case 3321850: /*link*/ return new String[] {"uri"}; 2416 case -1487597642: /*capabilities*/ return new String[] {"Reference"}; 2417 default: return super.getTypesForProperty(hash, name); 2418 } 2419 2420 } 2421 2422 @Override 2423 public Base addChild(String name) throws FHIRException { 2424 if (name.equals("required")) { 2425 throw new FHIRException("Cannot call addChild on a primitive type TestScript.required"); 2426 } 2427 else if (name.equals("validated")) { 2428 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated"); 2429 } 2430 else if (name.equals("description")) { 2431 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 2432 } 2433 else if (name.equals("origin")) { 2434 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 2435 } 2436 else if (name.equals("destination")) { 2437 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 2438 } 2439 else if (name.equals("link")) { 2440 throw new FHIRException("Cannot call addChild on a primitive type TestScript.link"); 2441 } 2442 else if (name.equals("capabilities")) { 2443 this.capabilities = new Reference(); 2444 return this.capabilities; 2445 } 2446 else 2447 return super.addChild(name); 2448 } 2449 2450 public TestScriptMetadataCapabilityComponent copy() { 2451 TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent(); 2452 copyValues(dst); 2453 dst.required = required == null ? null : required.copy(); 2454 dst.validated = validated == null ? null : validated.copy(); 2455 dst.description = description == null ? null : description.copy(); 2456 if (origin != null) { 2457 dst.origin = new ArrayList<IntegerType>(); 2458 for (IntegerType i : origin) 2459 dst.origin.add(i.copy()); 2460 }; 2461 dst.destination = destination == null ? null : destination.copy(); 2462 if (link != null) { 2463 dst.link = new ArrayList<UriType>(); 2464 for (UriType i : link) 2465 dst.link.add(i.copy()); 2466 }; 2467 dst.capabilities = capabilities == null ? null : capabilities.copy(); 2468 return dst; 2469 } 2470 2471 @Override 2472 public boolean equalsDeep(Base other_) { 2473 if (!super.equalsDeep(other_)) 2474 return false; 2475 if (!(other_ instanceof TestScriptMetadataCapabilityComponent)) 2476 return false; 2477 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_; 2478 return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true) 2479 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true) 2480 && compareDeep(capabilities, o.capabilities, true); 2481 } 2482 2483 @Override 2484 public boolean equalsShallow(Base other_) { 2485 if (!super.equalsShallow(other_)) 2486 return false; 2487 if (!(other_ instanceof TestScriptMetadataCapabilityComponent)) 2488 return false; 2489 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_; 2490 return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true) 2491 && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true) 2492 ; 2493 } 2494 2495 public boolean isEmpty() { 2496 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description 2497 , origin, destination, link, capabilities); 2498 } 2499 2500 public String fhirType() { 2501 return "TestScript.metadata.capability"; 2502 2503 } 2504 2505 } 2506 2507 @Block() 2508 public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement { 2509 /** 2510 * 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. 2511 */ 2512 @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2513 @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." ) 2514 protected BooleanType autocreate; 2515 2516 /** 2517 * 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. 2518 */ 2519 @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2520 @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." ) 2521 protected BooleanType autodelete; 2522 2523 /** 2524 * Reference to the resource (containing the contents of the resource needed for operations). 2525 */ 2526 @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false) 2527 @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." ) 2528 protected Reference resource; 2529 2530 /** 2531 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).) 2532 */ 2533 protected Resource resourceTarget; 2534 2535 private static final long serialVersionUID = 1110683307L; 2536 2537 /** 2538 * Constructor 2539 */ 2540 public TestScriptFixtureComponent() { 2541 super(); 2542 } 2543 2544 /** 2545 * @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 2546 */ 2547 public BooleanType getAutocreateElement() { 2548 if (this.autocreate == null) 2549 if (Configuration.errorOnAutoCreate()) 2550 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate"); 2551 else if (Configuration.doAutoCreate()) 2552 this.autocreate = new BooleanType(); // bb 2553 return this.autocreate; 2554 } 2555 2556 public boolean hasAutocreateElement() { 2557 return this.autocreate != null && !this.autocreate.isEmpty(); 2558 } 2559 2560 public boolean hasAutocreate() { 2561 return this.autocreate != null && !this.autocreate.isEmpty(); 2562 } 2563 2564 /** 2565 * @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 2566 */ 2567 public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 2568 this.autocreate = value; 2569 return this; 2570 } 2571 2572 /** 2573 * @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. 2574 */ 2575 public boolean getAutocreate() { 2576 return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue(); 2577 } 2578 2579 /** 2580 * @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. 2581 */ 2582 public TestScriptFixtureComponent setAutocreate(boolean value) { 2583 if (this.autocreate == null) 2584 this.autocreate = new BooleanType(); 2585 this.autocreate.setValue(value); 2586 return this; 2587 } 2588 2589 /** 2590 * @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 2591 */ 2592 public BooleanType getAutodeleteElement() { 2593 if (this.autodelete == null) 2594 if (Configuration.errorOnAutoCreate()) 2595 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete"); 2596 else if (Configuration.doAutoCreate()) 2597 this.autodelete = new BooleanType(); // bb 2598 return this.autodelete; 2599 } 2600 2601 public boolean hasAutodeleteElement() { 2602 return this.autodelete != null && !this.autodelete.isEmpty(); 2603 } 2604 2605 public boolean hasAutodelete() { 2606 return this.autodelete != null && !this.autodelete.isEmpty(); 2607 } 2608 2609 /** 2610 * @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 2611 */ 2612 public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 2613 this.autodelete = value; 2614 return this; 2615 } 2616 2617 /** 2618 * @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. 2619 */ 2620 public boolean getAutodelete() { 2621 return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue(); 2622 } 2623 2624 /** 2625 * @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. 2626 */ 2627 public TestScriptFixtureComponent setAutodelete(boolean value) { 2628 if (this.autodelete == null) 2629 this.autodelete = new BooleanType(); 2630 this.autodelete.setValue(value); 2631 return this; 2632 } 2633 2634 /** 2635 * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2636 */ 2637 public Reference getResource() { 2638 if (this.resource == null) 2639 if (Configuration.errorOnAutoCreate()) 2640 throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource"); 2641 else if (Configuration.doAutoCreate()) 2642 this.resource = new Reference(); // cc 2643 return this.resource; 2644 } 2645 2646 public boolean hasResource() { 2647 return this.resource != null && !this.resource.isEmpty(); 2648 } 2649 2650 /** 2651 * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2652 */ 2653 public TestScriptFixtureComponent setResource(Reference value) { 2654 this.resource = value; 2655 return this; 2656 } 2657 2658 /** 2659 * @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).) 2660 */ 2661 public Resource getResourceTarget() { 2662 return this.resourceTarget; 2663 } 2664 2665 /** 2666 * @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).) 2667 */ 2668 public TestScriptFixtureComponent setResourceTarget(Resource value) { 2669 this.resourceTarget = value; 2670 return this; 2671 } 2672 2673 protected void listChildren(List<Property> children) { 2674 super.listChildren(children); 2675 children.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, 1, autocreate)); 2676 children.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, 1, autodelete)); 2677 children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource)); 2678 } 2679 2680 @Override 2681 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2682 switch (_hash) { 2683 case 73154411: /*autocreate*/ return 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, 1, autocreate); 2684 case 89990170: /*autodelete*/ return 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, 1, autodelete); 2685 case -341064690: /*resource*/ return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource); 2686 default: return super.getNamedProperty(_hash, _name, _checkValid); 2687 } 2688 2689 } 2690 2691 @Override 2692 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2693 switch (hash) { 2694 case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType 2695 case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType 2696 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 2697 default: return super.getProperty(hash, name, checkValid); 2698 } 2699 2700 } 2701 2702 @Override 2703 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2704 switch (hash) { 2705 case 73154411: // autocreate 2706 this.autocreate = castToBoolean(value); // BooleanType 2707 return value; 2708 case 89990170: // autodelete 2709 this.autodelete = castToBoolean(value); // BooleanType 2710 return value; 2711 case -341064690: // resource 2712 this.resource = castToReference(value); // Reference 2713 return value; 2714 default: return super.setProperty(hash, name, value); 2715 } 2716 2717 } 2718 2719 @Override 2720 public Base setProperty(String name, Base value) throws FHIRException { 2721 if (name.equals("autocreate")) { 2722 this.autocreate = castToBoolean(value); // BooleanType 2723 } else if (name.equals("autodelete")) { 2724 this.autodelete = castToBoolean(value); // BooleanType 2725 } else if (name.equals("resource")) { 2726 this.resource = castToReference(value); // Reference 2727 } else 2728 return super.setProperty(name, value); 2729 return value; 2730 } 2731 2732 @Override 2733 public Base makeProperty(int hash, String name) throws FHIRException { 2734 switch (hash) { 2735 case 73154411: return getAutocreateElement(); 2736 case 89990170: return getAutodeleteElement(); 2737 case -341064690: return getResource(); 2738 default: return super.makeProperty(hash, name); 2739 } 2740 2741 } 2742 2743 @Override 2744 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2745 switch (hash) { 2746 case 73154411: /*autocreate*/ return new String[] {"boolean"}; 2747 case 89990170: /*autodelete*/ return new String[] {"boolean"}; 2748 case -341064690: /*resource*/ return new String[] {"Reference"}; 2749 default: return super.getTypesForProperty(hash, name); 2750 } 2751 2752 } 2753 2754 @Override 2755 public Base addChild(String name) throws FHIRException { 2756 if (name.equals("autocreate")) { 2757 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate"); 2758 } 2759 else if (name.equals("autodelete")) { 2760 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete"); 2761 } 2762 else if (name.equals("resource")) { 2763 this.resource = new Reference(); 2764 return this.resource; 2765 } 2766 else 2767 return super.addChild(name); 2768 } 2769 2770 public TestScriptFixtureComponent copy() { 2771 TestScriptFixtureComponent dst = new TestScriptFixtureComponent(); 2772 copyValues(dst); 2773 dst.autocreate = autocreate == null ? null : autocreate.copy(); 2774 dst.autodelete = autodelete == null ? null : autodelete.copy(); 2775 dst.resource = resource == null ? null : resource.copy(); 2776 return dst; 2777 } 2778 2779 @Override 2780 public boolean equalsDeep(Base other_) { 2781 if (!super.equalsDeep(other_)) 2782 return false; 2783 if (!(other_ instanceof TestScriptFixtureComponent)) 2784 return false; 2785 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_; 2786 return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true) 2787 && compareDeep(resource, o.resource, true); 2788 } 2789 2790 @Override 2791 public boolean equalsShallow(Base other_) { 2792 if (!super.equalsShallow(other_)) 2793 return false; 2794 if (!(other_ instanceof TestScriptFixtureComponent)) 2795 return false; 2796 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_; 2797 return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true) 2798 ; 2799 } 2800 2801 public boolean isEmpty() { 2802 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource 2803 ); 2804 } 2805 2806 public String fhirType() { 2807 return "TestScript.fixture"; 2808 2809 } 2810 2811 } 2812 2813 @Block() 2814 public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement { 2815 /** 2816 * Descriptive name for this variable. 2817 */ 2818 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2819 @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." ) 2820 protected StringType name; 2821 2822 /** 2823 * A default, hard-coded, or user-defined value for this variable. 2824 */ 2825 @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2826 @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." ) 2827 protected StringType defaultValue; 2828 2829 /** 2830 * A free text natural language description of the variable and its purpose. 2831 */ 2832 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2833 @Description(shortDefinition="Natural language description of the variable", formalDefinition="A free text natural language description of the variable and its purpose." ) 2834 protected StringType description; 2835 2836 /** 2837 * The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2838 */ 2839 @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 2840 @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." ) 2841 protected StringType expression; 2842 2843 /** 2844 * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2845 */ 2846 @Child(name = "headerField", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2847 @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." ) 2848 protected StringType headerField; 2849 2850 /** 2851 * Displayable text string with hint help information to the user when entering a default value. 2852 */ 2853 @Child(name = "hint", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 2854 @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." ) 2855 protected StringType hint; 2856 2857 /** 2858 * XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2859 */ 2860 @Child(name = "path", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 2861 @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." ) 2862 protected StringType path; 2863 2864 /** 2865 * Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2866 */ 2867 @Child(name = "sourceId", type = {IdType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2868 @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." ) 2869 protected IdType sourceId; 2870 2871 private static final long serialVersionUID = -1592325432L; 2872 2873 /** 2874 * Constructor 2875 */ 2876 public TestScriptVariableComponent() { 2877 super(); 2878 } 2879 2880 /** 2881 * Constructor 2882 */ 2883 public TestScriptVariableComponent(StringType name) { 2884 super(); 2885 this.name = name; 2886 } 2887 2888 /** 2889 * @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 2890 */ 2891 public StringType getNameElement() { 2892 if (this.name == null) 2893 if (Configuration.errorOnAutoCreate()) 2894 throw new Error("Attempt to auto-create TestScriptVariableComponent.name"); 2895 else if (Configuration.doAutoCreate()) 2896 this.name = new StringType(); // bb 2897 return this.name; 2898 } 2899 2900 public boolean hasNameElement() { 2901 return this.name != null && !this.name.isEmpty(); 2902 } 2903 2904 public boolean hasName() { 2905 return this.name != null && !this.name.isEmpty(); 2906 } 2907 2908 /** 2909 * @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 2910 */ 2911 public TestScriptVariableComponent setNameElement(StringType value) { 2912 this.name = value; 2913 return this; 2914 } 2915 2916 /** 2917 * @return Descriptive name for this variable. 2918 */ 2919 public String getName() { 2920 return this.name == null ? null : this.name.getValue(); 2921 } 2922 2923 /** 2924 * @param value Descriptive name for this variable. 2925 */ 2926 public TestScriptVariableComponent setName(String value) { 2927 if (this.name == null) 2928 this.name = new StringType(); 2929 this.name.setValue(value); 2930 return this; 2931 } 2932 2933 /** 2934 * @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 2935 */ 2936 public StringType getDefaultValueElement() { 2937 if (this.defaultValue == null) 2938 if (Configuration.errorOnAutoCreate()) 2939 throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue"); 2940 else if (Configuration.doAutoCreate()) 2941 this.defaultValue = new StringType(); // bb 2942 return this.defaultValue; 2943 } 2944 2945 public boolean hasDefaultValueElement() { 2946 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2947 } 2948 2949 public boolean hasDefaultValue() { 2950 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2951 } 2952 2953 /** 2954 * @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 2955 */ 2956 public TestScriptVariableComponent setDefaultValueElement(StringType value) { 2957 this.defaultValue = value; 2958 return this; 2959 } 2960 2961 /** 2962 * @return A default, hard-coded, or user-defined value for this variable. 2963 */ 2964 public String getDefaultValue() { 2965 return this.defaultValue == null ? null : this.defaultValue.getValue(); 2966 } 2967 2968 /** 2969 * @param value A default, hard-coded, or user-defined value for this variable. 2970 */ 2971 public TestScriptVariableComponent setDefaultValue(String value) { 2972 if (Utilities.noString(value)) 2973 this.defaultValue = null; 2974 else { 2975 if (this.defaultValue == null) 2976 this.defaultValue = new StringType(); 2977 this.defaultValue.setValue(value); 2978 } 2979 return this; 2980 } 2981 2982 /** 2983 * @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 2984 */ 2985 public StringType getDescriptionElement() { 2986 if (this.description == null) 2987 if (Configuration.errorOnAutoCreate()) 2988 throw new Error("Attempt to auto-create TestScriptVariableComponent.description"); 2989 else if (Configuration.doAutoCreate()) 2990 this.description = new StringType(); // bb 2991 return this.description; 2992 } 2993 2994 public boolean hasDescriptionElement() { 2995 return this.description != null && !this.description.isEmpty(); 2996 } 2997 2998 public boolean hasDescription() { 2999 return this.description != null && !this.description.isEmpty(); 3000 } 3001 3002 /** 3003 * @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 3004 */ 3005 public TestScriptVariableComponent setDescriptionElement(StringType value) { 3006 this.description = value; 3007 return this; 3008 } 3009 3010 /** 3011 * @return A free text natural language description of the variable and its purpose. 3012 */ 3013 public String getDescription() { 3014 return this.description == null ? null : this.description.getValue(); 3015 } 3016 3017 /** 3018 * @param value A free text natural language description of the variable and its purpose. 3019 */ 3020 public TestScriptVariableComponent setDescription(String value) { 3021 if (Utilities.noString(value)) 3022 this.description = null; 3023 else { 3024 if (this.description == null) 3025 this.description = new StringType(); 3026 this.description.setValue(value); 3027 } 3028 return this; 3029 } 3030 3031 /** 3032 * @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 3033 */ 3034 public StringType getExpressionElement() { 3035 if (this.expression == null) 3036 if (Configuration.errorOnAutoCreate()) 3037 throw new Error("Attempt to auto-create TestScriptVariableComponent.expression"); 3038 else if (Configuration.doAutoCreate()) 3039 this.expression = new StringType(); // bb 3040 return this.expression; 3041 } 3042 3043 public boolean hasExpressionElement() { 3044 return this.expression != null && !this.expression.isEmpty(); 3045 } 3046 3047 public boolean hasExpression() { 3048 return this.expression != null && !this.expression.isEmpty(); 3049 } 3050 3051 /** 3052 * @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 3053 */ 3054 public TestScriptVariableComponent setExpressionElement(StringType value) { 3055 this.expression = value; 3056 return this; 3057 } 3058 3059 /** 3060 * @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. 3061 */ 3062 public String getExpression() { 3063 return this.expression == null ? null : this.expression.getValue(); 3064 } 3065 3066 /** 3067 * @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. 3068 */ 3069 public TestScriptVariableComponent setExpression(String value) { 3070 if (Utilities.noString(value)) 3071 this.expression = null; 3072 else { 3073 if (this.expression == null) 3074 this.expression = new StringType(); 3075 this.expression.setValue(value); 3076 } 3077 return this; 3078 } 3079 3080 /** 3081 * @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 3082 */ 3083 public StringType getHeaderFieldElement() { 3084 if (this.headerField == null) 3085 if (Configuration.errorOnAutoCreate()) 3086 throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField"); 3087 else if (Configuration.doAutoCreate()) 3088 this.headerField = new StringType(); // bb 3089 return this.headerField; 3090 } 3091 3092 public boolean hasHeaderFieldElement() { 3093 return this.headerField != null && !this.headerField.isEmpty(); 3094 } 3095 3096 public boolean hasHeaderField() { 3097 return this.headerField != null && !this.headerField.isEmpty(); 3098 } 3099 3100 /** 3101 * @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 3102 */ 3103 public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 3104 this.headerField = value; 3105 return this; 3106 } 3107 3108 /** 3109 * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 3110 */ 3111 public String getHeaderField() { 3112 return this.headerField == null ? null : this.headerField.getValue(); 3113 } 3114 3115 /** 3116 * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 3117 */ 3118 public TestScriptVariableComponent setHeaderField(String value) { 3119 if (Utilities.noString(value)) 3120 this.headerField = null; 3121 else { 3122 if (this.headerField == null) 3123 this.headerField = new StringType(); 3124 this.headerField.setValue(value); 3125 } 3126 return this; 3127 } 3128 3129 /** 3130 * @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 3131 */ 3132 public StringType getHintElement() { 3133 if (this.hint == null) 3134 if (Configuration.errorOnAutoCreate()) 3135 throw new Error("Attempt to auto-create TestScriptVariableComponent.hint"); 3136 else if (Configuration.doAutoCreate()) 3137 this.hint = new StringType(); // bb 3138 return this.hint; 3139 } 3140 3141 public boolean hasHintElement() { 3142 return this.hint != null && !this.hint.isEmpty(); 3143 } 3144 3145 public boolean hasHint() { 3146 return this.hint != null && !this.hint.isEmpty(); 3147 } 3148 3149 /** 3150 * @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 3151 */ 3152 public TestScriptVariableComponent setHintElement(StringType value) { 3153 this.hint = value; 3154 return this; 3155 } 3156 3157 /** 3158 * @return Displayable text string with hint help information to the user when entering a default value. 3159 */ 3160 public String getHint() { 3161 return this.hint == null ? null : this.hint.getValue(); 3162 } 3163 3164 /** 3165 * @param value Displayable text string with hint help information to the user when entering a default value. 3166 */ 3167 public TestScriptVariableComponent setHint(String value) { 3168 if (Utilities.noString(value)) 3169 this.hint = null; 3170 else { 3171 if (this.hint == null) 3172 this.hint = new StringType(); 3173 this.hint.setValue(value); 3174 } 3175 return this; 3176 } 3177 3178 /** 3179 * @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 3180 */ 3181 public StringType getPathElement() { 3182 if (this.path == null) 3183 if (Configuration.errorOnAutoCreate()) 3184 throw new Error("Attempt to auto-create TestScriptVariableComponent.path"); 3185 else if (Configuration.doAutoCreate()) 3186 this.path = new StringType(); // bb 3187 return this.path; 3188 } 3189 3190 public boolean hasPathElement() { 3191 return this.path != null && !this.path.isEmpty(); 3192 } 3193 3194 public boolean hasPath() { 3195 return this.path != null && !this.path.isEmpty(); 3196 } 3197 3198 /** 3199 * @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 3200 */ 3201 public TestScriptVariableComponent setPathElement(StringType value) { 3202 this.path = value; 3203 return this; 3204 } 3205 3206 /** 3207 * @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. 3208 */ 3209 public String getPath() { 3210 return this.path == null ? null : this.path.getValue(); 3211 } 3212 3213 /** 3214 * @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. 3215 */ 3216 public TestScriptVariableComponent setPath(String value) { 3217 if (Utilities.noString(value)) 3218 this.path = null; 3219 else { 3220 if (this.path == null) 3221 this.path = new StringType(); 3222 this.path.setValue(value); 3223 } 3224 return this; 3225 } 3226 3227 /** 3228 * @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 3229 */ 3230 public IdType getSourceIdElement() { 3231 if (this.sourceId == null) 3232 if (Configuration.errorOnAutoCreate()) 3233 throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId"); 3234 else if (Configuration.doAutoCreate()) 3235 this.sourceId = new IdType(); // bb 3236 return this.sourceId; 3237 } 3238 3239 public boolean hasSourceIdElement() { 3240 return this.sourceId != null && !this.sourceId.isEmpty(); 3241 } 3242 3243 public boolean hasSourceId() { 3244 return this.sourceId != null && !this.sourceId.isEmpty(); 3245 } 3246 3247 /** 3248 * @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 3249 */ 3250 public TestScriptVariableComponent setSourceIdElement(IdType value) { 3251 this.sourceId = value; 3252 return this; 3253 } 3254 3255 /** 3256 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 3257 */ 3258 public String getSourceId() { 3259 return this.sourceId == null ? null : this.sourceId.getValue(); 3260 } 3261 3262 /** 3263 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 3264 */ 3265 public TestScriptVariableComponent setSourceId(String value) { 3266 if (Utilities.noString(value)) 3267 this.sourceId = null; 3268 else { 3269 if (this.sourceId == null) 3270 this.sourceId = new IdType(); 3271 this.sourceId.setValue(value); 3272 } 3273 return this; 3274 } 3275 3276 protected void listChildren(List<Property> children) { 3277 super.listChildren(children); 3278 children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name)); 3279 children.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue)); 3280 children.add(new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description)); 3281 children.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, 1, expression)); 3282 children.add(new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1, headerField)); 3283 children.add(new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint)); 3284 children.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, 1, path)); 3285 children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", 0, 1, sourceId)); 3286 } 3287 3288 @Override 3289 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3290 switch (_hash) { 3291 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name); 3292 case -659125328: /*defaultValue*/ return new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue); 3293 case -1724546052: /*description*/ return new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description); 3294 case -1795452264: /*expression*/ return 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, 1, expression); 3295 case 1160732269: /*headerField*/ return new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, 1, headerField); 3296 case 3202695: /*hint*/ return new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint); 3297 case 3433509: /*path*/ return 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, 1, path); 3298 case 1746327190: /*sourceId*/ return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", 0, 1, sourceId); 3299 default: return super.getNamedProperty(_hash, _name, _checkValid); 3300 } 3301 3302 } 3303 3304 @Override 3305 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3306 switch (hash) { 3307 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3308 case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType 3309 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3310 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 3311 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 3312 case 3202695: /*hint*/ return this.hint == null ? new Base[0] : new Base[] {this.hint}; // StringType 3313 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 3314 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 3315 default: return super.getProperty(hash, name, checkValid); 3316 } 3317 3318 } 3319 3320 @Override 3321 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3322 switch (hash) { 3323 case 3373707: // name 3324 this.name = castToString(value); // StringType 3325 return value; 3326 case -659125328: // defaultValue 3327 this.defaultValue = castToString(value); // StringType 3328 return value; 3329 case -1724546052: // description 3330 this.description = castToString(value); // StringType 3331 return value; 3332 case -1795452264: // expression 3333 this.expression = castToString(value); // StringType 3334 return value; 3335 case 1160732269: // headerField 3336 this.headerField = castToString(value); // StringType 3337 return value; 3338 case 3202695: // hint 3339 this.hint = castToString(value); // StringType 3340 return value; 3341 case 3433509: // path 3342 this.path = castToString(value); // StringType 3343 return value; 3344 case 1746327190: // sourceId 3345 this.sourceId = castToId(value); // IdType 3346 return value; 3347 default: return super.setProperty(hash, name, value); 3348 } 3349 3350 } 3351 3352 @Override 3353 public Base setProperty(String name, Base value) throws FHIRException { 3354 if (name.equals("name")) { 3355 this.name = castToString(value); // StringType 3356 } else if (name.equals("defaultValue")) { 3357 this.defaultValue = castToString(value); // StringType 3358 } else if (name.equals("description")) { 3359 this.description = castToString(value); // StringType 3360 } else if (name.equals("expression")) { 3361 this.expression = castToString(value); // StringType 3362 } else if (name.equals("headerField")) { 3363 this.headerField = castToString(value); // StringType 3364 } else if (name.equals("hint")) { 3365 this.hint = castToString(value); // StringType 3366 } else if (name.equals("path")) { 3367 this.path = castToString(value); // StringType 3368 } else if (name.equals("sourceId")) { 3369 this.sourceId = castToId(value); // IdType 3370 } else 3371 return super.setProperty(name, value); 3372 return value; 3373 } 3374 3375 @Override 3376 public Base makeProperty(int hash, String name) throws FHIRException { 3377 switch (hash) { 3378 case 3373707: return getNameElement(); 3379 case -659125328: return getDefaultValueElement(); 3380 case -1724546052: return getDescriptionElement(); 3381 case -1795452264: return getExpressionElement(); 3382 case 1160732269: return getHeaderFieldElement(); 3383 case 3202695: return getHintElement(); 3384 case 3433509: return getPathElement(); 3385 case 1746327190: return getSourceIdElement(); 3386 default: return super.makeProperty(hash, name); 3387 } 3388 3389 } 3390 3391 @Override 3392 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3393 switch (hash) { 3394 case 3373707: /*name*/ return new String[] {"string"}; 3395 case -659125328: /*defaultValue*/ return new String[] {"string"}; 3396 case -1724546052: /*description*/ return new String[] {"string"}; 3397 case -1795452264: /*expression*/ return new String[] {"string"}; 3398 case 1160732269: /*headerField*/ return new String[] {"string"}; 3399 case 3202695: /*hint*/ return new String[] {"string"}; 3400 case 3433509: /*path*/ return new String[] {"string"}; 3401 case 1746327190: /*sourceId*/ return new String[] {"id"}; 3402 default: return super.getTypesForProperty(hash, name); 3403 } 3404 3405 } 3406 3407 @Override 3408 public Base addChild(String name) throws FHIRException { 3409 if (name.equals("name")) { 3410 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3411 } 3412 else if (name.equals("defaultValue")) { 3413 throw new FHIRException("Cannot call addChild on a primitive type TestScript.defaultValue"); 3414 } 3415 else if (name.equals("description")) { 3416 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 3417 } 3418 else if (name.equals("expression")) { 3419 throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression"); 3420 } 3421 else if (name.equals("headerField")) { 3422 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 3423 } 3424 else if (name.equals("hint")) { 3425 throw new FHIRException("Cannot call addChild on a primitive type TestScript.hint"); 3426 } 3427 else if (name.equals("path")) { 3428 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 3429 } 3430 else if (name.equals("sourceId")) { 3431 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 3432 } 3433 else 3434 return super.addChild(name); 3435 } 3436 3437 public TestScriptVariableComponent copy() { 3438 TestScriptVariableComponent dst = new TestScriptVariableComponent(); 3439 copyValues(dst); 3440 dst.name = name == null ? null : name.copy(); 3441 dst.defaultValue = defaultValue == null ? null : defaultValue.copy(); 3442 dst.description = description == null ? null : description.copy(); 3443 dst.expression = expression == null ? null : expression.copy(); 3444 dst.headerField = headerField == null ? null : headerField.copy(); 3445 dst.hint = hint == null ? null : hint.copy(); 3446 dst.path = path == null ? null : path.copy(); 3447 dst.sourceId = sourceId == null ? null : sourceId.copy(); 3448 return dst; 3449 } 3450 3451 @Override 3452 public boolean equalsDeep(Base other_) { 3453 if (!super.equalsDeep(other_)) 3454 return false; 3455 if (!(other_ instanceof TestScriptVariableComponent)) 3456 return false; 3457 TestScriptVariableComponent o = (TestScriptVariableComponent) other_; 3458 return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(description, o.description, true) 3459 && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true) 3460 && compareDeep(hint, o.hint, true) && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true) 3461 ; 3462 } 3463 3464 @Override 3465 public boolean equalsShallow(Base other_) { 3466 if (!super.equalsShallow(other_)) 3467 return false; 3468 if (!(other_ instanceof TestScriptVariableComponent)) 3469 return false; 3470 TestScriptVariableComponent o = (TestScriptVariableComponent) other_; 3471 return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(description, o.description, true) 3472 && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true) 3473 && compareValues(hint, o.hint, true) && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true) 3474 ; 3475 } 3476 3477 public boolean isEmpty() { 3478 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description 3479 , expression, headerField, hint, path, sourceId); 3480 } 3481 3482 public String fhirType() { 3483 return "TestScript.variable"; 3484 3485 } 3486 3487 } 3488 3489 @Block() 3490 public static class TestScriptRuleComponent extends BackboneElement implements IBaseBackboneElement { 3491 /** 3492 * Reference to the resource (containing the contents of the rule needed for assertions). 3493 */ 3494 @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 3495 @Description(shortDefinition="Assert rule resource reference", formalDefinition="Reference to the resource (containing the contents of the rule needed for assertions)." ) 3496 protected Reference resource; 3497 3498 /** 3499 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the rule needed for assertions).) 3500 */ 3501 protected Resource resourceTarget; 3502 3503 /** 3504 * Each rule template can take one or more parameters for rule evaluation. 3505 */ 3506 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3507 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 3508 protected List<RuleParamComponent> param; 3509 3510 private static final long serialVersionUID = -1869267735L; 3511 3512 /** 3513 * Constructor 3514 */ 3515 public TestScriptRuleComponent() { 3516 super(); 3517 } 3518 3519 /** 3520 * Constructor 3521 */ 3522 public TestScriptRuleComponent(Reference resource) { 3523 super(); 3524 this.resource = resource; 3525 } 3526 3527 /** 3528 * @return {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) 3529 */ 3530 public Reference getResource() { 3531 if (this.resource == null) 3532 if (Configuration.errorOnAutoCreate()) 3533 throw new Error("Attempt to auto-create TestScriptRuleComponent.resource"); 3534 else if (Configuration.doAutoCreate()) 3535 this.resource = new Reference(); // cc 3536 return this.resource; 3537 } 3538 3539 public boolean hasResource() { 3540 return this.resource != null && !this.resource.isEmpty(); 3541 } 3542 3543 /** 3544 * @param value {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) 3545 */ 3546 public TestScriptRuleComponent setResource(Reference value) { 3547 this.resource = value; 3548 return this; 3549 } 3550 3551 /** 3552 * @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).) 3553 */ 3554 public Resource getResourceTarget() { 3555 return this.resourceTarget; 3556 } 3557 3558 /** 3559 * @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).) 3560 */ 3561 public TestScriptRuleComponent setResourceTarget(Resource value) { 3562 this.resourceTarget = value; 3563 return this; 3564 } 3565 3566 /** 3567 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 3568 */ 3569 public List<RuleParamComponent> getParam() { 3570 if (this.param == null) 3571 this.param = new ArrayList<RuleParamComponent>(); 3572 return this.param; 3573 } 3574 3575 /** 3576 * @return Returns a reference to <code>this</code> for easy method chaining 3577 */ 3578 public TestScriptRuleComponent setParam(List<RuleParamComponent> theParam) { 3579 this.param = theParam; 3580 return this; 3581 } 3582 3583 public boolean hasParam() { 3584 if (this.param == null) 3585 return false; 3586 for (RuleParamComponent item : this.param) 3587 if (!item.isEmpty()) 3588 return true; 3589 return false; 3590 } 3591 3592 public RuleParamComponent addParam() { //3 3593 RuleParamComponent t = new RuleParamComponent(); 3594 if (this.param == null) 3595 this.param = new ArrayList<RuleParamComponent>(); 3596 this.param.add(t); 3597 return t; 3598 } 3599 3600 public TestScriptRuleComponent addParam(RuleParamComponent t) { //3 3601 if (t == null) 3602 return this; 3603 if (this.param == null) 3604 this.param = new ArrayList<RuleParamComponent>(); 3605 this.param.add(t); 3606 return this; 3607 } 3608 3609 /** 3610 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 3611 */ 3612 public RuleParamComponent getParamFirstRep() { 3613 if (getParam().isEmpty()) { 3614 addParam(); 3615 } 3616 return getParam().get(0); 3617 } 3618 3619 protected void listChildren(List<Property> children) { 3620 super.listChildren(children); 3621 children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, 1, resource)); 3622 children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 3623 } 3624 3625 @Override 3626 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3627 switch (_hash) { 3628 case -341064690: /*resource*/ return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, 1, resource); 3629 case 106436749: /*param*/ return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param); 3630 default: return super.getNamedProperty(_hash, _name, _checkValid); 3631 } 3632 3633 } 3634 3635 @Override 3636 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3637 switch (hash) { 3638 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 3639 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RuleParamComponent 3640 default: return super.getProperty(hash, name, checkValid); 3641 } 3642 3643 } 3644 3645 @Override 3646 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3647 switch (hash) { 3648 case -341064690: // resource 3649 this.resource = castToReference(value); // Reference 3650 return value; 3651 case 106436749: // param 3652 this.getParam().add((RuleParamComponent) value); // RuleParamComponent 3653 return value; 3654 default: return super.setProperty(hash, name, value); 3655 } 3656 3657 } 3658 3659 @Override 3660 public Base setProperty(String name, Base value) throws FHIRException { 3661 if (name.equals("resource")) { 3662 this.resource = castToReference(value); // Reference 3663 } else if (name.equals("param")) { 3664 this.getParam().add((RuleParamComponent) value); 3665 } else 3666 return super.setProperty(name, value); 3667 return value; 3668 } 3669 3670 @Override 3671 public Base makeProperty(int hash, String name) throws FHIRException { 3672 switch (hash) { 3673 case -341064690: return getResource(); 3674 case 106436749: return addParam(); 3675 default: return super.makeProperty(hash, name); 3676 } 3677 3678 } 3679 3680 @Override 3681 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3682 switch (hash) { 3683 case -341064690: /*resource*/ return new String[] {"Reference"}; 3684 case 106436749: /*param*/ return new String[] {}; 3685 default: return super.getTypesForProperty(hash, name); 3686 } 3687 3688 } 3689 3690 @Override 3691 public Base addChild(String name) throws FHIRException { 3692 if (name.equals("resource")) { 3693 this.resource = new Reference(); 3694 return this.resource; 3695 } 3696 else if (name.equals("param")) { 3697 return addParam(); 3698 } 3699 else 3700 return super.addChild(name); 3701 } 3702 3703 public TestScriptRuleComponent copy() { 3704 TestScriptRuleComponent dst = new TestScriptRuleComponent(); 3705 copyValues(dst); 3706 dst.resource = resource == null ? null : resource.copy(); 3707 if (param != null) { 3708 dst.param = new ArrayList<RuleParamComponent>(); 3709 for (RuleParamComponent i : param) 3710 dst.param.add(i.copy()); 3711 }; 3712 return dst; 3713 } 3714 3715 @Override 3716 public boolean equalsDeep(Base other_) { 3717 if (!super.equalsDeep(other_)) 3718 return false; 3719 if (!(other_ instanceof TestScriptRuleComponent)) 3720 return false; 3721 TestScriptRuleComponent o = (TestScriptRuleComponent) other_; 3722 return compareDeep(resource, o.resource, true) && compareDeep(param, o.param, true); 3723 } 3724 3725 @Override 3726 public boolean equalsShallow(Base other_) { 3727 if (!super.equalsShallow(other_)) 3728 return false; 3729 if (!(other_ instanceof TestScriptRuleComponent)) 3730 return false; 3731 TestScriptRuleComponent o = (TestScriptRuleComponent) other_; 3732 return true; 3733 } 3734 3735 public boolean isEmpty() { 3736 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, param); 3737 } 3738 3739 public String fhirType() { 3740 return "TestScript.rule"; 3741 3742 } 3743 3744 } 3745 3746 @Block() 3747 public static class RuleParamComponent extends BackboneElement implements IBaseBackboneElement { 3748 /** 3749 * Descriptive name for this parameter that matches the external assert rule parameter name. 3750 */ 3751 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3752 @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) 3753 protected StringType name; 3754 3755 /** 3756 * The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3757 */ 3758 @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3759 @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." ) 3760 protected StringType value; 3761 3762 private static final long serialVersionUID = 395259392L; 3763 3764 /** 3765 * Constructor 3766 */ 3767 public RuleParamComponent() { 3768 super(); 3769 } 3770 3771 /** 3772 * Constructor 3773 */ 3774 public RuleParamComponent(StringType name) { 3775 super(); 3776 this.name = name; 3777 } 3778 3779 /** 3780 * @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 3781 */ 3782 public StringType getNameElement() { 3783 if (this.name == null) 3784 if (Configuration.errorOnAutoCreate()) 3785 throw new Error("Attempt to auto-create RuleParamComponent.name"); 3786 else if (Configuration.doAutoCreate()) 3787 this.name = new StringType(); // bb 3788 return this.name; 3789 } 3790 3791 public boolean hasNameElement() { 3792 return this.name != null && !this.name.isEmpty(); 3793 } 3794 3795 public boolean hasName() { 3796 return this.name != null && !this.name.isEmpty(); 3797 } 3798 3799 /** 3800 * @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 3801 */ 3802 public RuleParamComponent setNameElement(StringType value) { 3803 this.name = value; 3804 return this; 3805 } 3806 3807 /** 3808 * @return Descriptive name for this parameter that matches the external assert rule parameter name. 3809 */ 3810 public String getName() { 3811 return this.name == null ? null : this.name.getValue(); 3812 } 3813 3814 /** 3815 * @param value Descriptive name for this parameter that matches the external assert rule parameter name. 3816 */ 3817 public RuleParamComponent setName(String value) { 3818 if (this.name == null) 3819 this.name = new StringType(); 3820 this.name.setValue(value); 3821 return this; 3822 } 3823 3824 /** 3825 * @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 3826 */ 3827 public StringType getValueElement() { 3828 if (this.value == null) 3829 if (Configuration.errorOnAutoCreate()) 3830 throw new Error("Attempt to auto-create RuleParamComponent.value"); 3831 else if (Configuration.doAutoCreate()) 3832 this.value = new StringType(); // bb 3833 return this.value; 3834 } 3835 3836 public boolean hasValueElement() { 3837 return this.value != null && !this.value.isEmpty(); 3838 } 3839 3840 public boolean hasValue() { 3841 return this.value != null && !this.value.isEmpty(); 3842 } 3843 3844 /** 3845 * @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 3846 */ 3847 public RuleParamComponent setValueElement(StringType value) { 3848 this.value = value; 3849 return this; 3850 } 3851 3852 /** 3853 * @return The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3854 */ 3855 public String getValue() { 3856 return this.value == null ? null : this.value.getValue(); 3857 } 3858 3859 /** 3860 * @param value The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3861 */ 3862 public RuleParamComponent setValue(String value) { 3863 if (Utilities.noString(value)) 3864 this.value = null; 3865 else { 3866 if (this.value == null) 3867 this.value = new StringType(); 3868 this.value.setValue(value); 3869 } 3870 return this; 3871 } 3872 3873 protected void listChildren(List<Property> children) { 3874 super.listChildren(children); 3875 children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name)); 3876 children.add(new Property("value", "string", "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", 0, 1, value)); 3877 } 3878 3879 @Override 3880 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3881 switch (_hash) { 3882 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name); 3883 case 111972721: /*value*/ return new Property("value", "string", "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", 0, 1, value); 3884 default: return super.getNamedProperty(_hash, _name, _checkValid); 3885 } 3886 3887 } 3888 3889 @Override 3890 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3891 switch (hash) { 3892 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3893 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 3894 default: return super.getProperty(hash, name, checkValid); 3895 } 3896 3897 } 3898 3899 @Override 3900 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3901 switch (hash) { 3902 case 3373707: // name 3903 this.name = castToString(value); // StringType 3904 return value; 3905 case 111972721: // value 3906 this.value = castToString(value); // StringType 3907 return value; 3908 default: return super.setProperty(hash, name, value); 3909 } 3910 3911 } 3912 3913 @Override 3914 public Base setProperty(String name, Base value) throws FHIRException { 3915 if (name.equals("name")) { 3916 this.name = castToString(value); // StringType 3917 } else if (name.equals("value")) { 3918 this.value = castToString(value); // StringType 3919 } else 3920 return super.setProperty(name, value); 3921 return value; 3922 } 3923 3924 @Override 3925 public Base makeProperty(int hash, String name) throws FHIRException { 3926 switch (hash) { 3927 case 3373707: return getNameElement(); 3928 case 111972721: return getValueElement(); 3929 default: return super.makeProperty(hash, name); 3930 } 3931 3932 } 3933 3934 @Override 3935 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3936 switch (hash) { 3937 case 3373707: /*name*/ return new String[] {"string"}; 3938 case 111972721: /*value*/ return new String[] {"string"}; 3939 default: return super.getTypesForProperty(hash, name); 3940 } 3941 3942 } 3943 3944 @Override 3945 public Base addChild(String name) throws FHIRException { 3946 if (name.equals("name")) { 3947 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3948 } 3949 else if (name.equals("value")) { 3950 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 3951 } 3952 else 3953 return super.addChild(name); 3954 } 3955 3956 public RuleParamComponent copy() { 3957 RuleParamComponent dst = new RuleParamComponent(); 3958 copyValues(dst); 3959 dst.name = name == null ? null : name.copy(); 3960 dst.value = value == null ? null : value.copy(); 3961 return dst; 3962 } 3963 3964 @Override 3965 public boolean equalsDeep(Base other_) { 3966 if (!super.equalsDeep(other_)) 3967 return false; 3968 if (!(other_ instanceof RuleParamComponent)) 3969 return false; 3970 RuleParamComponent o = (RuleParamComponent) other_; 3971 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 3972 } 3973 3974 @Override 3975 public boolean equalsShallow(Base other_) { 3976 if (!super.equalsShallow(other_)) 3977 return false; 3978 if (!(other_ instanceof RuleParamComponent)) 3979 return false; 3980 RuleParamComponent o = (RuleParamComponent) other_; 3981 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 3982 } 3983 3984 public boolean isEmpty() { 3985 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 3986 } 3987 3988 public String fhirType() { 3989 return "TestScript.rule.param"; 3990 3991 } 3992 3993 } 3994 3995 @Block() 3996 public static class TestScriptRulesetComponent extends BackboneElement implements IBaseBackboneElement { 3997 /** 3998 * Reference to the resource (containing the contents of the ruleset needed for assertions). 3999 */ 4000 @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 4001 @Description(shortDefinition="Assert ruleset resource reference", formalDefinition="Reference to the resource (containing the contents of the ruleset needed for assertions)." ) 4002 protected Reference resource; 4003 4004 /** 4005 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the ruleset needed for assertions).) 4006 */ 4007 protected Resource resourceTarget; 4008 4009 /** 4010 * The referenced rule within the external ruleset template. 4011 */ 4012 @Child(name = "rule", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4013 @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." ) 4014 protected List<RulesetRuleComponent> rule; 4015 4016 private static final long serialVersionUID = 1260261423L; 4017 4018 /** 4019 * Constructor 4020 */ 4021 public TestScriptRulesetComponent() { 4022 super(); 4023 } 4024 4025 /** 4026 * Constructor 4027 */ 4028 public TestScriptRulesetComponent(Reference resource) { 4029 super(); 4030 this.resource = resource; 4031 } 4032 4033 /** 4034 * @return {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) 4035 */ 4036 public Reference getResource() { 4037 if (this.resource == null) 4038 if (Configuration.errorOnAutoCreate()) 4039 throw new Error("Attempt to auto-create TestScriptRulesetComponent.resource"); 4040 else if (Configuration.doAutoCreate()) 4041 this.resource = new Reference(); // cc 4042 return this.resource; 4043 } 4044 4045 public boolean hasResource() { 4046 return this.resource != null && !this.resource.isEmpty(); 4047 } 4048 4049 /** 4050 * @param value {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) 4051 */ 4052 public TestScriptRulesetComponent setResource(Reference value) { 4053 this.resource = value; 4054 return this; 4055 } 4056 4057 /** 4058 * @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).) 4059 */ 4060 public Resource getResourceTarget() { 4061 return this.resourceTarget; 4062 } 4063 4064 /** 4065 * @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).) 4066 */ 4067 public TestScriptRulesetComponent setResourceTarget(Resource value) { 4068 this.resourceTarget = value; 4069 return this; 4070 } 4071 4072 /** 4073 * @return {@link #rule} (The referenced rule within the external ruleset template.) 4074 */ 4075 public List<RulesetRuleComponent> getRule() { 4076 if (this.rule == null) 4077 this.rule = new ArrayList<RulesetRuleComponent>(); 4078 return this.rule; 4079 } 4080 4081 /** 4082 * @return Returns a reference to <code>this</code> for easy method chaining 4083 */ 4084 public TestScriptRulesetComponent setRule(List<RulesetRuleComponent> theRule) { 4085 this.rule = theRule; 4086 return this; 4087 } 4088 4089 public boolean hasRule() { 4090 if (this.rule == null) 4091 return false; 4092 for (RulesetRuleComponent item : this.rule) 4093 if (!item.isEmpty()) 4094 return true; 4095 return false; 4096 } 4097 4098 public RulesetRuleComponent addRule() { //3 4099 RulesetRuleComponent t = new RulesetRuleComponent(); 4100 if (this.rule == null) 4101 this.rule = new ArrayList<RulesetRuleComponent>(); 4102 this.rule.add(t); 4103 return t; 4104 } 4105 4106 public TestScriptRulesetComponent addRule(RulesetRuleComponent t) { //3 4107 if (t == null) 4108 return this; 4109 if (this.rule == null) 4110 this.rule = new ArrayList<RulesetRuleComponent>(); 4111 this.rule.add(t); 4112 return this; 4113 } 4114 4115 /** 4116 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 4117 */ 4118 public RulesetRuleComponent getRuleFirstRep() { 4119 if (getRule().isEmpty()) { 4120 addRule(); 4121 } 4122 return getRule().get(0); 4123 } 4124 4125 protected void listChildren(List<Property> children) { 4126 super.listChildren(children); 4127 children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, 1, resource)); 4128 children.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); 4129 } 4130 4131 @Override 4132 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4133 switch (_hash) { 4134 case -341064690: /*resource*/ return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, 1, resource); 4135 case 3512060: /*rule*/ return new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule); 4136 default: return super.getNamedProperty(_hash, _name, _checkValid); 4137 } 4138 4139 } 4140 4141 @Override 4142 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4143 switch (hash) { 4144 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 4145 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // RulesetRuleComponent 4146 default: return super.getProperty(hash, name, checkValid); 4147 } 4148 4149 } 4150 4151 @Override 4152 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4153 switch (hash) { 4154 case -341064690: // resource 4155 this.resource = castToReference(value); // Reference 4156 return value; 4157 case 3512060: // rule 4158 this.getRule().add((RulesetRuleComponent) value); // RulesetRuleComponent 4159 return value; 4160 default: return super.setProperty(hash, name, value); 4161 } 4162 4163 } 4164 4165 @Override 4166 public Base setProperty(String name, Base value) throws FHIRException { 4167 if (name.equals("resource")) { 4168 this.resource = castToReference(value); // Reference 4169 } else if (name.equals("rule")) { 4170 this.getRule().add((RulesetRuleComponent) value); 4171 } else 4172 return super.setProperty(name, value); 4173 return value; 4174 } 4175 4176 @Override 4177 public Base makeProperty(int hash, String name) throws FHIRException { 4178 switch (hash) { 4179 case -341064690: return getResource(); 4180 case 3512060: return addRule(); 4181 default: return super.makeProperty(hash, name); 4182 } 4183 4184 } 4185 4186 @Override 4187 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4188 switch (hash) { 4189 case -341064690: /*resource*/ return new String[] {"Reference"}; 4190 case 3512060: /*rule*/ return new String[] {}; 4191 default: return super.getTypesForProperty(hash, name); 4192 } 4193 4194 } 4195 4196 @Override 4197 public Base addChild(String name) throws FHIRException { 4198 if (name.equals("resource")) { 4199 this.resource = new Reference(); 4200 return this.resource; 4201 } 4202 else if (name.equals("rule")) { 4203 return addRule(); 4204 } 4205 else 4206 return super.addChild(name); 4207 } 4208 4209 public TestScriptRulesetComponent copy() { 4210 TestScriptRulesetComponent dst = new TestScriptRulesetComponent(); 4211 copyValues(dst); 4212 dst.resource = resource == null ? null : resource.copy(); 4213 if (rule != null) { 4214 dst.rule = new ArrayList<RulesetRuleComponent>(); 4215 for (RulesetRuleComponent i : rule) 4216 dst.rule.add(i.copy()); 4217 }; 4218 return dst; 4219 } 4220 4221 @Override 4222 public boolean equalsDeep(Base other_) { 4223 if (!super.equalsDeep(other_)) 4224 return false; 4225 if (!(other_ instanceof TestScriptRulesetComponent)) 4226 return false; 4227 TestScriptRulesetComponent o = (TestScriptRulesetComponent) other_; 4228 return compareDeep(resource, o.resource, true) && compareDeep(rule, o.rule, true); 4229 } 4230 4231 @Override 4232 public boolean equalsShallow(Base other_) { 4233 if (!super.equalsShallow(other_)) 4234 return false; 4235 if (!(other_ instanceof TestScriptRulesetComponent)) 4236 return false; 4237 TestScriptRulesetComponent o = (TestScriptRulesetComponent) other_; 4238 return true; 4239 } 4240 4241 public boolean isEmpty() { 4242 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, rule); 4243 } 4244 4245 public String fhirType() { 4246 return "TestScript.ruleset"; 4247 4248 } 4249 4250 } 4251 4252 @Block() 4253 public static class RulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { 4254 /** 4255 * Id of the referenced rule within the external ruleset template. 4256 */ 4257 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4258 @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) 4259 protected IdType ruleId; 4260 4261 /** 4262 * Each rule template can take one or more parameters for rule evaluation. 4263 */ 4264 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4265 @Description(shortDefinition="Ruleset rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 4266 protected List<RulesetRuleParamComponent> param; 4267 4268 private static final long serialVersionUID = -1399866981L; 4269 4270 /** 4271 * Constructor 4272 */ 4273 public RulesetRuleComponent() { 4274 super(); 4275 } 4276 4277 /** 4278 * Constructor 4279 */ 4280 public RulesetRuleComponent(IdType ruleId) { 4281 super(); 4282 this.ruleId = ruleId; 4283 } 4284 4285 /** 4286 * @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 4287 */ 4288 public IdType getRuleIdElement() { 4289 if (this.ruleId == null) 4290 if (Configuration.errorOnAutoCreate()) 4291 throw new Error("Attempt to auto-create RulesetRuleComponent.ruleId"); 4292 else if (Configuration.doAutoCreate()) 4293 this.ruleId = new IdType(); // bb 4294 return this.ruleId; 4295 } 4296 4297 public boolean hasRuleIdElement() { 4298 return this.ruleId != null && !this.ruleId.isEmpty(); 4299 } 4300 4301 public boolean hasRuleId() { 4302 return this.ruleId != null && !this.ruleId.isEmpty(); 4303 } 4304 4305 /** 4306 * @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 4307 */ 4308 public RulesetRuleComponent setRuleIdElement(IdType value) { 4309 this.ruleId = value; 4310 return this; 4311 } 4312 4313 /** 4314 * @return Id of the referenced rule within the external ruleset template. 4315 */ 4316 public String getRuleId() { 4317 return this.ruleId == null ? null : this.ruleId.getValue(); 4318 } 4319 4320 /** 4321 * @param value Id of the referenced rule within the external ruleset template. 4322 */ 4323 public RulesetRuleComponent setRuleId(String value) { 4324 if (this.ruleId == null) 4325 this.ruleId = new IdType(); 4326 this.ruleId.setValue(value); 4327 return this; 4328 } 4329 4330 /** 4331 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 4332 */ 4333 public List<RulesetRuleParamComponent> getParam() { 4334 if (this.param == null) 4335 this.param = new ArrayList<RulesetRuleParamComponent>(); 4336 return this.param; 4337 } 4338 4339 /** 4340 * @return Returns a reference to <code>this</code> for easy method chaining 4341 */ 4342 public RulesetRuleComponent setParam(List<RulesetRuleParamComponent> theParam) { 4343 this.param = theParam; 4344 return this; 4345 } 4346 4347 public boolean hasParam() { 4348 if (this.param == null) 4349 return false; 4350 for (RulesetRuleParamComponent item : this.param) 4351 if (!item.isEmpty()) 4352 return true; 4353 return false; 4354 } 4355 4356 public RulesetRuleParamComponent addParam() { //3 4357 RulesetRuleParamComponent t = new RulesetRuleParamComponent(); 4358 if (this.param == null) 4359 this.param = new ArrayList<RulesetRuleParamComponent>(); 4360 this.param.add(t); 4361 return t; 4362 } 4363 4364 public RulesetRuleComponent addParam(RulesetRuleParamComponent t) { //3 4365 if (t == null) 4366 return this; 4367 if (this.param == null) 4368 this.param = new ArrayList<RulesetRuleParamComponent>(); 4369 this.param.add(t); 4370 return this; 4371 } 4372 4373 /** 4374 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 4375 */ 4376 public RulesetRuleParamComponent getParamFirstRep() { 4377 if (getParam().isEmpty()) { 4378 addParam(); 4379 } 4380 return getParam().get(0); 4381 } 4382 4383 protected void listChildren(List<Property> children) { 4384 super.listChildren(children); 4385 children.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId)); 4386 children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 4387 } 4388 4389 @Override 4390 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4391 switch (_hash) { 4392 case -919875273: /*ruleId*/ return new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId); 4393 case 106436749: /*param*/ return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param); 4394 default: return super.getNamedProperty(_hash, _name, _checkValid); 4395 } 4396 4397 } 4398 4399 @Override 4400 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4401 switch (hash) { 4402 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 4403 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RulesetRuleParamComponent 4404 default: return super.getProperty(hash, name, checkValid); 4405 } 4406 4407 } 4408 4409 @Override 4410 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4411 switch (hash) { 4412 case -919875273: // ruleId 4413 this.ruleId = castToId(value); // IdType 4414 return value; 4415 case 106436749: // param 4416 this.getParam().add((RulesetRuleParamComponent) value); // RulesetRuleParamComponent 4417 return value; 4418 default: return super.setProperty(hash, name, value); 4419 } 4420 4421 } 4422 4423 @Override 4424 public Base setProperty(String name, Base value) throws FHIRException { 4425 if (name.equals("ruleId")) { 4426 this.ruleId = castToId(value); // IdType 4427 } else if (name.equals("param")) { 4428 this.getParam().add((RulesetRuleParamComponent) value); 4429 } else 4430 return super.setProperty(name, value); 4431 return value; 4432 } 4433 4434 @Override 4435 public Base makeProperty(int hash, String name) throws FHIRException { 4436 switch (hash) { 4437 case -919875273: return getRuleIdElement(); 4438 case 106436749: return addParam(); 4439 default: return super.makeProperty(hash, name); 4440 } 4441 4442 } 4443 4444 @Override 4445 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4446 switch (hash) { 4447 case -919875273: /*ruleId*/ return new String[] {"id"}; 4448 case 106436749: /*param*/ return new String[] {}; 4449 default: return super.getTypesForProperty(hash, name); 4450 } 4451 4452 } 4453 4454 @Override 4455 public Base addChild(String name) throws FHIRException { 4456 if (name.equals("ruleId")) { 4457 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 4458 } 4459 else if (name.equals("param")) { 4460 return addParam(); 4461 } 4462 else 4463 return super.addChild(name); 4464 } 4465 4466 public RulesetRuleComponent copy() { 4467 RulesetRuleComponent dst = new RulesetRuleComponent(); 4468 copyValues(dst); 4469 dst.ruleId = ruleId == null ? null : ruleId.copy(); 4470 if (param != null) { 4471 dst.param = new ArrayList<RulesetRuleParamComponent>(); 4472 for (RulesetRuleParamComponent i : param) 4473 dst.param.add(i.copy()); 4474 }; 4475 return dst; 4476 } 4477 4478 @Override 4479 public boolean equalsDeep(Base other_) { 4480 if (!super.equalsDeep(other_)) 4481 return false; 4482 if (!(other_ instanceof RulesetRuleComponent)) 4483 return false; 4484 RulesetRuleComponent o = (RulesetRuleComponent) other_; 4485 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 4486 } 4487 4488 @Override 4489 public boolean equalsShallow(Base other_) { 4490 if (!super.equalsShallow(other_)) 4491 return false; 4492 if (!(other_ instanceof RulesetRuleComponent)) 4493 return false; 4494 RulesetRuleComponent o = (RulesetRuleComponent) other_; 4495 return compareValues(ruleId, o.ruleId, true); 4496 } 4497 4498 public boolean isEmpty() { 4499 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 4500 } 4501 4502 public String fhirType() { 4503 return "TestScript.ruleset.rule"; 4504 4505 } 4506 4507 } 4508 4509 @Block() 4510 public static class RulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 4511 /** 4512 * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4513 */ 4514 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4515 @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." ) 4516 protected StringType name; 4517 4518 /** 4519 * The value for the parameter that will be passed on to the external ruleset rule template. 4520 */ 4521 @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4522 @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." ) 4523 protected StringType value; 4524 4525 private static final long serialVersionUID = 395259392L; 4526 4527 /** 4528 * Constructor 4529 */ 4530 public RulesetRuleParamComponent() { 4531 super(); 4532 } 4533 4534 /** 4535 * Constructor 4536 */ 4537 public RulesetRuleParamComponent(StringType name) { 4538 super(); 4539 this.name = name; 4540 } 4541 4542 /** 4543 * @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 4544 */ 4545 public StringType getNameElement() { 4546 if (this.name == null) 4547 if (Configuration.errorOnAutoCreate()) 4548 throw new Error("Attempt to auto-create RulesetRuleParamComponent.name"); 4549 else if (Configuration.doAutoCreate()) 4550 this.name = new StringType(); // bb 4551 return this.name; 4552 } 4553 4554 public boolean hasNameElement() { 4555 return this.name != null && !this.name.isEmpty(); 4556 } 4557 4558 public boolean hasName() { 4559 return this.name != null && !this.name.isEmpty(); 4560 } 4561 4562 /** 4563 * @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 4564 */ 4565 public RulesetRuleParamComponent setNameElement(StringType value) { 4566 this.name = value; 4567 return this; 4568 } 4569 4570 /** 4571 * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4572 */ 4573 public String getName() { 4574 return this.name == null ? null : this.name.getValue(); 4575 } 4576 4577 /** 4578 * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4579 */ 4580 public RulesetRuleParamComponent setName(String value) { 4581 if (this.name == null) 4582 this.name = new StringType(); 4583 this.name.setValue(value); 4584 return this; 4585 } 4586 4587 /** 4588 * @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 4589 */ 4590 public StringType getValueElement() { 4591 if (this.value == null) 4592 if (Configuration.errorOnAutoCreate()) 4593 throw new Error("Attempt to auto-create RulesetRuleParamComponent.value"); 4594 else if (Configuration.doAutoCreate()) 4595 this.value = new StringType(); // bb 4596 return this.value; 4597 } 4598 4599 public boolean hasValueElement() { 4600 return this.value != null && !this.value.isEmpty(); 4601 } 4602 4603 public boolean hasValue() { 4604 return this.value != null && !this.value.isEmpty(); 4605 } 4606 4607 /** 4608 * @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 4609 */ 4610 public RulesetRuleParamComponent setValueElement(StringType value) { 4611 this.value = value; 4612 return this; 4613 } 4614 4615 /** 4616 * @return The value for the parameter that will be passed on to the external ruleset rule template. 4617 */ 4618 public String getValue() { 4619 return this.value == null ? null : this.value.getValue(); 4620 } 4621 4622 /** 4623 * @param value The value for the parameter that will be passed on to the external ruleset rule template. 4624 */ 4625 public RulesetRuleParamComponent setValue(String value) { 4626 if (Utilities.noString(value)) 4627 this.value = null; 4628 else { 4629 if (this.value == null) 4630 this.value = new StringType(); 4631 this.value.setValue(value); 4632 } 4633 return this; 4634 } 4635 4636 protected void listChildren(List<Property> children) { 4637 super.listChildren(children); 4638 children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name)); 4639 children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value)); 4640 } 4641 4642 @Override 4643 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4644 switch (_hash) { 4645 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name); 4646 case 111972721: /*value*/ return new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value); 4647 default: return super.getNamedProperty(_hash, _name, _checkValid); 4648 } 4649 4650 } 4651 4652 @Override 4653 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4654 switch (hash) { 4655 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 4656 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 4657 default: return super.getProperty(hash, name, checkValid); 4658 } 4659 4660 } 4661 4662 @Override 4663 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4664 switch (hash) { 4665 case 3373707: // name 4666 this.name = castToString(value); // StringType 4667 return value; 4668 case 111972721: // value 4669 this.value = castToString(value); // StringType 4670 return value; 4671 default: return super.setProperty(hash, name, value); 4672 } 4673 4674 } 4675 4676 @Override 4677 public Base setProperty(String name, Base value) throws FHIRException { 4678 if (name.equals("name")) { 4679 this.name = castToString(value); // StringType 4680 } else if (name.equals("value")) { 4681 this.value = castToString(value); // StringType 4682 } else 4683 return super.setProperty(name, value); 4684 return value; 4685 } 4686 4687 @Override 4688 public Base makeProperty(int hash, String name) throws FHIRException { 4689 switch (hash) { 4690 case 3373707: return getNameElement(); 4691 case 111972721: return getValueElement(); 4692 default: return super.makeProperty(hash, name); 4693 } 4694 4695 } 4696 4697 @Override 4698 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4699 switch (hash) { 4700 case 3373707: /*name*/ return new String[] {"string"}; 4701 case 111972721: /*value*/ return new String[] {"string"}; 4702 default: return super.getTypesForProperty(hash, name); 4703 } 4704 4705 } 4706 4707 @Override 4708 public Base addChild(String name) throws FHIRException { 4709 if (name.equals("name")) { 4710 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 4711 } 4712 else if (name.equals("value")) { 4713 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 4714 } 4715 else 4716 return super.addChild(name); 4717 } 4718 4719 public RulesetRuleParamComponent copy() { 4720 RulesetRuleParamComponent dst = new RulesetRuleParamComponent(); 4721 copyValues(dst); 4722 dst.name = name == null ? null : name.copy(); 4723 dst.value = value == null ? null : value.copy(); 4724 return dst; 4725 } 4726 4727 @Override 4728 public boolean equalsDeep(Base other_) { 4729 if (!super.equalsDeep(other_)) 4730 return false; 4731 if (!(other_ instanceof RulesetRuleParamComponent)) 4732 return false; 4733 RulesetRuleParamComponent o = (RulesetRuleParamComponent) other_; 4734 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 4735 } 4736 4737 @Override 4738 public boolean equalsShallow(Base other_) { 4739 if (!super.equalsShallow(other_)) 4740 return false; 4741 if (!(other_ instanceof RulesetRuleParamComponent)) 4742 return false; 4743 RulesetRuleParamComponent o = (RulesetRuleParamComponent) other_; 4744 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 4745 } 4746 4747 public boolean isEmpty() { 4748 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 4749 } 4750 4751 public String fhirType() { 4752 return "TestScript.ruleset.rule.param"; 4753 4754 } 4755 4756 } 4757 4758 @Block() 4759 public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement { 4760 /** 4761 * Action would contain either an operation or an assertion. 4762 */ 4763 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4764 @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 4765 protected List<SetupActionComponent> action; 4766 4767 private static final long serialVersionUID = -123374486L; 4768 4769 /** 4770 * Constructor 4771 */ 4772 public TestScriptSetupComponent() { 4773 super(); 4774 } 4775 4776 /** 4777 * @return {@link #action} (Action would contain either an operation or an assertion.) 4778 */ 4779 public List<SetupActionComponent> getAction() { 4780 if (this.action == null) 4781 this.action = new ArrayList<SetupActionComponent>(); 4782 return this.action; 4783 } 4784 4785 /** 4786 * @return Returns a reference to <code>this</code> for easy method chaining 4787 */ 4788 public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) { 4789 this.action = theAction; 4790 return this; 4791 } 4792 4793 public boolean hasAction() { 4794 if (this.action == null) 4795 return false; 4796 for (SetupActionComponent item : this.action) 4797 if (!item.isEmpty()) 4798 return true; 4799 return false; 4800 } 4801 4802 public SetupActionComponent addAction() { //3 4803 SetupActionComponent t = new SetupActionComponent(); 4804 if (this.action == null) 4805 this.action = new ArrayList<SetupActionComponent>(); 4806 this.action.add(t); 4807 return t; 4808 } 4809 4810 public TestScriptSetupComponent addAction(SetupActionComponent t) { //3 4811 if (t == null) 4812 return this; 4813 if (this.action == null) 4814 this.action = new ArrayList<SetupActionComponent>(); 4815 this.action.add(t); 4816 return this; 4817 } 4818 4819 /** 4820 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 4821 */ 4822 public SetupActionComponent getActionFirstRep() { 4823 if (getAction().isEmpty()) { 4824 addAction(); 4825 } 4826 return getAction().get(0); 4827 } 4828 4829 protected void listChildren(List<Property> children) { 4830 super.listChildren(children); 4831 children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 4832 } 4833 4834 @Override 4835 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4836 switch (_hash) { 4837 case -1422950858: /*action*/ return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action); 4838 default: return super.getNamedProperty(_hash, _name, _checkValid); 4839 } 4840 4841 } 4842 4843 @Override 4844 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4845 switch (hash) { 4846 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent 4847 default: return super.getProperty(hash, name, checkValid); 4848 } 4849 4850 } 4851 4852 @Override 4853 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4854 switch (hash) { 4855 case -1422950858: // action 4856 this.getAction().add((SetupActionComponent) value); // SetupActionComponent 4857 return value; 4858 default: return super.setProperty(hash, name, value); 4859 } 4860 4861 } 4862 4863 @Override 4864 public Base setProperty(String name, Base value) throws FHIRException { 4865 if (name.equals("action")) { 4866 this.getAction().add((SetupActionComponent) value); 4867 } else 4868 return super.setProperty(name, value); 4869 return value; 4870 } 4871 4872 @Override 4873 public Base makeProperty(int hash, String name) throws FHIRException { 4874 switch (hash) { 4875 case -1422950858: return addAction(); 4876 default: return super.makeProperty(hash, name); 4877 } 4878 4879 } 4880 4881 @Override 4882 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4883 switch (hash) { 4884 case -1422950858: /*action*/ return new String[] {}; 4885 default: return super.getTypesForProperty(hash, name); 4886 } 4887 4888 } 4889 4890 @Override 4891 public Base addChild(String name) throws FHIRException { 4892 if (name.equals("action")) { 4893 return addAction(); 4894 } 4895 else 4896 return super.addChild(name); 4897 } 4898 4899 public TestScriptSetupComponent copy() { 4900 TestScriptSetupComponent dst = new TestScriptSetupComponent(); 4901 copyValues(dst); 4902 if (action != null) { 4903 dst.action = new ArrayList<SetupActionComponent>(); 4904 for (SetupActionComponent i : action) 4905 dst.action.add(i.copy()); 4906 }; 4907 return dst; 4908 } 4909 4910 @Override 4911 public boolean equalsDeep(Base other_) { 4912 if (!super.equalsDeep(other_)) 4913 return false; 4914 if (!(other_ instanceof TestScriptSetupComponent)) 4915 return false; 4916 TestScriptSetupComponent o = (TestScriptSetupComponent) other_; 4917 return compareDeep(action, o.action, true); 4918 } 4919 4920 @Override 4921 public boolean equalsShallow(Base other_) { 4922 if (!super.equalsShallow(other_)) 4923 return false; 4924 if (!(other_ instanceof TestScriptSetupComponent)) 4925 return false; 4926 TestScriptSetupComponent o = (TestScriptSetupComponent) other_; 4927 return true; 4928 } 4929 4930 public boolean isEmpty() { 4931 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action); 4932 } 4933 4934 public String fhirType() { 4935 return "TestScript.setup"; 4936 4937 } 4938 4939 } 4940 4941 @Block() 4942 public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement { 4943 /** 4944 * The operation to perform. 4945 */ 4946 @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false) 4947 @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." ) 4948 protected SetupActionOperationComponent operation; 4949 4950 /** 4951 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 4952 */ 4953 @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false) 4954 @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 4955 protected SetupActionAssertComponent assert_; 4956 4957 private static final long serialVersionUID = -252088305L; 4958 4959 /** 4960 * Constructor 4961 */ 4962 public SetupActionComponent() { 4963 super(); 4964 } 4965 4966 /** 4967 * @return {@link #operation} (The operation to perform.) 4968 */ 4969 public SetupActionOperationComponent getOperation() { 4970 if (this.operation == null) 4971 if (Configuration.errorOnAutoCreate()) 4972 throw new Error("Attempt to auto-create SetupActionComponent.operation"); 4973 else if (Configuration.doAutoCreate()) 4974 this.operation = new SetupActionOperationComponent(); // cc 4975 return this.operation; 4976 } 4977 4978 public boolean hasOperation() { 4979 return this.operation != null && !this.operation.isEmpty(); 4980 } 4981 4982 /** 4983 * @param value {@link #operation} (The operation to perform.) 4984 */ 4985 public SetupActionComponent setOperation(SetupActionOperationComponent value) { 4986 this.operation = value; 4987 return this; 4988 } 4989 4990 /** 4991 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 4992 */ 4993 public SetupActionAssertComponent getAssert() { 4994 if (this.assert_ == null) 4995 if (Configuration.errorOnAutoCreate()) 4996 throw new Error("Attempt to auto-create SetupActionComponent.assert_"); 4997 else if (Configuration.doAutoCreate()) 4998 this.assert_ = new SetupActionAssertComponent(); // cc 4999 return this.assert_; 5000 } 5001 5002 public boolean hasAssert() { 5003 return this.assert_ != null && !this.assert_.isEmpty(); 5004 } 5005 5006 /** 5007 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 5008 */ 5009 public SetupActionComponent setAssert(SetupActionAssertComponent value) { 5010 this.assert_ = value; 5011 return this; 5012 } 5013 5014 protected void listChildren(List<Property> children) { 5015 super.listChildren(children); 5016 children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation)); 5017 children.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_)); 5018 } 5019 5020 @Override 5021 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5022 switch (_hash) { 5023 case 1662702951: /*operation*/ return new Property("operation", "", "The operation to perform.", 0, 1, operation); 5024 case -1408208058: /*assert*/ return new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_); 5025 default: return super.getNamedProperty(_hash, _name, _checkValid); 5026 } 5027 5028 } 5029 5030 @Override 5031 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5032 switch (hash) { 5033 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 5034 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 5035 default: return super.getProperty(hash, name, checkValid); 5036 } 5037 5038 } 5039 5040 @Override 5041 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5042 switch (hash) { 5043 case 1662702951: // operation 5044 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 5045 return value; 5046 case -1408208058: // assert 5047 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 5048 return value; 5049 default: return super.setProperty(hash, name, value); 5050 } 5051 5052 } 5053 5054 @Override 5055 public Base setProperty(String name, Base value) throws FHIRException { 5056 if (name.equals("operation")) { 5057 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 5058 } else if (name.equals("assert")) { 5059 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 5060 } else 5061 return super.setProperty(name, value); 5062 return value; 5063 } 5064 5065 @Override 5066 public Base makeProperty(int hash, String name) throws FHIRException { 5067 switch (hash) { 5068 case 1662702951: return getOperation(); 5069 case -1408208058: return getAssert(); 5070 default: return super.makeProperty(hash, name); 5071 } 5072 5073 } 5074 5075 @Override 5076 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5077 switch (hash) { 5078 case 1662702951: /*operation*/ return new String[] {}; 5079 case -1408208058: /*assert*/ return new String[] {}; 5080 default: return super.getTypesForProperty(hash, name); 5081 } 5082 5083 } 5084 5085 @Override 5086 public Base addChild(String name) throws FHIRException { 5087 if (name.equals("operation")) { 5088 this.operation = new SetupActionOperationComponent(); 5089 return this.operation; 5090 } 5091 else if (name.equals("assert")) { 5092 this.assert_ = new SetupActionAssertComponent(); 5093 return this.assert_; 5094 } 5095 else 5096 return super.addChild(name); 5097 } 5098 5099 public SetupActionComponent copy() { 5100 SetupActionComponent dst = new SetupActionComponent(); 5101 copyValues(dst); 5102 dst.operation = operation == null ? null : operation.copy(); 5103 dst.assert_ = assert_ == null ? null : assert_.copy(); 5104 return dst; 5105 } 5106 5107 @Override 5108 public boolean equalsDeep(Base other_) { 5109 if (!super.equalsDeep(other_)) 5110 return false; 5111 if (!(other_ instanceof SetupActionComponent)) 5112 return false; 5113 SetupActionComponent o = (SetupActionComponent) other_; 5114 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 5115 } 5116 5117 @Override 5118 public boolean equalsShallow(Base other_) { 5119 if (!super.equalsShallow(other_)) 5120 return false; 5121 if (!(other_ instanceof SetupActionComponent)) 5122 return false; 5123 SetupActionComponent o = (SetupActionComponent) other_; 5124 return true; 5125 } 5126 5127 public boolean isEmpty() { 5128 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_); 5129 } 5130 5131 public String fhirType() { 5132 return "TestScript.setup.action"; 5133 5134 } 5135 5136 } 5137 5138 @Block() 5139 public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement { 5140 /** 5141 * Server interaction or operation type. 5142 */ 5143 @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false) 5144 @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." ) 5145 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-operation-codes") 5146 protected Coding type; 5147 5148 /** 5149 * The type of the resource. See http://build.fhir.org/resourcelist.html. 5150 */ 5151 @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5152 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://build.fhir.org/resourcelist.html." ) 5153 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 5154 protected CodeType resource; 5155 5156 /** 5157 * The label would be used for tracking/logging purposes by test engines. 5158 */ 5159 @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5160 @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 5161 protected StringType label; 5162 5163 /** 5164 * The description would be used by test engines for tracking and reporting purposes. 5165 */ 5166 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 5167 @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 5168 protected StringType description; 5169 5170 /** 5171 * The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5172 */ 5173 @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 5174 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Accept' header." ) 5175 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 5176 protected Enumeration<ContentType> accept; 5177 5178 /** 5179 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5180 */ 5181 @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 5182 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 5183 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 5184 protected Enumeration<ContentType> contentType; 5185 5186 /** 5187 * The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5188 */ 5189 @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5190 @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." ) 5191 protected IntegerType destination; 5192 5193 /** 5194 * 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. 5195 */ 5196 @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) 5197 @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." ) 5198 protected BooleanType encodeRequestUrl; 5199 5200 /** 5201 * The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5202 */ 5203 @Child(name = "origin", type = {IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false) 5204 @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." ) 5205 protected IntegerType origin; 5206 5207 /** 5208 * Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5209 */ 5210 @Child(name = "params", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 5211 @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type]. Used to set parts of the request URL explicitly." ) 5212 protected StringType params; 5213 5214 /** 5215 * Header elements would be used to set HTTP headers. 5216 */ 5217 @Child(name = "requestHeader", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5218 @Description(shortDefinition="Each operation can have one or more header elements", formalDefinition="Header elements would be used to set HTTP headers." ) 5219 protected List<SetupActionOperationRequestHeaderComponent> requestHeader; 5220 5221 /** 5222 * The fixture id (maybe new) to map to the request. 5223 */ 5224 @Child(name = "requestId", type = {IdType.class}, order=12, min=0, max=1, modifier=false, summary=false) 5225 @Description(shortDefinition="Fixture Id of mapped request", formalDefinition="The fixture id (maybe new) to map to the request." ) 5226 protected IdType requestId; 5227 5228 /** 5229 * The fixture id (maybe new) to map to the response. 5230 */ 5231 @Child(name = "responseId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false) 5232 @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." ) 5233 protected IdType responseId; 5234 5235 /** 5236 * The id of the fixture used as the body of a PUT or POST request. 5237 */ 5238 @Child(name = "sourceId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false) 5239 @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." ) 5240 protected IdType sourceId; 5241 5242 /** 5243 * Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5244 */ 5245 @Child(name = "targetId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false) 5246 @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." ) 5247 protected IdType targetId; 5248 5249 /** 5250 * Complete request URL. 5251 */ 5252 @Child(name = "url", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false) 5253 @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." ) 5254 protected StringType url; 5255 5256 private static final long serialVersionUID = -488909648L; 5257 5258 /** 5259 * Constructor 5260 */ 5261 public SetupActionOperationComponent() { 5262 super(); 5263 } 5264 5265 /** 5266 * @return {@link #type} (Server interaction or operation type.) 5267 */ 5268 public Coding getType() { 5269 if (this.type == null) 5270 if (Configuration.errorOnAutoCreate()) 5271 throw new Error("Attempt to auto-create SetupActionOperationComponent.type"); 5272 else if (Configuration.doAutoCreate()) 5273 this.type = new Coding(); // cc 5274 return this.type; 5275 } 5276 5277 public boolean hasType() { 5278 return this.type != null && !this.type.isEmpty(); 5279 } 5280 5281 /** 5282 * @param value {@link #type} (Server interaction or operation type.) 5283 */ 5284 public SetupActionOperationComponent setType(Coding value) { 5285 this.type = value; 5286 return this; 5287 } 5288 5289 /** 5290 * @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 5291 */ 5292 public CodeType getResourceElement() { 5293 if (this.resource == null) 5294 if (Configuration.errorOnAutoCreate()) 5295 throw new Error("Attempt to auto-create SetupActionOperationComponent.resource"); 5296 else if (Configuration.doAutoCreate()) 5297 this.resource = new CodeType(); // bb 5298 return this.resource; 5299 } 5300 5301 public boolean hasResourceElement() { 5302 return this.resource != null && !this.resource.isEmpty(); 5303 } 5304 5305 public boolean hasResource() { 5306 return this.resource != null && !this.resource.isEmpty(); 5307 } 5308 5309 /** 5310 * @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 5311 */ 5312 public SetupActionOperationComponent setResourceElement(CodeType value) { 5313 this.resource = value; 5314 return this; 5315 } 5316 5317 /** 5318 * @return The type of the resource. See http://build.fhir.org/resourcelist.html. 5319 */ 5320 public String getResource() { 5321 return this.resource == null ? null : this.resource.getValue(); 5322 } 5323 5324 /** 5325 * @param value The type of the resource. See http://build.fhir.org/resourcelist.html. 5326 */ 5327 public SetupActionOperationComponent setResource(String value) { 5328 if (Utilities.noString(value)) 5329 this.resource = null; 5330 else { 5331 if (this.resource == null) 5332 this.resource = new CodeType(); 5333 this.resource.setValue(value); 5334 } 5335 return this; 5336 } 5337 5338 /** 5339 * @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 5340 */ 5341 public StringType getLabelElement() { 5342 if (this.label == null) 5343 if (Configuration.errorOnAutoCreate()) 5344 throw new Error("Attempt to auto-create SetupActionOperationComponent.label"); 5345 else if (Configuration.doAutoCreate()) 5346 this.label = new StringType(); // bb 5347 return this.label; 5348 } 5349 5350 public boolean hasLabelElement() { 5351 return this.label != null && !this.label.isEmpty(); 5352 } 5353 5354 public boolean hasLabel() { 5355 return this.label != null && !this.label.isEmpty(); 5356 } 5357 5358 /** 5359 * @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 5360 */ 5361 public SetupActionOperationComponent setLabelElement(StringType value) { 5362 this.label = value; 5363 return this; 5364 } 5365 5366 /** 5367 * @return The label would be used for tracking/logging purposes by test engines. 5368 */ 5369 public String getLabel() { 5370 return this.label == null ? null : this.label.getValue(); 5371 } 5372 5373 /** 5374 * @param value The label would be used for tracking/logging purposes by test engines. 5375 */ 5376 public SetupActionOperationComponent setLabel(String value) { 5377 if (Utilities.noString(value)) 5378 this.label = null; 5379 else { 5380 if (this.label == null) 5381 this.label = new StringType(); 5382 this.label.setValue(value); 5383 } 5384 return this; 5385 } 5386 5387 /** 5388 * @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 5389 */ 5390 public StringType getDescriptionElement() { 5391 if (this.description == null) 5392 if (Configuration.errorOnAutoCreate()) 5393 throw new Error("Attempt to auto-create SetupActionOperationComponent.description"); 5394 else if (Configuration.doAutoCreate()) 5395 this.description = new StringType(); // bb 5396 return this.description; 5397 } 5398 5399 public boolean hasDescriptionElement() { 5400 return this.description != null && !this.description.isEmpty(); 5401 } 5402 5403 public boolean hasDescription() { 5404 return this.description != null && !this.description.isEmpty(); 5405 } 5406 5407 /** 5408 * @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 5409 */ 5410 public SetupActionOperationComponent setDescriptionElement(StringType value) { 5411 this.description = value; 5412 return this; 5413 } 5414 5415 /** 5416 * @return The description would be used by test engines for tracking and reporting purposes. 5417 */ 5418 public String getDescription() { 5419 return this.description == null ? null : this.description.getValue(); 5420 } 5421 5422 /** 5423 * @param value The description would be used by test engines for tracking and reporting purposes. 5424 */ 5425 public SetupActionOperationComponent setDescription(String value) { 5426 if (Utilities.noString(value)) 5427 this.description = null; 5428 else { 5429 if (this.description == null) 5430 this.description = new StringType(); 5431 this.description.setValue(value); 5432 } 5433 return this; 5434 } 5435 5436 /** 5437 * @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 5438 */ 5439 public Enumeration<ContentType> getAcceptElement() { 5440 if (this.accept == null) 5441 if (Configuration.errorOnAutoCreate()) 5442 throw new Error("Attempt to auto-create SetupActionOperationComponent.accept"); 5443 else if (Configuration.doAutoCreate()) 5444 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 5445 return this.accept; 5446 } 5447 5448 public boolean hasAcceptElement() { 5449 return this.accept != null && !this.accept.isEmpty(); 5450 } 5451 5452 public boolean hasAccept() { 5453 return this.accept != null && !this.accept.isEmpty(); 5454 } 5455 5456 /** 5457 * @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 5458 */ 5459 public SetupActionOperationComponent setAcceptElement(Enumeration<ContentType> value) { 5460 this.accept = value; 5461 return this; 5462 } 5463 5464 /** 5465 * @return The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5466 */ 5467 public ContentType getAccept() { 5468 return this.accept == null ? null : this.accept.getValue(); 5469 } 5470 5471 /** 5472 * @param value The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5473 */ 5474 public SetupActionOperationComponent setAccept(ContentType value) { 5475 if (value == null) 5476 this.accept = null; 5477 else { 5478 if (this.accept == null) 5479 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 5480 this.accept.setValue(value); 5481 } 5482 return this; 5483 } 5484 5485 /** 5486 * @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 5487 */ 5488 public Enumeration<ContentType> getContentTypeElement() { 5489 if (this.contentType == null) 5490 if (Configuration.errorOnAutoCreate()) 5491 throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType"); 5492 else if (Configuration.doAutoCreate()) 5493 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 5494 return this.contentType; 5495 } 5496 5497 public boolean hasContentTypeElement() { 5498 return this.contentType != null && !this.contentType.isEmpty(); 5499 } 5500 5501 public boolean hasContentType() { 5502 return this.contentType != null && !this.contentType.isEmpty(); 5503 } 5504 5505 /** 5506 * @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 5507 */ 5508 public SetupActionOperationComponent setContentTypeElement(Enumeration<ContentType> value) { 5509 this.contentType = value; 5510 return this; 5511 } 5512 5513 /** 5514 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5515 */ 5516 public ContentType getContentType() { 5517 return this.contentType == null ? null : this.contentType.getValue(); 5518 } 5519 5520 /** 5521 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5522 */ 5523 public SetupActionOperationComponent setContentType(ContentType value) { 5524 if (value == null) 5525 this.contentType = null; 5526 else { 5527 if (this.contentType == null) 5528 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 5529 this.contentType.setValue(value); 5530 } 5531 return this; 5532 } 5533 5534 /** 5535 * @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 5536 */ 5537 public IntegerType getDestinationElement() { 5538 if (this.destination == null) 5539 if (Configuration.errorOnAutoCreate()) 5540 throw new Error("Attempt to auto-create SetupActionOperationComponent.destination"); 5541 else if (Configuration.doAutoCreate()) 5542 this.destination = new IntegerType(); // bb 5543 return this.destination; 5544 } 5545 5546 public boolean hasDestinationElement() { 5547 return this.destination != null && !this.destination.isEmpty(); 5548 } 5549 5550 public boolean hasDestination() { 5551 return this.destination != null && !this.destination.isEmpty(); 5552 } 5553 5554 /** 5555 * @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 5556 */ 5557 public SetupActionOperationComponent setDestinationElement(IntegerType value) { 5558 this.destination = value; 5559 return this; 5560 } 5561 5562 /** 5563 * @return The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5564 */ 5565 public int getDestination() { 5566 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 5567 } 5568 5569 /** 5570 * @param value The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5571 */ 5572 public SetupActionOperationComponent setDestination(int value) { 5573 if (this.destination == null) 5574 this.destination = new IntegerType(); 5575 this.destination.setValue(value); 5576 return this; 5577 } 5578 5579 /** 5580 * @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 5581 */ 5582 public BooleanType getEncodeRequestUrlElement() { 5583 if (this.encodeRequestUrl == null) 5584 if (Configuration.errorOnAutoCreate()) 5585 throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl"); 5586 else if (Configuration.doAutoCreate()) 5587 this.encodeRequestUrl = new BooleanType(); // bb 5588 return this.encodeRequestUrl; 5589 } 5590 5591 public boolean hasEncodeRequestUrlElement() { 5592 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 5593 } 5594 5595 public boolean hasEncodeRequestUrl() { 5596 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 5597 } 5598 5599 /** 5600 * @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 5601 */ 5602 public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 5603 this.encodeRequestUrl = value; 5604 return this; 5605 } 5606 5607 /** 5608 * @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. 5609 */ 5610 public boolean getEncodeRequestUrl() { 5611 return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue(); 5612 } 5613 5614 /** 5615 * @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. 5616 */ 5617 public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 5618 if (this.encodeRequestUrl == null) 5619 this.encodeRequestUrl = new BooleanType(); 5620 this.encodeRequestUrl.setValue(value); 5621 return this; 5622 } 5623 5624 /** 5625 * @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 5626 */ 5627 public IntegerType getOriginElement() { 5628 if (this.origin == null) 5629 if (Configuration.errorOnAutoCreate()) 5630 throw new Error("Attempt to auto-create SetupActionOperationComponent.origin"); 5631 else if (Configuration.doAutoCreate()) 5632 this.origin = new IntegerType(); // bb 5633 return this.origin; 5634 } 5635 5636 public boolean hasOriginElement() { 5637 return this.origin != null && !this.origin.isEmpty(); 5638 } 5639 5640 public boolean hasOrigin() { 5641 return this.origin != null && !this.origin.isEmpty(); 5642 } 5643 5644 /** 5645 * @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 5646 */ 5647 public SetupActionOperationComponent setOriginElement(IntegerType value) { 5648 this.origin = value; 5649 return this; 5650 } 5651 5652 /** 5653 * @return The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5654 */ 5655 public int getOrigin() { 5656 return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue(); 5657 } 5658 5659 /** 5660 * @param value The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5661 */ 5662 public SetupActionOperationComponent setOrigin(int value) { 5663 if (this.origin == null) 5664 this.origin = new IntegerType(); 5665 this.origin.setValue(value); 5666 return this; 5667 } 5668 5669 /** 5670 * @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 5671 */ 5672 public StringType getParamsElement() { 5673 if (this.params == null) 5674 if (Configuration.errorOnAutoCreate()) 5675 throw new Error("Attempt to auto-create SetupActionOperationComponent.params"); 5676 else if (Configuration.doAutoCreate()) 5677 this.params = new StringType(); // bb 5678 return this.params; 5679 } 5680 5681 public boolean hasParamsElement() { 5682 return this.params != null && !this.params.isEmpty(); 5683 } 5684 5685 public boolean hasParams() { 5686 return this.params != null && !this.params.isEmpty(); 5687 } 5688 5689 /** 5690 * @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 5691 */ 5692 public SetupActionOperationComponent setParamsElement(StringType value) { 5693 this.params = value; 5694 return this; 5695 } 5696 5697 /** 5698 * @return Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5699 */ 5700 public String getParams() { 5701 return this.params == null ? null : this.params.getValue(); 5702 } 5703 5704 /** 5705 * @param value Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5706 */ 5707 public SetupActionOperationComponent setParams(String value) { 5708 if (Utilities.noString(value)) 5709 this.params = null; 5710 else { 5711 if (this.params == null) 5712 this.params = new StringType(); 5713 this.params.setValue(value); 5714 } 5715 return this; 5716 } 5717 5718 /** 5719 * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) 5720 */ 5721 public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 5722 if (this.requestHeader == null) 5723 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5724 return this.requestHeader; 5725 } 5726 5727 /** 5728 * @return Returns a reference to <code>this</code> for easy method chaining 5729 */ 5730 public SetupActionOperationComponent setRequestHeader(List<SetupActionOperationRequestHeaderComponent> theRequestHeader) { 5731 this.requestHeader = theRequestHeader; 5732 return this; 5733 } 5734 5735 public boolean hasRequestHeader() { 5736 if (this.requestHeader == null) 5737 return false; 5738 for (SetupActionOperationRequestHeaderComponent item : this.requestHeader) 5739 if (!item.isEmpty()) 5740 return true; 5741 return false; 5742 } 5743 5744 public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3 5745 SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent(); 5746 if (this.requestHeader == null) 5747 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5748 this.requestHeader.add(t); 5749 return t; 5750 } 5751 5752 public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3 5753 if (t == null) 5754 return this; 5755 if (this.requestHeader == null) 5756 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5757 this.requestHeader.add(t); 5758 return this; 5759 } 5760 5761 /** 5762 * @return The first repetition of repeating field {@link #requestHeader}, creating it if it does not already exist 5763 */ 5764 public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() { 5765 if (getRequestHeader().isEmpty()) { 5766 addRequestHeader(); 5767 } 5768 return getRequestHeader().get(0); 5769 } 5770 5771 /** 5772 * @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 5773 */ 5774 public IdType getRequestIdElement() { 5775 if (this.requestId == null) 5776 if (Configuration.errorOnAutoCreate()) 5777 throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId"); 5778 else if (Configuration.doAutoCreate()) 5779 this.requestId = new IdType(); // bb 5780 return this.requestId; 5781 } 5782 5783 public boolean hasRequestIdElement() { 5784 return this.requestId != null && !this.requestId.isEmpty(); 5785 } 5786 5787 public boolean hasRequestId() { 5788 return this.requestId != null && !this.requestId.isEmpty(); 5789 } 5790 5791 /** 5792 * @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 5793 */ 5794 public SetupActionOperationComponent setRequestIdElement(IdType value) { 5795 this.requestId = value; 5796 return this; 5797 } 5798 5799 /** 5800 * @return The fixture id (maybe new) to map to the request. 5801 */ 5802 public String getRequestId() { 5803 return this.requestId == null ? null : this.requestId.getValue(); 5804 } 5805 5806 /** 5807 * @param value The fixture id (maybe new) to map to the request. 5808 */ 5809 public SetupActionOperationComponent setRequestId(String value) { 5810 if (Utilities.noString(value)) 5811 this.requestId = null; 5812 else { 5813 if (this.requestId == null) 5814 this.requestId = new IdType(); 5815 this.requestId.setValue(value); 5816 } 5817 return this; 5818 } 5819 5820 /** 5821 * @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 5822 */ 5823 public IdType getResponseIdElement() { 5824 if (this.responseId == null) 5825 if (Configuration.errorOnAutoCreate()) 5826 throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId"); 5827 else if (Configuration.doAutoCreate()) 5828 this.responseId = new IdType(); // bb 5829 return this.responseId; 5830 } 5831 5832 public boolean hasResponseIdElement() { 5833 return this.responseId != null && !this.responseId.isEmpty(); 5834 } 5835 5836 public boolean hasResponseId() { 5837 return this.responseId != null && !this.responseId.isEmpty(); 5838 } 5839 5840 /** 5841 * @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 5842 */ 5843 public SetupActionOperationComponent setResponseIdElement(IdType value) { 5844 this.responseId = value; 5845 return this; 5846 } 5847 5848 /** 5849 * @return The fixture id (maybe new) to map to the response. 5850 */ 5851 public String getResponseId() { 5852 return this.responseId == null ? null : this.responseId.getValue(); 5853 } 5854 5855 /** 5856 * @param value The fixture id (maybe new) to map to the response. 5857 */ 5858 public SetupActionOperationComponent setResponseId(String value) { 5859 if (Utilities.noString(value)) 5860 this.responseId = null; 5861 else { 5862 if (this.responseId == null) 5863 this.responseId = new IdType(); 5864 this.responseId.setValue(value); 5865 } 5866 return this; 5867 } 5868 5869 /** 5870 * @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 5871 */ 5872 public IdType getSourceIdElement() { 5873 if (this.sourceId == null) 5874 if (Configuration.errorOnAutoCreate()) 5875 throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId"); 5876 else if (Configuration.doAutoCreate()) 5877 this.sourceId = new IdType(); // bb 5878 return this.sourceId; 5879 } 5880 5881 public boolean hasSourceIdElement() { 5882 return this.sourceId != null && !this.sourceId.isEmpty(); 5883 } 5884 5885 public boolean hasSourceId() { 5886 return this.sourceId != null && !this.sourceId.isEmpty(); 5887 } 5888 5889 /** 5890 * @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 5891 */ 5892 public SetupActionOperationComponent setSourceIdElement(IdType value) { 5893 this.sourceId = value; 5894 return this; 5895 } 5896 5897 /** 5898 * @return The id of the fixture used as the body of a PUT or POST request. 5899 */ 5900 public String getSourceId() { 5901 return this.sourceId == null ? null : this.sourceId.getValue(); 5902 } 5903 5904 /** 5905 * @param value The id of the fixture used as the body of a PUT or POST request. 5906 */ 5907 public SetupActionOperationComponent setSourceId(String value) { 5908 if (Utilities.noString(value)) 5909 this.sourceId = null; 5910 else { 5911 if (this.sourceId == null) 5912 this.sourceId = new IdType(); 5913 this.sourceId.setValue(value); 5914 } 5915 return this; 5916 } 5917 5918 /** 5919 * @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 5920 */ 5921 public IdType getTargetIdElement() { 5922 if (this.targetId == null) 5923 if (Configuration.errorOnAutoCreate()) 5924 throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId"); 5925 else if (Configuration.doAutoCreate()) 5926 this.targetId = new IdType(); // bb 5927 return this.targetId; 5928 } 5929 5930 public boolean hasTargetIdElement() { 5931 return this.targetId != null && !this.targetId.isEmpty(); 5932 } 5933 5934 public boolean hasTargetId() { 5935 return this.targetId != null && !this.targetId.isEmpty(); 5936 } 5937 5938 /** 5939 * @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 5940 */ 5941 public SetupActionOperationComponent setTargetIdElement(IdType value) { 5942 this.targetId = value; 5943 return this; 5944 } 5945 5946 /** 5947 * @return Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5948 */ 5949 public String getTargetId() { 5950 return this.targetId == null ? null : this.targetId.getValue(); 5951 } 5952 5953 /** 5954 * @param value Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5955 */ 5956 public SetupActionOperationComponent setTargetId(String value) { 5957 if (Utilities.noString(value)) 5958 this.targetId = null; 5959 else { 5960 if (this.targetId == null) 5961 this.targetId = new IdType(); 5962 this.targetId.setValue(value); 5963 } 5964 return this; 5965 } 5966 5967 /** 5968 * @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 5969 */ 5970 public StringType getUrlElement() { 5971 if (this.url == null) 5972 if (Configuration.errorOnAutoCreate()) 5973 throw new Error("Attempt to auto-create SetupActionOperationComponent.url"); 5974 else if (Configuration.doAutoCreate()) 5975 this.url = new StringType(); // bb 5976 return this.url; 5977 } 5978 5979 public boolean hasUrlElement() { 5980 return this.url != null && !this.url.isEmpty(); 5981 } 5982 5983 public boolean hasUrl() { 5984 return this.url != null && !this.url.isEmpty(); 5985 } 5986 5987 /** 5988 * @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 5989 */ 5990 public SetupActionOperationComponent setUrlElement(StringType value) { 5991 this.url = value; 5992 return this; 5993 } 5994 5995 /** 5996 * @return Complete request URL. 5997 */ 5998 public String getUrl() { 5999 return this.url == null ? null : this.url.getValue(); 6000 } 6001 6002 /** 6003 * @param value Complete request URL. 6004 */ 6005 public SetupActionOperationComponent setUrl(String value) { 6006 if (Utilities.noString(value)) 6007 this.url = null; 6008 else { 6009 if (this.url == null) 6010 this.url = new StringType(); 6011 this.url.setValue(value); 6012 } 6013 return this; 6014 } 6015 6016 protected void listChildren(List<Property> children) { 6017 super.listChildren(children); 6018 children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type)); 6019 children.add(new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource)); 6020 children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label)); 6021 children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description)); 6022 children.add(new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept)); 6023 children.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType)); 6024 children.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, 1, destination)); 6025 children.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, 1, encodeRequestUrl)); 6026 children.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, 1, origin)); 6027 children.add(new Property("params", "string", "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", 0, 1, params)); 6028 children.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader)); 6029 children.add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId)); 6030 children.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId)); 6031 children.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId)); 6032 children.add(new Property("targetId", "id", "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", 0, 1, targetId)); 6033 children.add(new Property("url", "string", "Complete request URL.", 0, 1, url)); 6034 } 6035 6036 @Override 6037 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6038 switch (_hash) { 6039 case 3575610: /*type*/ return new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type); 6040 case -341064690: /*resource*/ return new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource); 6041 case 102727412: /*label*/ return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label); 6042 case -1724546052: /*description*/ return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description); 6043 case -1423461112: /*accept*/ return new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept); 6044 case -389131437: /*contentType*/ return new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType); 6045 case -1429847026: /*destination*/ return 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, 1, destination); 6046 case -1760554218: /*encodeRequestUrl*/ return 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, 1, encodeRequestUrl); 6047 case -1008619738: /*origin*/ return 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, 1, origin); 6048 case -995427962: /*params*/ return new Property("params", "string", "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", 0, 1, params); 6049 case 1074158076: /*requestHeader*/ return new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader); 6050 case 693933066: /*requestId*/ return new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId); 6051 case -633138884: /*responseId*/ return new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId); 6052 case 1746327190: /*sourceId*/ return new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId); 6053 case -441951604: /*targetId*/ return new Property("targetId", "id", "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", 0, 1, targetId); 6054 case 116079: /*url*/ return new Property("url", "string", "Complete request URL.", 0, 1, url); 6055 default: return super.getNamedProperty(_hash, _name, _checkValid); 6056 } 6057 6058 } 6059 6060 @Override 6061 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6062 switch (hash) { 6063 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 6064 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 6065 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 6066 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 6067 case -1423461112: /*accept*/ return this.accept == null ? new Base[0] : new Base[] {this.accept}; // Enumeration<ContentType> 6068 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType> 6069 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 6070 case -1760554218: /*encodeRequestUrl*/ return this.encodeRequestUrl == null ? new Base[0] : new Base[] {this.encodeRequestUrl}; // BooleanType 6071 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // IntegerType 6072 case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType 6073 case 1074158076: /*requestHeader*/ return this.requestHeader == null ? new Base[0] : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent 6074 case 693933066: /*requestId*/ return this.requestId == null ? new Base[0] : new Base[] {this.requestId}; // IdType 6075 case -633138884: /*responseId*/ return this.responseId == null ? new Base[0] : new Base[] {this.responseId}; // IdType 6076 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 6077 case -441951604: /*targetId*/ return this.targetId == null ? new Base[0] : new Base[] {this.targetId}; // IdType 6078 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // StringType 6079 default: return super.getProperty(hash, name, checkValid); 6080 } 6081 6082 } 6083 6084 @Override 6085 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6086 switch (hash) { 6087 case 3575610: // type 6088 this.type = castToCoding(value); // Coding 6089 return value; 6090 case -341064690: // resource 6091 this.resource = castToCode(value); // CodeType 6092 return value; 6093 case 102727412: // label 6094 this.label = castToString(value); // StringType 6095 return value; 6096 case -1724546052: // description 6097 this.description = castToString(value); // StringType 6098 return value; 6099 case -1423461112: // accept 6100 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 6101 this.accept = (Enumeration) value; // Enumeration<ContentType> 6102 return value; 6103 case -389131437: // contentType 6104 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 6105 this.contentType = (Enumeration) value; // Enumeration<ContentType> 6106 return value; 6107 case -1429847026: // destination 6108 this.destination = castToInteger(value); // IntegerType 6109 return value; 6110 case -1760554218: // encodeRequestUrl 6111 this.encodeRequestUrl = castToBoolean(value); // BooleanType 6112 return value; 6113 case -1008619738: // origin 6114 this.origin = castToInteger(value); // IntegerType 6115 return value; 6116 case -995427962: // params 6117 this.params = castToString(value); // StringType 6118 return value; 6119 case 1074158076: // requestHeader 6120 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent 6121 return value; 6122 case 693933066: // requestId 6123 this.requestId = castToId(value); // IdType 6124 return value; 6125 case -633138884: // responseId 6126 this.responseId = castToId(value); // IdType 6127 return value; 6128 case 1746327190: // sourceId 6129 this.sourceId = castToId(value); // IdType 6130 return value; 6131 case -441951604: // targetId 6132 this.targetId = castToId(value); // IdType 6133 return value; 6134 case 116079: // url 6135 this.url = castToString(value); // StringType 6136 return value; 6137 default: return super.setProperty(hash, name, value); 6138 } 6139 6140 } 6141 6142 @Override 6143 public Base setProperty(String name, Base value) throws FHIRException { 6144 if (name.equals("type")) { 6145 this.type = castToCoding(value); // Coding 6146 } else if (name.equals("resource")) { 6147 this.resource = castToCode(value); // CodeType 6148 } else if (name.equals("label")) { 6149 this.label = castToString(value); // StringType 6150 } else if (name.equals("description")) { 6151 this.description = castToString(value); // StringType 6152 } else if (name.equals("accept")) { 6153 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 6154 this.accept = (Enumeration) value; // Enumeration<ContentType> 6155 } else if (name.equals("contentType")) { 6156 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 6157 this.contentType = (Enumeration) value; // Enumeration<ContentType> 6158 } else if (name.equals("destination")) { 6159 this.destination = castToInteger(value); // IntegerType 6160 } else if (name.equals("encodeRequestUrl")) { 6161 this.encodeRequestUrl = castToBoolean(value); // BooleanType 6162 } else if (name.equals("origin")) { 6163 this.origin = castToInteger(value); // IntegerType 6164 } else if (name.equals("params")) { 6165 this.params = castToString(value); // StringType 6166 } else if (name.equals("requestHeader")) { 6167 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); 6168 } else if (name.equals("requestId")) { 6169 this.requestId = castToId(value); // IdType 6170 } else if (name.equals("responseId")) { 6171 this.responseId = castToId(value); // IdType 6172 } else if (name.equals("sourceId")) { 6173 this.sourceId = castToId(value); // IdType 6174 } else if (name.equals("targetId")) { 6175 this.targetId = castToId(value); // IdType 6176 } else if (name.equals("url")) { 6177 this.url = castToString(value); // StringType 6178 } else 6179 return super.setProperty(name, value); 6180 return value; 6181 } 6182 6183 @Override 6184 public Base makeProperty(int hash, String name) throws FHIRException { 6185 switch (hash) { 6186 case 3575610: return getType(); 6187 case -341064690: return getResourceElement(); 6188 case 102727412: return getLabelElement(); 6189 case -1724546052: return getDescriptionElement(); 6190 case -1423461112: return getAcceptElement(); 6191 case -389131437: return getContentTypeElement(); 6192 case -1429847026: return getDestinationElement(); 6193 case -1760554218: return getEncodeRequestUrlElement(); 6194 case -1008619738: return getOriginElement(); 6195 case -995427962: return getParamsElement(); 6196 case 1074158076: return addRequestHeader(); 6197 case 693933066: return getRequestIdElement(); 6198 case -633138884: return getResponseIdElement(); 6199 case 1746327190: return getSourceIdElement(); 6200 case -441951604: return getTargetIdElement(); 6201 case 116079: return getUrlElement(); 6202 default: return super.makeProperty(hash, name); 6203 } 6204 6205 } 6206 6207 @Override 6208 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6209 switch (hash) { 6210 case 3575610: /*type*/ return new String[] {"Coding"}; 6211 case -341064690: /*resource*/ return new String[] {"code"}; 6212 case 102727412: /*label*/ return new String[] {"string"}; 6213 case -1724546052: /*description*/ return new String[] {"string"}; 6214 case -1423461112: /*accept*/ return new String[] {"code"}; 6215 case -389131437: /*contentType*/ return new String[] {"code"}; 6216 case -1429847026: /*destination*/ return new String[] {"integer"}; 6217 case -1760554218: /*encodeRequestUrl*/ return new String[] {"boolean"}; 6218 case -1008619738: /*origin*/ return new String[] {"integer"}; 6219 case -995427962: /*params*/ return new String[] {"string"}; 6220 case 1074158076: /*requestHeader*/ return new String[] {}; 6221 case 693933066: /*requestId*/ return new String[] {"id"}; 6222 case -633138884: /*responseId*/ return new String[] {"id"}; 6223 case 1746327190: /*sourceId*/ return new String[] {"id"}; 6224 case -441951604: /*targetId*/ return new String[] {"id"}; 6225 case 116079: /*url*/ return new String[] {"string"}; 6226 default: return super.getTypesForProperty(hash, name); 6227 } 6228 6229 } 6230 6231 @Override 6232 public Base addChild(String name) throws FHIRException { 6233 if (name.equals("type")) { 6234 this.type = new Coding(); 6235 return this.type; 6236 } 6237 else if (name.equals("resource")) { 6238 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 6239 } 6240 else if (name.equals("label")) { 6241 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 6242 } 6243 else if (name.equals("description")) { 6244 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 6245 } 6246 else if (name.equals("accept")) { 6247 throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept"); 6248 } 6249 else if (name.equals("contentType")) { 6250 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 6251 } 6252 else if (name.equals("destination")) { 6253 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 6254 } 6255 else if (name.equals("encodeRequestUrl")) { 6256 throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl"); 6257 } 6258 else if (name.equals("origin")) { 6259 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 6260 } 6261 else if (name.equals("params")) { 6262 throw new FHIRException("Cannot call addChild on a primitive type TestScript.params"); 6263 } 6264 else if (name.equals("requestHeader")) { 6265 return addRequestHeader(); 6266 } 6267 else if (name.equals("requestId")) { 6268 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestId"); 6269 } 6270 else if (name.equals("responseId")) { 6271 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId"); 6272 } 6273 else if (name.equals("sourceId")) { 6274 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 6275 } 6276 else if (name.equals("targetId")) { 6277 throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId"); 6278 } 6279 else if (name.equals("url")) { 6280 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 6281 } 6282 else 6283 return super.addChild(name); 6284 } 6285 6286 public SetupActionOperationComponent copy() { 6287 SetupActionOperationComponent dst = new SetupActionOperationComponent(); 6288 copyValues(dst); 6289 dst.type = type == null ? null : type.copy(); 6290 dst.resource = resource == null ? null : resource.copy(); 6291 dst.label = label == null ? null : label.copy(); 6292 dst.description = description == null ? null : description.copy(); 6293 dst.accept = accept == null ? null : accept.copy(); 6294 dst.contentType = contentType == null ? null : contentType.copy(); 6295 dst.destination = destination == null ? null : destination.copy(); 6296 dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy(); 6297 dst.origin = origin == null ? null : origin.copy(); 6298 dst.params = params == null ? null : params.copy(); 6299 if (requestHeader != null) { 6300 dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 6301 for (SetupActionOperationRequestHeaderComponent i : requestHeader) 6302 dst.requestHeader.add(i.copy()); 6303 }; 6304 dst.requestId = requestId == null ? null : requestId.copy(); 6305 dst.responseId = responseId == null ? null : responseId.copy(); 6306 dst.sourceId = sourceId == null ? null : sourceId.copy(); 6307 dst.targetId = targetId == null ? null : targetId.copy(); 6308 dst.url = url == null ? null : url.copy(); 6309 return dst; 6310 } 6311 6312 @Override 6313 public boolean equalsDeep(Base other_) { 6314 if (!super.equalsDeep(other_)) 6315 return false; 6316 if (!(other_ instanceof SetupActionOperationComponent)) 6317 return false; 6318 SetupActionOperationComponent o = (SetupActionOperationComponent) other_; 6319 return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true) 6320 && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true) 6321 && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true) 6322 && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true) 6323 && compareDeep(requestId, o.requestId, true) && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true) 6324 && compareDeep(targetId, o.targetId, true) && compareDeep(url, o.url, true); 6325 } 6326 6327 @Override 6328 public boolean equalsShallow(Base other_) { 6329 if (!super.equalsShallow(other_)) 6330 return false; 6331 if (!(other_ instanceof SetupActionOperationComponent)) 6332 return false; 6333 SetupActionOperationComponent o = (SetupActionOperationComponent) other_; 6334 return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true) 6335 && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true) 6336 && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(origin, o.origin, true) 6337 && compareValues(params, o.params, true) && compareValues(requestId, o.requestId, true) && compareValues(responseId, o.responseId, true) 6338 && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true) && compareValues(url, o.url, true) 6339 ; 6340 } 6341 6342 public boolean isEmpty() { 6343 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description 6344 , accept, contentType, destination, encodeRequestUrl, origin, params, requestHeader 6345 , requestId, responseId, sourceId, targetId, url); 6346 } 6347 6348 public String fhirType() { 6349 return "TestScript.setup.action.operation"; 6350 6351 } 6352 6353 } 6354 6355 @Block() 6356 public static class SetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement { 6357 /** 6358 * The HTTP header field e.g. "Accept". 6359 */ 6360 @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 6361 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." ) 6362 protected StringType field; 6363 6364 /** 6365 * The value of the header e.g. "application/fhir+xml". 6366 */ 6367 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 6368 @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/fhir+xml\"." ) 6369 protected StringType value; 6370 6371 private static final long serialVersionUID = 274395337L; 6372 6373 /** 6374 * Constructor 6375 */ 6376 public SetupActionOperationRequestHeaderComponent() { 6377 super(); 6378 } 6379 6380 /** 6381 * Constructor 6382 */ 6383 public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) { 6384 super(); 6385 this.field = field; 6386 this.value = value; 6387 } 6388 6389 /** 6390 * @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 6391 */ 6392 public StringType getFieldElement() { 6393 if (this.field == null) 6394 if (Configuration.errorOnAutoCreate()) 6395 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field"); 6396 else if (Configuration.doAutoCreate()) 6397 this.field = new StringType(); // bb 6398 return this.field; 6399 } 6400 6401 public boolean hasFieldElement() { 6402 return this.field != null && !this.field.isEmpty(); 6403 } 6404 6405 public boolean hasField() { 6406 return this.field != null && !this.field.isEmpty(); 6407 } 6408 6409 /** 6410 * @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 6411 */ 6412 public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 6413 this.field = value; 6414 return this; 6415 } 6416 6417 /** 6418 * @return The HTTP header field e.g. "Accept". 6419 */ 6420 public String getField() { 6421 return this.field == null ? null : this.field.getValue(); 6422 } 6423 6424 /** 6425 * @param value The HTTP header field e.g. "Accept". 6426 */ 6427 public SetupActionOperationRequestHeaderComponent setField(String value) { 6428 if (this.field == null) 6429 this.field = new StringType(); 6430 this.field.setValue(value); 6431 return this; 6432 } 6433 6434 /** 6435 * @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 6436 */ 6437 public StringType getValueElement() { 6438 if (this.value == null) 6439 if (Configuration.errorOnAutoCreate()) 6440 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value"); 6441 else if (Configuration.doAutoCreate()) 6442 this.value = new StringType(); // bb 6443 return this.value; 6444 } 6445 6446 public boolean hasValueElement() { 6447 return this.value != null && !this.value.isEmpty(); 6448 } 6449 6450 public boolean hasValue() { 6451 return this.value != null && !this.value.isEmpty(); 6452 } 6453 6454 /** 6455 * @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 6456 */ 6457 public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 6458 this.value = value; 6459 return this; 6460 } 6461 6462 /** 6463 * @return The value of the header e.g. "application/fhir+xml". 6464 */ 6465 public String getValue() { 6466 return this.value == null ? null : this.value.getValue(); 6467 } 6468 6469 /** 6470 * @param value The value of the header e.g. "application/fhir+xml". 6471 */ 6472 public SetupActionOperationRequestHeaderComponent setValue(String value) { 6473 if (this.value == null) 6474 this.value = new StringType(); 6475 this.value.setValue(value); 6476 return this; 6477 } 6478 6479 protected void listChildren(List<Property> children) { 6480 super.listChildren(children); 6481 children.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field)); 6482 children.add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value)); 6483 } 6484 6485 @Override 6486 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6487 switch (_hash) { 6488 case 97427706: /*field*/ return new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field); 6489 case 111972721: /*value*/ return new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value); 6490 default: return super.getNamedProperty(_hash, _name, _checkValid); 6491 } 6492 6493 } 6494 6495 @Override 6496 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6497 switch (hash) { 6498 case 97427706: /*field*/ return this.field == null ? new Base[0] : new Base[] {this.field}; // StringType 6499 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 6500 default: return super.getProperty(hash, name, checkValid); 6501 } 6502 6503 } 6504 6505 @Override 6506 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6507 switch (hash) { 6508 case 97427706: // field 6509 this.field = castToString(value); // StringType 6510 return value; 6511 case 111972721: // value 6512 this.value = castToString(value); // StringType 6513 return value; 6514 default: return super.setProperty(hash, name, value); 6515 } 6516 6517 } 6518 6519 @Override 6520 public Base setProperty(String name, Base value) throws FHIRException { 6521 if (name.equals("field")) { 6522 this.field = castToString(value); // StringType 6523 } else if (name.equals("value")) { 6524 this.value = castToString(value); // StringType 6525 } else 6526 return super.setProperty(name, value); 6527 return value; 6528 } 6529 6530 @Override 6531 public Base makeProperty(int hash, String name) throws FHIRException { 6532 switch (hash) { 6533 case 97427706: return getFieldElement(); 6534 case 111972721: return getValueElement(); 6535 default: return super.makeProperty(hash, name); 6536 } 6537 6538 } 6539 6540 @Override 6541 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6542 switch (hash) { 6543 case 97427706: /*field*/ return new String[] {"string"}; 6544 case 111972721: /*value*/ return new String[] {"string"}; 6545 default: return super.getTypesForProperty(hash, name); 6546 } 6547 6548 } 6549 6550 @Override 6551 public Base addChild(String name) throws FHIRException { 6552 if (name.equals("field")) { 6553 throw new FHIRException("Cannot call addChild on a primitive type TestScript.field"); 6554 } 6555 else if (name.equals("value")) { 6556 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 6557 } 6558 else 6559 return super.addChild(name); 6560 } 6561 6562 public SetupActionOperationRequestHeaderComponent copy() { 6563 SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent(); 6564 copyValues(dst); 6565 dst.field = field == null ? null : field.copy(); 6566 dst.value = value == null ? null : value.copy(); 6567 return dst; 6568 } 6569 6570 @Override 6571 public boolean equalsDeep(Base other_) { 6572 if (!super.equalsDeep(other_)) 6573 return false; 6574 if (!(other_ instanceof SetupActionOperationRequestHeaderComponent)) 6575 return false; 6576 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_; 6577 return compareDeep(field, o.field, true) && compareDeep(value, o.value, true); 6578 } 6579 6580 @Override 6581 public boolean equalsShallow(Base other_) { 6582 if (!super.equalsShallow(other_)) 6583 return false; 6584 if (!(other_ instanceof SetupActionOperationRequestHeaderComponent)) 6585 return false; 6586 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_; 6587 return compareValues(field, o.field, true) && compareValues(value, o.value, true); 6588 } 6589 6590 public boolean isEmpty() { 6591 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value); 6592 } 6593 6594 public String fhirType() { 6595 return "TestScript.setup.action.operation.requestHeader"; 6596 6597 } 6598 6599 } 6600 6601 @Block() 6602 public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement { 6603 /** 6604 * The label would be used for tracking/logging purposes by test engines. 6605 */ 6606 @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 6607 @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 6608 protected StringType label; 6609 6610 /** 6611 * The description would be used by test engines for tracking and reporting purposes. 6612 */ 6613 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 6614 @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 6615 protected StringType description; 6616 6617 /** 6618 * The direction to use for the assertion. 6619 */ 6620 @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 6621 @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." ) 6622 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-direction-codes") 6623 protected Enumeration<AssertionDirectionType> direction; 6624 6625 /** 6626 * Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6627 */ 6628 @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 6629 @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." ) 6630 protected StringType compareToSourceId; 6631 6632 /** 6633 * The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6634 */ 6635 @Child(name = "compareToSourceExpression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 6636 @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." ) 6637 protected StringType compareToSourceExpression; 6638 6639 /** 6640 * XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6641 */ 6642 @Child(name = "compareToSourcePath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 6643 @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." ) 6644 protected StringType compareToSourcePath; 6645 6646 /** 6647 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 6648 */ 6649 @Child(name = "contentType", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 6650 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 6651 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 6652 protected Enumeration<ContentType> contentType; 6653 6654 /** 6655 * The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 6656 */ 6657 @Child(name = "expression", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 6658 @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." ) 6659 protected StringType expression; 6660 6661 /** 6662 * The HTTP header field name e.g. 'Location'. 6663 */ 6664 @Child(name = "headerField", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 6665 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." ) 6666 protected StringType headerField; 6667 6668 /** 6669 * The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 6670 */ 6671 @Child(name = "minimumId", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 6672 @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." ) 6673 protected StringType minimumId; 6674 6675 /** 6676 * Whether or not the test execution performs validation on the bundle navigation links. 6677 */ 6678 @Child(name = "navigationLinks", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false) 6679 @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." ) 6680 protected BooleanType navigationLinks; 6681 6682 /** 6683 * The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 6684 */ 6685 @Child(name = "operator", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) 6686 @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." ) 6687 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-operator-codes") 6688 protected Enumeration<AssertionOperatorType> operator; 6689 6690 /** 6691 * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 6692 */ 6693 @Child(name = "path", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) 6694 @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." ) 6695 protected StringType path; 6696 6697 /** 6698 * The request method or HTTP operation code to compare against that used by the client system under test. 6699 */ 6700 @Child(name = "requestMethod", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false) 6701 @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." ) 6702 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations") 6703 protected Enumeration<TestScriptRequestMethodCode> requestMethod; 6704 6705 /** 6706 * The value to use in a comparison against the request URL path string. 6707 */ 6708 @Child(name = "requestURL", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 6709 @Description(shortDefinition="Request URL comparison value", formalDefinition="The value to use in a comparison against the request URL path string." ) 6710 protected StringType requestURL; 6711 6712 /** 6713 * The type of the resource. See http://build.fhir.org/resourcelist.html. 6714 */ 6715 @Child(name = "resource", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false) 6716 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://build.fhir.org/resourcelist.html." ) 6717 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 6718 protected CodeType resource; 6719 6720 /** 6721 * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 6722 */ 6723 @Child(name = "response", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false) 6724 @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." ) 6725 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-response-code-types") 6726 protected Enumeration<AssertionResponseTypes> response; 6727 6728 /** 6729 * The value of the HTTP response code to be tested. 6730 */ 6731 @Child(name = "responseCode", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false) 6732 @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." ) 6733 protected StringType responseCode; 6734 6735 /** 6736 * The TestScript.rule this assert will evaluate. 6737 */ 6738 @Child(name = "rule", type = {}, order=19, min=0, max=1, modifier=false, summary=false) 6739 @Description(shortDefinition="The reference to a TestScript.rule", formalDefinition="The TestScript.rule this assert will evaluate." ) 6740 protected ActionAssertRuleComponent rule; 6741 6742 /** 6743 * The TestScript.ruleset this assert will evaluate. 6744 */ 6745 @Child(name = "ruleset", type = {}, order=20, min=0, max=1, modifier=false, summary=false) 6746 @Description(shortDefinition="The reference to a TestScript.ruleset", formalDefinition="The TestScript.ruleset this assert will evaluate." ) 6747 protected ActionAssertRulesetComponent ruleset; 6748 6749 /** 6750 * Fixture to evaluate the XPath/JSONPath expression or the headerField against. 6751 */ 6752 @Child(name = "sourceId", type = {IdType.class}, order=21, min=0, max=1, modifier=false, summary=false) 6753 @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against." ) 6754 protected IdType sourceId; 6755 6756 /** 6757 * The ID of the Profile to validate against. 6758 */ 6759 @Child(name = "validateProfileId", type = {IdType.class}, order=22, min=0, max=1, modifier=false, summary=false) 6760 @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." ) 6761 protected IdType validateProfileId; 6762 6763 /** 6764 * The value to compare to. 6765 */ 6766 @Child(name = "value", type = {StringType.class}, order=23, min=0, max=1, modifier=false, summary=false) 6767 @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." ) 6768 protected StringType value; 6769 6770 /** 6771 * Whether or not the test execution will produce a warning only on error for this assert. 6772 */ 6773 @Child(name = "warningOnly", type = {BooleanType.class}, order=24, min=0, max=1, modifier=false, summary=false) 6774 @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." ) 6775 protected BooleanType warningOnly; 6776 6777 private static final long serialVersionUID = 171718507L; 6778 6779 /** 6780 * Constructor 6781 */ 6782 public SetupActionAssertComponent() { 6783 super(); 6784 } 6785 6786 /** 6787 * @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 6788 */ 6789 public StringType getLabelElement() { 6790 if (this.label == null) 6791 if (Configuration.errorOnAutoCreate()) 6792 throw new Error("Attempt to auto-create SetupActionAssertComponent.label"); 6793 else if (Configuration.doAutoCreate()) 6794 this.label = new StringType(); // bb 6795 return this.label; 6796 } 6797 6798 public boolean hasLabelElement() { 6799 return this.label != null && !this.label.isEmpty(); 6800 } 6801 6802 public boolean hasLabel() { 6803 return this.label != null && !this.label.isEmpty(); 6804 } 6805 6806 /** 6807 * @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 6808 */ 6809 public SetupActionAssertComponent setLabelElement(StringType value) { 6810 this.label = value; 6811 return this; 6812 } 6813 6814 /** 6815 * @return The label would be used for tracking/logging purposes by test engines. 6816 */ 6817 public String getLabel() { 6818 return this.label == null ? null : this.label.getValue(); 6819 } 6820 6821 /** 6822 * @param value The label would be used for tracking/logging purposes by test engines. 6823 */ 6824 public SetupActionAssertComponent setLabel(String value) { 6825 if (Utilities.noString(value)) 6826 this.label = null; 6827 else { 6828 if (this.label == null) 6829 this.label = new StringType(); 6830 this.label.setValue(value); 6831 } 6832 return this; 6833 } 6834 6835 /** 6836 * @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 6837 */ 6838 public StringType getDescriptionElement() { 6839 if (this.description == null) 6840 if (Configuration.errorOnAutoCreate()) 6841 throw new Error("Attempt to auto-create SetupActionAssertComponent.description"); 6842 else if (Configuration.doAutoCreate()) 6843 this.description = new StringType(); // bb 6844 return this.description; 6845 } 6846 6847 public boolean hasDescriptionElement() { 6848 return this.description != null && !this.description.isEmpty(); 6849 } 6850 6851 public boolean hasDescription() { 6852 return this.description != null && !this.description.isEmpty(); 6853 } 6854 6855 /** 6856 * @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 6857 */ 6858 public SetupActionAssertComponent setDescriptionElement(StringType value) { 6859 this.description = value; 6860 return this; 6861 } 6862 6863 /** 6864 * @return The description would be used by test engines for tracking and reporting purposes. 6865 */ 6866 public String getDescription() { 6867 return this.description == null ? null : this.description.getValue(); 6868 } 6869 6870 /** 6871 * @param value The description would be used by test engines for tracking and reporting purposes. 6872 */ 6873 public SetupActionAssertComponent setDescription(String value) { 6874 if (Utilities.noString(value)) 6875 this.description = null; 6876 else { 6877 if (this.description == null) 6878 this.description = new StringType(); 6879 this.description.setValue(value); 6880 } 6881 return this; 6882 } 6883 6884 /** 6885 * @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 6886 */ 6887 public Enumeration<AssertionDirectionType> getDirectionElement() { 6888 if (this.direction == null) 6889 if (Configuration.errorOnAutoCreate()) 6890 throw new Error("Attempt to auto-create SetupActionAssertComponent.direction"); 6891 else if (Configuration.doAutoCreate()) 6892 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb 6893 return this.direction; 6894 } 6895 6896 public boolean hasDirectionElement() { 6897 return this.direction != null && !this.direction.isEmpty(); 6898 } 6899 6900 public boolean hasDirection() { 6901 return this.direction != null && !this.direction.isEmpty(); 6902 } 6903 6904 /** 6905 * @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 6906 */ 6907 public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 6908 this.direction = value; 6909 return this; 6910 } 6911 6912 /** 6913 * @return The direction to use for the assertion. 6914 */ 6915 public AssertionDirectionType getDirection() { 6916 return this.direction == null ? null : this.direction.getValue(); 6917 } 6918 6919 /** 6920 * @param value The direction to use for the assertion. 6921 */ 6922 public SetupActionAssertComponent setDirection(AssertionDirectionType value) { 6923 if (value == null) 6924 this.direction = null; 6925 else { 6926 if (this.direction == null) 6927 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); 6928 this.direction.setValue(value); 6929 } 6930 return this; 6931 } 6932 6933 /** 6934 * @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 6935 */ 6936 public StringType getCompareToSourceIdElement() { 6937 if (this.compareToSourceId == null) 6938 if (Configuration.errorOnAutoCreate()) 6939 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId"); 6940 else if (Configuration.doAutoCreate()) 6941 this.compareToSourceId = new StringType(); // bb 6942 return this.compareToSourceId; 6943 } 6944 6945 public boolean hasCompareToSourceIdElement() { 6946 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 6947 } 6948 6949 public boolean hasCompareToSourceId() { 6950 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 6951 } 6952 6953 /** 6954 * @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 6955 */ 6956 public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 6957 this.compareToSourceId = value; 6958 return this; 6959 } 6960 6961 /** 6962 * @return Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6963 */ 6964 public String getCompareToSourceId() { 6965 return this.compareToSourceId == null ? null : this.compareToSourceId.getValue(); 6966 } 6967 6968 /** 6969 * @param value Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6970 */ 6971 public SetupActionAssertComponent setCompareToSourceId(String value) { 6972 if (Utilities.noString(value)) 6973 this.compareToSourceId = null; 6974 else { 6975 if (this.compareToSourceId == null) 6976 this.compareToSourceId = new StringType(); 6977 this.compareToSourceId.setValue(value); 6978 } 6979 return this; 6980 } 6981 6982 /** 6983 * @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 6984 */ 6985 public StringType getCompareToSourceExpressionElement() { 6986 if (this.compareToSourceExpression == null) 6987 if (Configuration.errorOnAutoCreate()) 6988 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression"); 6989 else if (Configuration.doAutoCreate()) 6990 this.compareToSourceExpression = new StringType(); // bb 6991 return this.compareToSourceExpression; 6992 } 6993 6994 public boolean hasCompareToSourceExpressionElement() { 6995 return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty(); 6996 } 6997 6998 public boolean hasCompareToSourceExpression() { 6999 return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty(); 7000 } 7001 7002 /** 7003 * @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 7004 */ 7005 public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) { 7006 this.compareToSourceExpression = value; 7007 return this; 7008 } 7009 7010 /** 7011 * @return The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 7012 */ 7013 public String getCompareToSourceExpression() { 7014 return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue(); 7015 } 7016 7017 /** 7018 * @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. 7019 */ 7020 public SetupActionAssertComponent setCompareToSourceExpression(String value) { 7021 if (Utilities.noString(value)) 7022 this.compareToSourceExpression = null; 7023 else { 7024 if (this.compareToSourceExpression == null) 7025 this.compareToSourceExpression = new StringType(); 7026 this.compareToSourceExpression.setValue(value); 7027 } 7028 return this; 7029 } 7030 7031 /** 7032 * @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 7033 */ 7034 public StringType getCompareToSourcePathElement() { 7035 if (this.compareToSourcePath == null) 7036 if (Configuration.errorOnAutoCreate()) 7037 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath"); 7038 else if (Configuration.doAutoCreate()) 7039 this.compareToSourcePath = new StringType(); // bb 7040 return this.compareToSourcePath; 7041 } 7042 7043 public boolean hasCompareToSourcePathElement() { 7044 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 7045 } 7046 7047 public boolean hasCompareToSourcePath() { 7048 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 7049 } 7050 7051 /** 7052 * @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 7053 */ 7054 public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 7055 this.compareToSourcePath = value; 7056 return this; 7057 } 7058 7059 /** 7060 * @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. 7061 */ 7062 public String getCompareToSourcePath() { 7063 return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue(); 7064 } 7065 7066 /** 7067 * @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. 7068 */ 7069 public SetupActionAssertComponent setCompareToSourcePath(String value) { 7070 if (Utilities.noString(value)) 7071 this.compareToSourcePath = null; 7072 else { 7073 if (this.compareToSourcePath == null) 7074 this.compareToSourcePath = new StringType(); 7075 this.compareToSourcePath.setValue(value); 7076 } 7077 return this; 7078 } 7079 7080 /** 7081 * @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 7082 */ 7083 public Enumeration<ContentType> getContentTypeElement() { 7084 if (this.contentType == null) 7085 if (Configuration.errorOnAutoCreate()) 7086 throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType"); 7087 else if (Configuration.doAutoCreate()) 7088 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 7089 return this.contentType; 7090 } 7091 7092 public boolean hasContentTypeElement() { 7093 return this.contentType != null && !this.contentType.isEmpty(); 7094 } 7095 7096 public boolean hasContentType() { 7097 return this.contentType != null && !this.contentType.isEmpty(); 7098 } 7099 7100 /** 7101 * @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 7102 */ 7103 public SetupActionAssertComponent setContentTypeElement(Enumeration<ContentType> value) { 7104 this.contentType = value; 7105 return this; 7106 } 7107 7108 /** 7109 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 7110 */ 7111 public ContentType getContentType() { 7112 return this.contentType == null ? null : this.contentType.getValue(); 7113 } 7114 7115 /** 7116 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 7117 */ 7118 public SetupActionAssertComponent setContentType(ContentType value) { 7119 if (value == null) 7120 this.contentType = null; 7121 else { 7122 if (this.contentType == null) 7123 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 7124 this.contentType.setValue(value); 7125 } 7126 return this; 7127 } 7128 7129 /** 7130 * @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 7131 */ 7132 public StringType getExpressionElement() { 7133 if (this.expression == null) 7134 if (Configuration.errorOnAutoCreate()) 7135 throw new Error("Attempt to auto-create SetupActionAssertComponent.expression"); 7136 else if (Configuration.doAutoCreate()) 7137 this.expression = new StringType(); // bb 7138 return this.expression; 7139 } 7140 7141 public boolean hasExpressionElement() { 7142 return this.expression != null && !this.expression.isEmpty(); 7143 } 7144 7145 public boolean hasExpression() { 7146 return this.expression != null && !this.expression.isEmpty(); 7147 } 7148 7149 /** 7150 * @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 7151 */ 7152 public SetupActionAssertComponent setExpressionElement(StringType value) { 7153 this.expression = value; 7154 return this; 7155 } 7156 7157 /** 7158 * @return The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 7159 */ 7160 public String getExpression() { 7161 return this.expression == null ? null : this.expression.getValue(); 7162 } 7163 7164 /** 7165 * @param value The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 7166 */ 7167 public SetupActionAssertComponent setExpression(String value) { 7168 if (Utilities.noString(value)) 7169 this.expression = null; 7170 else { 7171 if (this.expression == null) 7172 this.expression = new StringType(); 7173 this.expression.setValue(value); 7174 } 7175 return this; 7176 } 7177 7178 /** 7179 * @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 7180 */ 7181 public StringType getHeaderFieldElement() { 7182 if (this.headerField == null) 7183 if (Configuration.errorOnAutoCreate()) 7184 throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField"); 7185 else if (Configuration.doAutoCreate()) 7186 this.headerField = new StringType(); // bb 7187 return this.headerField; 7188 } 7189 7190 public boolean hasHeaderFieldElement() { 7191 return this.headerField != null && !this.headerField.isEmpty(); 7192 } 7193 7194 public boolean hasHeaderField() { 7195 return this.headerField != null && !this.headerField.isEmpty(); 7196 } 7197 7198 /** 7199 * @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 7200 */ 7201 public SetupActionAssertComponent setHeaderFieldElement(StringType value) { 7202 this.headerField = value; 7203 return this; 7204 } 7205 7206 /** 7207 * @return The HTTP header field name e.g. 'Location'. 7208 */ 7209 public String getHeaderField() { 7210 return this.headerField == null ? null : this.headerField.getValue(); 7211 } 7212 7213 /** 7214 * @param value The HTTP header field name e.g. 'Location'. 7215 */ 7216 public SetupActionAssertComponent setHeaderField(String value) { 7217 if (Utilities.noString(value)) 7218 this.headerField = null; 7219 else { 7220 if (this.headerField == null) 7221 this.headerField = new StringType(); 7222 this.headerField.setValue(value); 7223 } 7224 return this; 7225 } 7226 7227 /** 7228 * @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 7229 */ 7230 public StringType getMinimumIdElement() { 7231 if (this.minimumId == null) 7232 if (Configuration.errorOnAutoCreate()) 7233 throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId"); 7234 else if (Configuration.doAutoCreate()) 7235 this.minimumId = new StringType(); // bb 7236 return this.minimumId; 7237 } 7238 7239 public boolean hasMinimumIdElement() { 7240 return this.minimumId != null && !this.minimumId.isEmpty(); 7241 } 7242 7243 public boolean hasMinimumId() { 7244 return this.minimumId != null && !this.minimumId.isEmpty(); 7245 } 7246 7247 /** 7248 * @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 7249 */ 7250 public SetupActionAssertComponent setMinimumIdElement(StringType value) { 7251 this.minimumId = value; 7252 return this; 7253 } 7254 7255 /** 7256 * @return The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 7257 */ 7258 public String getMinimumId() { 7259 return this.minimumId == null ? null : this.minimumId.getValue(); 7260 } 7261 7262 /** 7263 * @param value The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 7264 */ 7265 public SetupActionAssertComponent setMinimumId(String value) { 7266 if (Utilities.noString(value)) 7267 this.minimumId = null; 7268 else { 7269 if (this.minimumId == null) 7270 this.minimumId = new StringType(); 7271 this.minimumId.setValue(value); 7272 } 7273 return this; 7274 } 7275 7276 /** 7277 * @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 7278 */ 7279 public BooleanType getNavigationLinksElement() { 7280 if (this.navigationLinks == null) 7281 if (Configuration.errorOnAutoCreate()) 7282 throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks"); 7283 else if (Configuration.doAutoCreate()) 7284 this.navigationLinks = new BooleanType(); // bb 7285 return this.navigationLinks; 7286 } 7287 7288 public boolean hasNavigationLinksElement() { 7289 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 7290 } 7291 7292 public boolean hasNavigationLinks() { 7293 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 7294 } 7295 7296 /** 7297 * @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 7298 */ 7299 public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 7300 this.navigationLinks = value; 7301 return this; 7302 } 7303 7304 /** 7305 * @return Whether or not the test execution performs validation on the bundle navigation links. 7306 */ 7307 public boolean getNavigationLinks() { 7308 return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue(); 7309 } 7310 7311 /** 7312 * @param value Whether or not the test execution performs validation on the bundle navigation links. 7313 */ 7314 public SetupActionAssertComponent setNavigationLinks(boolean value) { 7315 if (this.navigationLinks == null) 7316 this.navigationLinks = new BooleanType(); 7317 this.navigationLinks.setValue(value); 7318 return this; 7319 } 7320 7321 /** 7322 * @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 7323 */ 7324 public Enumeration<AssertionOperatorType> getOperatorElement() { 7325 if (this.operator == null) 7326 if (Configuration.errorOnAutoCreate()) 7327 throw new Error("Attempt to auto-create SetupActionAssertComponent.operator"); 7328 else if (Configuration.doAutoCreate()) 7329 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb 7330 return this.operator; 7331 } 7332 7333 public boolean hasOperatorElement() { 7334 return this.operator != null && !this.operator.isEmpty(); 7335 } 7336 7337 public boolean hasOperator() { 7338 return this.operator != null && !this.operator.isEmpty(); 7339 } 7340 7341 /** 7342 * @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 7343 */ 7344 public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 7345 this.operator = value; 7346 return this; 7347 } 7348 7349 /** 7350 * @return The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 7351 */ 7352 public AssertionOperatorType getOperator() { 7353 return this.operator == null ? null : this.operator.getValue(); 7354 } 7355 7356 /** 7357 * @param value The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 7358 */ 7359 public SetupActionAssertComponent setOperator(AssertionOperatorType value) { 7360 if (value == null) 7361 this.operator = null; 7362 else { 7363 if (this.operator == null) 7364 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); 7365 this.operator.setValue(value); 7366 } 7367 return this; 7368 } 7369 7370 /** 7371 * @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 7372 */ 7373 public StringType getPathElement() { 7374 if (this.path == null) 7375 if (Configuration.errorOnAutoCreate()) 7376 throw new Error("Attempt to auto-create SetupActionAssertComponent.path"); 7377 else if (Configuration.doAutoCreate()) 7378 this.path = new StringType(); // bb 7379 return this.path; 7380 } 7381 7382 public boolean hasPathElement() { 7383 return this.path != null && !this.path.isEmpty(); 7384 } 7385 7386 public boolean hasPath() { 7387 return this.path != null && !this.path.isEmpty(); 7388 } 7389 7390 /** 7391 * @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 7392 */ 7393 public SetupActionAssertComponent setPathElement(StringType value) { 7394 this.path = value; 7395 return this; 7396 } 7397 7398 /** 7399 * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 7400 */ 7401 public String getPath() { 7402 return this.path == null ? null : this.path.getValue(); 7403 } 7404 7405 /** 7406 * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 7407 */ 7408 public SetupActionAssertComponent setPath(String value) { 7409 if (Utilities.noString(value)) 7410 this.path = null; 7411 else { 7412 if (this.path == null) 7413 this.path = new StringType(); 7414 this.path.setValue(value); 7415 } 7416 return this; 7417 } 7418 7419 /** 7420 * @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 7421 */ 7422 public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() { 7423 if (this.requestMethod == null) 7424 if (Configuration.errorOnAutoCreate()) 7425 throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod"); 7426 else if (Configuration.doAutoCreate()) 7427 this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb 7428 return this.requestMethod; 7429 } 7430 7431 public boolean hasRequestMethodElement() { 7432 return this.requestMethod != null && !this.requestMethod.isEmpty(); 7433 } 7434 7435 public boolean hasRequestMethod() { 7436 return this.requestMethod != null && !this.requestMethod.isEmpty(); 7437 } 7438 7439 /** 7440 * @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 7441 */ 7442 public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 7443 this.requestMethod = value; 7444 return this; 7445 } 7446 7447 /** 7448 * @return The request method or HTTP operation code to compare against that used by the client system under test. 7449 */ 7450 public TestScriptRequestMethodCode getRequestMethod() { 7451 return this.requestMethod == null ? null : this.requestMethod.getValue(); 7452 } 7453 7454 /** 7455 * @param value The request method or HTTP operation code to compare against that used by the client system under test. 7456 */ 7457 public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) { 7458 if (value == null) 7459 this.requestMethod = null; 7460 else { 7461 if (this.requestMethod == null) 7462 this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); 7463 this.requestMethod.setValue(value); 7464 } 7465 return this; 7466 } 7467 7468 /** 7469 * @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 7470 */ 7471 public StringType getRequestURLElement() { 7472 if (this.requestURL == null) 7473 if (Configuration.errorOnAutoCreate()) 7474 throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL"); 7475 else if (Configuration.doAutoCreate()) 7476 this.requestURL = new StringType(); // bb 7477 return this.requestURL; 7478 } 7479 7480 public boolean hasRequestURLElement() { 7481 return this.requestURL != null && !this.requestURL.isEmpty(); 7482 } 7483 7484 public boolean hasRequestURL() { 7485 return this.requestURL != null && !this.requestURL.isEmpty(); 7486 } 7487 7488 /** 7489 * @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 7490 */ 7491 public SetupActionAssertComponent setRequestURLElement(StringType value) { 7492 this.requestURL = value; 7493 return this; 7494 } 7495 7496 /** 7497 * @return The value to use in a comparison against the request URL path string. 7498 */ 7499 public String getRequestURL() { 7500 return this.requestURL == null ? null : this.requestURL.getValue(); 7501 } 7502 7503 /** 7504 * @param value The value to use in a comparison against the request URL path string. 7505 */ 7506 public SetupActionAssertComponent setRequestURL(String value) { 7507 if (Utilities.noString(value)) 7508 this.requestURL = null; 7509 else { 7510 if (this.requestURL == null) 7511 this.requestURL = new StringType(); 7512 this.requestURL.setValue(value); 7513 } 7514 return this; 7515 } 7516 7517 /** 7518 * @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 7519 */ 7520 public CodeType getResourceElement() { 7521 if (this.resource == null) 7522 if (Configuration.errorOnAutoCreate()) 7523 throw new Error("Attempt to auto-create SetupActionAssertComponent.resource"); 7524 else if (Configuration.doAutoCreate()) 7525 this.resource = new CodeType(); // bb 7526 return this.resource; 7527 } 7528 7529 public boolean hasResourceElement() { 7530 return this.resource != null && !this.resource.isEmpty(); 7531 } 7532 7533 public boolean hasResource() { 7534 return this.resource != null && !this.resource.isEmpty(); 7535 } 7536 7537 /** 7538 * @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 7539 */ 7540 public SetupActionAssertComponent setResourceElement(CodeType value) { 7541 this.resource = value; 7542 return this; 7543 } 7544 7545 /** 7546 * @return The type of the resource. See http://build.fhir.org/resourcelist.html. 7547 */ 7548 public String getResource() { 7549 return this.resource == null ? null : this.resource.getValue(); 7550 } 7551 7552 /** 7553 * @param value The type of the resource. See http://build.fhir.org/resourcelist.html. 7554 */ 7555 public SetupActionAssertComponent setResource(String value) { 7556 if (Utilities.noString(value)) 7557 this.resource = null; 7558 else { 7559 if (this.resource == null) 7560 this.resource = new CodeType(); 7561 this.resource.setValue(value); 7562 } 7563 return this; 7564 } 7565 7566 /** 7567 * @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 7568 */ 7569 public Enumeration<AssertionResponseTypes> getResponseElement() { 7570 if (this.response == null) 7571 if (Configuration.errorOnAutoCreate()) 7572 throw new Error("Attempt to auto-create SetupActionAssertComponent.response"); 7573 else if (Configuration.doAutoCreate()) 7574 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb 7575 return this.response; 7576 } 7577 7578 public boolean hasResponseElement() { 7579 return this.response != null && !this.response.isEmpty(); 7580 } 7581 7582 public boolean hasResponse() { 7583 return this.response != null && !this.response.isEmpty(); 7584 } 7585 7586 /** 7587 * @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 7588 */ 7589 public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 7590 this.response = value; 7591 return this; 7592 } 7593 7594 /** 7595 * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 7596 */ 7597 public AssertionResponseTypes getResponse() { 7598 return this.response == null ? null : this.response.getValue(); 7599 } 7600 7601 /** 7602 * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 7603 */ 7604 public SetupActionAssertComponent setResponse(AssertionResponseTypes value) { 7605 if (value == null) 7606 this.response = null; 7607 else { 7608 if (this.response == null) 7609 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); 7610 this.response.setValue(value); 7611 } 7612 return this; 7613 } 7614 7615 /** 7616 * @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 7617 */ 7618 public StringType getResponseCodeElement() { 7619 if (this.responseCode == null) 7620 if (Configuration.errorOnAutoCreate()) 7621 throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode"); 7622 else if (Configuration.doAutoCreate()) 7623 this.responseCode = new StringType(); // bb 7624 return this.responseCode; 7625 } 7626 7627 public boolean hasResponseCodeElement() { 7628 return this.responseCode != null && !this.responseCode.isEmpty(); 7629 } 7630 7631 public boolean hasResponseCode() { 7632 return this.responseCode != null && !this.responseCode.isEmpty(); 7633 } 7634 7635 /** 7636 * @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 7637 */ 7638 public SetupActionAssertComponent setResponseCodeElement(StringType value) { 7639 this.responseCode = value; 7640 return this; 7641 } 7642 7643 /** 7644 * @return The value of the HTTP response code to be tested. 7645 */ 7646 public String getResponseCode() { 7647 return this.responseCode == null ? null : this.responseCode.getValue(); 7648 } 7649 7650 /** 7651 * @param value The value of the HTTP response code to be tested. 7652 */ 7653 public SetupActionAssertComponent setResponseCode(String value) { 7654 if (Utilities.noString(value)) 7655 this.responseCode = null; 7656 else { 7657 if (this.responseCode == null) 7658 this.responseCode = new StringType(); 7659 this.responseCode.setValue(value); 7660 } 7661 return this; 7662 } 7663 7664 /** 7665 * @return {@link #rule} (The TestScript.rule this assert will evaluate.) 7666 */ 7667 public ActionAssertRuleComponent getRule() { 7668 if (this.rule == null) 7669 if (Configuration.errorOnAutoCreate()) 7670 throw new Error("Attempt to auto-create SetupActionAssertComponent.rule"); 7671 else if (Configuration.doAutoCreate()) 7672 this.rule = new ActionAssertRuleComponent(); // cc 7673 return this.rule; 7674 } 7675 7676 public boolean hasRule() { 7677 return this.rule != null && !this.rule.isEmpty(); 7678 } 7679 7680 /** 7681 * @param value {@link #rule} (The TestScript.rule this assert will evaluate.) 7682 */ 7683 public SetupActionAssertComponent setRule(ActionAssertRuleComponent value) { 7684 this.rule = value; 7685 return this; 7686 } 7687 7688 /** 7689 * @return {@link #ruleset} (The TestScript.ruleset this assert will evaluate.) 7690 */ 7691 public ActionAssertRulesetComponent getRuleset() { 7692 if (this.ruleset == null) 7693 if (Configuration.errorOnAutoCreate()) 7694 throw new Error("Attempt to auto-create SetupActionAssertComponent.ruleset"); 7695 else if (Configuration.doAutoCreate()) 7696 this.ruleset = new ActionAssertRulesetComponent(); // cc 7697 return this.ruleset; 7698 } 7699 7700 public boolean hasRuleset() { 7701 return this.ruleset != null && !this.ruleset.isEmpty(); 7702 } 7703 7704 /** 7705 * @param value {@link #ruleset} (The TestScript.ruleset this assert will evaluate.) 7706 */ 7707 public SetupActionAssertComponent setRuleset(ActionAssertRulesetComponent value) { 7708 this.ruleset = value; 7709 return this; 7710 } 7711 7712 /** 7713 * @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 7714 */ 7715 public IdType getSourceIdElement() { 7716 if (this.sourceId == null) 7717 if (Configuration.errorOnAutoCreate()) 7718 throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId"); 7719 else if (Configuration.doAutoCreate()) 7720 this.sourceId = new IdType(); // bb 7721 return this.sourceId; 7722 } 7723 7724 public boolean hasSourceIdElement() { 7725 return this.sourceId != null && !this.sourceId.isEmpty(); 7726 } 7727 7728 public boolean hasSourceId() { 7729 return this.sourceId != null && !this.sourceId.isEmpty(); 7730 } 7731 7732 /** 7733 * @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 7734 */ 7735 public SetupActionAssertComponent setSourceIdElement(IdType value) { 7736 this.sourceId = value; 7737 return this; 7738 } 7739 7740 /** 7741 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against. 7742 */ 7743 public String getSourceId() { 7744 return this.sourceId == null ? null : this.sourceId.getValue(); 7745 } 7746 7747 /** 7748 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against. 7749 */ 7750 public SetupActionAssertComponent setSourceId(String value) { 7751 if (Utilities.noString(value)) 7752 this.sourceId = null; 7753 else { 7754 if (this.sourceId == null) 7755 this.sourceId = new IdType(); 7756 this.sourceId.setValue(value); 7757 } 7758 return this; 7759 } 7760 7761 /** 7762 * @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 7763 */ 7764 public IdType getValidateProfileIdElement() { 7765 if (this.validateProfileId == null) 7766 if (Configuration.errorOnAutoCreate()) 7767 throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId"); 7768 else if (Configuration.doAutoCreate()) 7769 this.validateProfileId = new IdType(); // bb 7770 return this.validateProfileId; 7771 } 7772 7773 public boolean hasValidateProfileIdElement() { 7774 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 7775 } 7776 7777 public boolean hasValidateProfileId() { 7778 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 7779 } 7780 7781 /** 7782 * @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 7783 */ 7784 public SetupActionAssertComponent setValidateProfileIdElement(IdType value) { 7785 this.validateProfileId = value; 7786 return this; 7787 } 7788 7789 /** 7790 * @return The ID of the Profile to validate against. 7791 */ 7792 public String getValidateProfileId() { 7793 return this.validateProfileId == null ? null : this.validateProfileId.getValue(); 7794 } 7795 7796 /** 7797 * @param value The ID of the Profile to validate against. 7798 */ 7799 public SetupActionAssertComponent setValidateProfileId(String value) { 7800 if (Utilities.noString(value)) 7801 this.validateProfileId = null; 7802 else { 7803 if (this.validateProfileId == null) 7804 this.validateProfileId = new IdType(); 7805 this.validateProfileId.setValue(value); 7806 } 7807 return this; 7808 } 7809 7810 /** 7811 * @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 7812 */ 7813 public StringType getValueElement() { 7814 if (this.value == null) 7815 if (Configuration.errorOnAutoCreate()) 7816 throw new Error("Attempt to auto-create SetupActionAssertComponent.value"); 7817 else if (Configuration.doAutoCreate()) 7818 this.value = new StringType(); // bb 7819 return this.value; 7820 } 7821 7822 public boolean hasValueElement() { 7823 return this.value != null && !this.value.isEmpty(); 7824 } 7825 7826 public boolean hasValue() { 7827 return this.value != null && !this.value.isEmpty(); 7828 } 7829 7830 /** 7831 * @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 7832 */ 7833 public SetupActionAssertComponent setValueElement(StringType value) { 7834 this.value = value; 7835 return this; 7836 } 7837 7838 /** 7839 * @return The value to compare to. 7840 */ 7841 public String getValue() { 7842 return this.value == null ? null : this.value.getValue(); 7843 } 7844 7845 /** 7846 * @param value The value to compare to. 7847 */ 7848 public SetupActionAssertComponent setValue(String value) { 7849 if (Utilities.noString(value)) 7850 this.value = null; 7851 else { 7852 if (this.value == null) 7853 this.value = new StringType(); 7854 this.value.setValue(value); 7855 } 7856 return this; 7857 } 7858 7859 /** 7860 * @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 7861 */ 7862 public BooleanType getWarningOnlyElement() { 7863 if (this.warningOnly == null) 7864 if (Configuration.errorOnAutoCreate()) 7865 throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly"); 7866 else if (Configuration.doAutoCreate()) 7867 this.warningOnly = new BooleanType(); // bb 7868 return this.warningOnly; 7869 } 7870 7871 public boolean hasWarningOnlyElement() { 7872 return this.warningOnly != null && !this.warningOnly.isEmpty(); 7873 } 7874 7875 public boolean hasWarningOnly() { 7876 return this.warningOnly != null && !this.warningOnly.isEmpty(); 7877 } 7878 7879 /** 7880 * @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 7881 */ 7882 public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 7883 this.warningOnly = value; 7884 return this; 7885 } 7886 7887 /** 7888 * @return Whether or not the test execution will produce a warning only on error for this assert. 7889 */ 7890 public boolean getWarningOnly() { 7891 return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue(); 7892 } 7893 7894 /** 7895 * @param value Whether or not the test execution will produce a warning only on error for this assert. 7896 */ 7897 public SetupActionAssertComponent setWarningOnly(boolean value) { 7898 if (this.warningOnly == null) 7899 this.warningOnly = new BooleanType(); 7900 this.warningOnly.setValue(value); 7901 return this; 7902 } 7903 7904 protected void listChildren(List<Property> children) { 7905 super.listChildren(children); 7906 children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label)); 7907 children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description)); 7908 children.add(new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction)); 7909 children.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, 1, compareToSourceId)); 7910 children.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, 1, compareToSourceExpression)); 7911 children.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, 1, compareToSourcePath)); 7912 children.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType)); 7913 children.add(new Property("expression", "string", "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression)); 7914 children.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField)); 7915 children.add(new Property("minimumId", "string", "The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.", 0, 1, minimumId)); 7916 children.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks)); 7917 children.add(new Property("operator", "code", "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", 0, 1, operator)); 7918 children.add(new Property("path", "string", "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", 0, 1, path)); 7919 children.add(new Property("requestMethod", "code", "The request method or HTTP operation code to compare against that used by the client system under test.", 0, 1, requestMethod)); 7920 children.add(new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL)); 7921 children.add(new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource)); 7922 children.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response)); 7923 children.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode)); 7924 children.add(new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, 1, rule)); 7925 children.add(new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, 1, ruleset)); 7926 children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, 1, sourceId)); 7927 children.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId)); 7928 children.add(new Property("value", "string", "The value to compare to.", 0, 1, value)); 7929 children.add(new Property("warningOnly", "boolean", "Whether or not the test execution will produce a warning only on error for this assert.", 0, 1, warningOnly)); 7930 } 7931 7932 @Override 7933 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7934 switch (_hash) { 7935 case 102727412: /*label*/ return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label); 7936 case -1724546052: /*description*/ return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description); 7937 case -962590849: /*direction*/ return new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction); 7938 case 2081856758: /*compareToSourceId*/ return 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, 1, compareToSourceId); 7939 case -1415702669: /*compareToSourceExpression*/ return 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, 1, compareToSourceExpression); 7940 case -790206144: /*compareToSourcePath*/ return 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, 1, compareToSourcePath); 7941 case -389131437: /*contentType*/ return new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType); 7942 case -1795452264: /*expression*/ return new Property("expression", "string", "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression); 7943 case 1160732269: /*headerField*/ return new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField); 7944 case 818925001: /*minimumId*/ return new Property("minimumId", "string", "The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.", 0, 1, minimumId); 7945 case 1001488901: /*navigationLinks*/ return new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks); 7946 case -500553564: /*operator*/ return new Property("operator", "code", "The operator type defines the conditional behavior of the assert. If not defined, the default is equals.", 0, 1, operator); 7947 case 3433509: /*path*/ return new Property("path", "string", "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", 0, 1, path); 7948 case 1217874000: /*requestMethod*/ return new Property("requestMethod", "code", "The request method or HTTP operation code to compare against that used by the client system under test.", 0, 1, requestMethod); 7949 case 37099616: /*requestURL*/ return new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL); 7950 case -341064690: /*resource*/ return new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource); 7951 case -340323263: /*response*/ return new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response); 7952 case 1438723534: /*responseCode*/ return new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode); 7953 case 3512060: /*rule*/ return new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, 1, rule); 7954 case 1548678118: /*ruleset*/ return new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, 1, ruleset); 7955 case 1746327190: /*sourceId*/ return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, 1, sourceId); 7956 case 1555541038: /*validateProfileId*/ return new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId); 7957 case 111972721: /*value*/ return new Property("value", "string", "The value to compare to.", 0, 1, value); 7958 case -481159832: /*warningOnly*/ return new Property("warningOnly", "boolean", "Whether or not the test execution will produce a warning only on error for this assert.", 0, 1, warningOnly); 7959 default: return super.getNamedProperty(_hash, _name, _checkValid); 7960 } 7961 7962 } 7963 7964 @Override 7965 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7966 switch (hash) { 7967 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 7968 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 7969 case -962590849: /*direction*/ return this.direction == null ? new Base[0] : new Base[] {this.direction}; // Enumeration<AssertionDirectionType> 7970 case 2081856758: /*compareToSourceId*/ return this.compareToSourceId == null ? new Base[0] : new Base[] {this.compareToSourceId}; // StringType 7971 case -1415702669: /*compareToSourceExpression*/ return this.compareToSourceExpression == null ? new Base[0] : new Base[] {this.compareToSourceExpression}; // StringType 7972 case -790206144: /*compareToSourcePath*/ return this.compareToSourcePath == null ? new Base[0] : new Base[] {this.compareToSourcePath}; // StringType 7973 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType> 7974 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 7975 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 7976 case 818925001: /*minimumId*/ return this.minimumId == null ? new Base[0] : new Base[] {this.minimumId}; // StringType 7977 case 1001488901: /*navigationLinks*/ return this.navigationLinks == null ? new Base[0] : new Base[] {this.navigationLinks}; // BooleanType 7978 case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Enumeration<AssertionOperatorType> 7979 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 7980 case 1217874000: /*requestMethod*/ return this.requestMethod == null ? new Base[0] : new Base[] {this.requestMethod}; // Enumeration<TestScriptRequestMethodCode> 7981 case 37099616: /*requestURL*/ return this.requestURL == null ? new Base[0] : new Base[] {this.requestURL}; // StringType 7982 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 7983 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Enumeration<AssertionResponseTypes> 7984 case 1438723534: /*responseCode*/ return this.responseCode == null ? new Base[0] : new Base[] {this.responseCode}; // StringType 7985 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : new Base[] {this.rule}; // ActionAssertRuleComponent 7986 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // ActionAssertRulesetComponent 7987 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 7988 case 1555541038: /*validateProfileId*/ return this.validateProfileId == null ? new Base[0] : new Base[] {this.validateProfileId}; // IdType 7989 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 7990 case -481159832: /*warningOnly*/ return this.warningOnly == null ? new Base[0] : new Base[] {this.warningOnly}; // BooleanType 7991 default: return super.getProperty(hash, name, checkValid); 7992 } 7993 7994 } 7995 7996 @Override 7997 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7998 switch (hash) { 7999 case 102727412: // label 8000 this.label = castToString(value); // StringType 8001 return value; 8002 case -1724546052: // description 8003 this.description = castToString(value); // StringType 8004 return value; 8005 case -962590849: // direction 8006 value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value)); 8007 this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType> 8008 return value; 8009 case 2081856758: // compareToSourceId 8010 this.compareToSourceId = castToString(value); // StringType 8011 return value; 8012 case -1415702669: // compareToSourceExpression 8013 this.compareToSourceExpression = castToString(value); // StringType 8014 return value; 8015 case -790206144: // compareToSourcePath 8016 this.compareToSourcePath = castToString(value); // StringType 8017 return value; 8018 case -389131437: // contentType 8019 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 8020 this.contentType = (Enumeration) value; // Enumeration<ContentType> 8021 return value; 8022 case -1795452264: // expression 8023 this.expression = castToString(value); // StringType 8024 return value; 8025 case 1160732269: // headerField 8026 this.headerField = castToString(value); // StringType 8027 return value; 8028 case 818925001: // minimumId 8029 this.minimumId = castToString(value); // StringType 8030 return value; 8031 case 1001488901: // navigationLinks 8032 this.navigationLinks = castToBoolean(value); // BooleanType 8033 return value; 8034 case -500553564: // operator 8035 value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value)); 8036 this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType> 8037 return value; 8038 case 3433509: // path 8039 this.path = castToString(value); // StringType 8040 return value; 8041 case 1217874000: // requestMethod 8042 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 8043 this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 8044 return value; 8045 case 37099616: // requestURL 8046 this.requestURL = castToString(value); // StringType 8047 return value; 8048 case -341064690: // resource 8049 this.resource = castToCode(value); // CodeType 8050 return value; 8051 case -340323263: // response 8052 value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value)); 8053 this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes> 8054 return value; 8055 case 1438723534: // responseCode 8056 this.responseCode = castToString(value); // StringType 8057 return value; 8058 case 3512060: // rule 8059 this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent 8060 return value; 8061 case 1548678118: // ruleset 8062 this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent 8063 return value; 8064 case 1746327190: // sourceId 8065 this.sourceId = castToId(value); // IdType 8066 return value; 8067 case 1555541038: // validateProfileId 8068 this.validateProfileId = castToId(value); // IdType 8069 return value; 8070 case 111972721: // value 8071 this.value = castToString(value); // StringType 8072 return value; 8073 case -481159832: // warningOnly 8074 this.warningOnly = castToBoolean(value); // BooleanType 8075 return value; 8076 default: return super.setProperty(hash, name, value); 8077 } 8078 8079 } 8080 8081 @Override 8082 public Base setProperty(String name, Base value) throws FHIRException { 8083 if (name.equals("label")) { 8084 this.label = castToString(value); // StringType 8085 } else if (name.equals("description")) { 8086 this.description = castToString(value); // StringType 8087 } else if (name.equals("direction")) { 8088 value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value)); 8089 this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType> 8090 } else if (name.equals("compareToSourceId")) { 8091 this.compareToSourceId = castToString(value); // StringType 8092 } else if (name.equals("compareToSourceExpression")) { 8093 this.compareToSourceExpression = castToString(value); // StringType 8094 } else if (name.equals("compareToSourcePath")) { 8095 this.compareToSourcePath = castToString(value); // StringType 8096 } else if (name.equals("contentType")) { 8097 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 8098 this.contentType = (Enumeration) value; // Enumeration<ContentType> 8099 } else if (name.equals("expression")) { 8100 this.expression = castToString(value); // StringType 8101 } else if (name.equals("headerField")) { 8102 this.headerField = castToString(value); // StringType 8103 } else if (name.equals("minimumId")) { 8104 this.minimumId = castToString(value); // StringType 8105 } else if (name.equals("navigationLinks")) { 8106 this.navigationLinks = castToBoolean(value); // BooleanType 8107 } else if (name.equals("operator")) { 8108 value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value)); 8109 this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType> 8110 } else if (name.equals("path")) { 8111 this.path = castToString(value); // StringType 8112 } else if (name.equals("requestMethod")) { 8113 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 8114 this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 8115 } else if (name.equals("requestURL")) { 8116 this.requestURL = castToString(value); // StringType 8117 } else if (name.equals("resource")) { 8118 this.resource = castToCode(value); // CodeType 8119 } else if (name.equals("response")) { 8120 value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value)); 8121 this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes> 8122 } else if (name.equals("responseCode")) { 8123 this.responseCode = castToString(value); // StringType 8124 } else if (name.equals("rule")) { 8125 this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent 8126 } else if (name.equals("ruleset")) { 8127 this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent 8128 } else if (name.equals("sourceId")) { 8129 this.sourceId = castToId(value); // IdType 8130 } else if (name.equals("validateProfileId")) { 8131 this.validateProfileId = castToId(value); // IdType 8132 } else if (name.equals("value")) { 8133 this.value = castToString(value); // StringType 8134 } else if (name.equals("warningOnly")) { 8135 this.warningOnly = castToBoolean(value); // BooleanType 8136 } else 8137 return super.setProperty(name, value); 8138 return value; 8139 } 8140 8141 @Override 8142 public Base makeProperty(int hash, String name) throws FHIRException { 8143 switch (hash) { 8144 case 102727412: return getLabelElement(); 8145 case -1724546052: return getDescriptionElement(); 8146 case -962590849: return getDirectionElement(); 8147 case 2081856758: return getCompareToSourceIdElement(); 8148 case -1415702669: return getCompareToSourceExpressionElement(); 8149 case -790206144: return getCompareToSourcePathElement(); 8150 case -389131437: return getContentTypeElement(); 8151 case -1795452264: return getExpressionElement(); 8152 case 1160732269: return getHeaderFieldElement(); 8153 case 818925001: return getMinimumIdElement(); 8154 case 1001488901: return getNavigationLinksElement(); 8155 case -500553564: return getOperatorElement(); 8156 case 3433509: return getPathElement(); 8157 case 1217874000: return getRequestMethodElement(); 8158 case 37099616: return getRequestURLElement(); 8159 case -341064690: return getResourceElement(); 8160 case -340323263: return getResponseElement(); 8161 case 1438723534: return getResponseCodeElement(); 8162 case 3512060: return getRule(); 8163 case 1548678118: return getRuleset(); 8164 case 1746327190: return getSourceIdElement(); 8165 case 1555541038: return getValidateProfileIdElement(); 8166 case 111972721: return getValueElement(); 8167 case -481159832: return getWarningOnlyElement(); 8168 default: return super.makeProperty(hash, name); 8169 } 8170 8171 } 8172 8173 @Override 8174 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8175 switch (hash) { 8176 case 102727412: /*label*/ return new String[] {"string"}; 8177 case -1724546052: /*description*/ return new String[] {"string"}; 8178 case -962590849: /*direction*/ return new String[] {"code"}; 8179 case 2081856758: /*compareToSourceId*/ return new String[] {"string"}; 8180 case -1415702669: /*compareToSourceExpression*/ return new String[] {"string"}; 8181 case -790206144: /*compareToSourcePath*/ return new String[] {"string"}; 8182 case -389131437: /*contentType*/ return new String[] {"code"}; 8183 case -1795452264: /*expression*/ return new String[] {"string"}; 8184 case 1160732269: /*headerField*/ return new String[] {"string"}; 8185 case 818925001: /*minimumId*/ return new String[] {"string"}; 8186 case 1001488901: /*navigationLinks*/ return new String[] {"boolean"}; 8187 case -500553564: /*operator*/ return new String[] {"code"}; 8188 case 3433509: /*path*/ return new String[] {"string"}; 8189 case 1217874000: /*requestMethod*/ return new String[] {"code"}; 8190 case 37099616: /*requestURL*/ return new String[] {"string"}; 8191 case -341064690: /*resource*/ return new String[] {"code"}; 8192 case -340323263: /*response*/ return new String[] {"code"}; 8193 case 1438723534: /*responseCode*/ return new String[] {"string"}; 8194 case 3512060: /*rule*/ return new String[] {}; 8195 case 1548678118: /*ruleset*/ return new String[] {}; 8196 case 1746327190: /*sourceId*/ return new String[] {"id"}; 8197 case 1555541038: /*validateProfileId*/ return new String[] {"id"}; 8198 case 111972721: /*value*/ return new String[] {"string"}; 8199 case -481159832: /*warningOnly*/ return new String[] {"boolean"}; 8200 default: return super.getTypesForProperty(hash, name); 8201 } 8202 8203 } 8204 8205 @Override 8206 public Base addChild(String name) throws FHIRException { 8207 if (name.equals("label")) { 8208 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 8209 } 8210 else if (name.equals("description")) { 8211 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 8212 } 8213 else if (name.equals("direction")) { 8214 throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction"); 8215 } 8216 else if (name.equals("compareToSourceId")) { 8217 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId"); 8218 } 8219 else if (name.equals("compareToSourceExpression")) { 8220 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceExpression"); 8221 } 8222 else if (name.equals("compareToSourcePath")) { 8223 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath"); 8224 } 8225 else if (name.equals("contentType")) { 8226 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 8227 } 8228 else if (name.equals("expression")) { 8229 throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression"); 8230 } 8231 else if (name.equals("headerField")) { 8232 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 8233 } 8234 else if (name.equals("minimumId")) { 8235 throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId"); 8236 } 8237 else if (name.equals("navigationLinks")) { 8238 throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks"); 8239 } 8240 else if (name.equals("operator")) { 8241 throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator"); 8242 } 8243 else if (name.equals("path")) { 8244 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 8245 } 8246 else if (name.equals("requestMethod")) { 8247 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestMethod"); 8248 } 8249 else if (name.equals("requestURL")) { 8250 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestURL"); 8251 } 8252 else if (name.equals("resource")) { 8253 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 8254 } 8255 else if (name.equals("response")) { 8256 throw new FHIRException("Cannot call addChild on a primitive type TestScript.response"); 8257 } 8258 else if (name.equals("responseCode")) { 8259 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode"); 8260 } 8261 else if (name.equals("rule")) { 8262 this.rule = new ActionAssertRuleComponent(); 8263 return this.rule; 8264 } 8265 else if (name.equals("ruleset")) { 8266 this.ruleset = new ActionAssertRulesetComponent(); 8267 return this.ruleset; 8268 } 8269 else if (name.equals("sourceId")) { 8270 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 8271 } 8272 else if (name.equals("validateProfileId")) { 8273 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId"); 8274 } 8275 else if (name.equals("value")) { 8276 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 8277 } 8278 else if (name.equals("warningOnly")) { 8279 throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly"); 8280 } 8281 else 8282 return super.addChild(name); 8283 } 8284 8285 public SetupActionAssertComponent copy() { 8286 SetupActionAssertComponent dst = new SetupActionAssertComponent(); 8287 copyValues(dst); 8288 dst.label = label == null ? null : label.copy(); 8289 dst.description = description == null ? null : description.copy(); 8290 dst.direction = direction == null ? null : direction.copy(); 8291 dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy(); 8292 dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy(); 8293 dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy(); 8294 dst.contentType = contentType == null ? null : contentType.copy(); 8295 dst.expression = expression == null ? null : expression.copy(); 8296 dst.headerField = headerField == null ? null : headerField.copy(); 8297 dst.minimumId = minimumId == null ? null : minimumId.copy(); 8298 dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy(); 8299 dst.operator = operator == null ? null : operator.copy(); 8300 dst.path = path == null ? null : path.copy(); 8301 dst.requestMethod = requestMethod == null ? null : requestMethod.copy(); 8302 dst.requestURL = requestURL == null ? null : requestURL.copy(); 8303 dst.resource = resource == null ? null : resource.copy(); 8304 dst.response = response == null ? null : response.copy(); 8305 dst.responseCode = responseCode == null ? null : responseCode.copy(); 8306 dst.rule = rule == null ? null : rule.copy(); 8307 dst.ruleset = ruleset == null ? null : ruleset.copy(); 8308 dst.sourceId = sourceId == null ? null : sourceId.copy(); 8309 dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy(); 8310 dst.value = value == null ? null : value.copy(); 8311 dst.warningOnly = warningOnly == null ? null : warningOnly.copy(); 8312 return dst; 8313 } 8314 8315 @Override 8316 public boolean equalsDeep(Base other_) { 8317 if (!super.equalsDeep(other_)) 8318 return false; 8319 if (!(other_ instanceof SetupActionAssertComponent)) 8320 return false; 8321 SetupActionAssertComponent o = (SetupActionAssertComponent) other_; 8322 return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true) 8323 && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true) 8324 && compareDeep(compareToSourcePath, o.compareToSourcePath, true) && compareDeep(contentType, o.contentType, true) 8325 && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true) 8326 && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true) 8327 && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true) 8328 && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true) && compareDeep(response, o.response, true) 8329 && compareDeep(responseCode, o.responseCode, true) && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) 8330 && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true) 8331 && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true); 8332 } 8333 8334 @Override 8335 public boolean equalsShallow(Base other_) { 8336 if (!super.equalsShallow(other_)) 8337 return false; 8338 if (!(other_ instanceof SetupActionAssertComponent)) 8339 return false; 8340 SetupActionAssertComponent o = (SetupActionAssertComponent) other_; 8341 return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true) 8342 && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourceExpression, o.compareToSourceExpression, true) 8343 && compareValues(compareToSourcePath, o.compareToSourcePath, true) && compareValues(contentType, o.contentType, true) 8344 && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true) 8345 && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true) 8346 && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true) 8347 && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true) && compareValues(response, o.response, true) 8348 && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true) 8349 && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true); 8350 } 8351 8352 public boolean isEmpty() { 8353 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction 8354 , compareToSourceId, compareToSourceExpression, compareToSourcePath, contentType, expression 8355 , headerField, minimumId, navigationLinks, operator, path, requestMethod, requestURL 8356 , resource, response, responseCode, rule, ruleset, sourceId, validateProfileId 8357 , value, warningOnly); 8358 } 8359 8360 public String fhirType() { 8361 return "TestScript.setup.action.assert"; 8362 8363 } 8364 8365 } 8366 8367 @Block() 8368 public static class ActionAssertRuleComponent extends BackboneElement implements IBaseBackboneElement { 8369 /** 8370 * The TestScript.rule id value this assert will evaluate. 8371 */ 8372 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8373 @Description(shortDefinition="Id of the TestScript.rule", formalDefinition="The TestScript.rule id value this assert will evaluate." ) 8374 protected IdType ruleId; 8375 8376 /** 8377 * Each rule template can take one or more parameters for rule evaluation. 8378 */ 8379 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8380 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 8381 protected List<ActionAssertRuleParamComponent> param; 8382 8383 private static final long serialVersionUID = -1860715431L; 8384 8385 /** 8386 * Constructor 8387 */ 8388 public ActionAssertRuleComponent() { 8389 super(); 8390 } 8391 8392 /** 8393 * Constructor 8394 */ 8395 public ActionAssertRuleComponent(IdType ruleId) { 8396 super(); 8397 this.ruleId = ruleId; 8398 } 8399 8400 /** 8401 * @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 8402 */ 8403 public IdType getRuleIdElement() { 8404 if (this.ruleId == null) 8405 if (Configuration.errorOnAutoCreate()) 8406 throw new Error("Attempt to auto-create ActionAssertRuleComponent.ruleId"); 8407 else if (Configuration.doAutoCreate()) 8408 this.ruleId = new IdType(); // bb 8409 return this.ruleId; 8410 } 8411 8412 public boolean hasRuleIdElement() { 8413 return this.ruleId != null && !this.ruleId.isEmpty(); 8414 } 8415 8416 public boolean hasRuleId() { 8417 return this.ruleId != null && !this.ruleId.isEmpty(); 8418 } 8419 8420 /** 8421 * @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 8422 */ 8423 public ActionAssertRuleComponent setRuleIdElement(IdType value) { 8424 this.ruleId = value; 8425 return this; 8426 } 8427 8428 /** 8429 * @return The TestScript.rule id value this assert will evaluate. 8430 */ 8431 public String getRuleId() { 8432 return this.ruleId == null ? null : this.ruleId.getValue(); 8433 } 8434 8435 /** 8436 * @param value The TestScript.rule id value this assert will evaluate. 8437 */ 8438 public ActionAssertRuleComponent setRuleId(String value) { 8439 if (this.ruleId == null) 8440 this.ruleId = new IdType(); 8441 this.ruleId.setValue(value); 8442 return this; 8443 } 8444 8445 /** 8446 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 8447 */ 8448 public List<ActionAssertRuleParamComponent> getParam() { 8449 if (this.param == null) 8450 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8451 return this.param; 8452 } 8453 8454 /** 8455 * @return Returns a reference to <code>this</code> for easy method chaining 8456 */ 8457 public ActionAssertRuleComponent setParam(List<ActionAssertRuleParamComponent> theParam) { 8458 this.param = theParam; 8459 return this; 8460 } 8461 8462 public boolean hasParam() { 8463 if (this.param == null) 8464 return false; 8465 for (ActionAssertRuleParamComponent item : this.param) 8466 if (!item.isEmpty()) 8467 return true; 8468 return false; 8469 } 8470 8471 public ActionAssertRuleParamComponent addParam() { //3 8472 ActionAssertRuleParamComponent t = new ActionAssertRuleParamComponent(); 8473 if (this.param == null) 8474 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8475 this.param.add(t); 8476 return t; 8477 } 8478 8479 public ActionAssertRuleComponent addParam(ActionAssertRuleParamComponent t) { //3 8480 if (t == null) 8481 return this; 8482 if (this.param == null) 8483 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8484 this.param.add(t); 8485 return this; 8486 } 8487 8488 /** 8489 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 8490 */ 8491 public ActionAssertRuleParamComponent getParamFirstRep() { 8492 if (getParam().isEmpty()) { 8493 addParam(); 8494 } 8495 return getParam().get(0); 8496 } 8497 8498 protected void listChildren(List<Property> children) { 8499 super.listChildren(children); 8500 children.add(new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, 1, ruleId)); 8501 children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 8502 } 8503 8504 @Override 8505 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8506 switch (_hash) { 8507 case -919875273: /*ruleId*/ return new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, 1, ruleId); 8508 case 106436749: /*param*/ return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param); 8509 default: return super.getNamedProperty(_hash, _name, _checkValid); 8510 } 8511 8512 } 8513 8514 @Override 8515 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8516 switch (hash) { 8517 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 8518 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRuleParamComponent 8519 default: return super.getProperty(hash, name, checkValid); 8520 } 8521 8522 } 8523 8524 @Override 8525 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8526 switch (hash) { 8527 case -919875273: // ruleId 8528 this.ruleId = castToId(value); // IdType 8529 return value; 8530 case 106436749: // param 8531 this.getParam().add((ActionAssertRuleParamComponent) value); // ActionAssertRuleParamComponent 8532 return value; 8533 default: return super.setProperty(hash, name, value); 8534 } 8535 8536 } 8537 8538 @Override 8539 public Base setProperty(String name, Base value) throws FHIRException { 8540 if (name.equals("ruleId")) { 8541 this.ruleId = castToId(value); // IdType 8542 } else if (name.equals("param")) { 8543 this.getParam().add((ActionAssertRuleParamComponent) value); 8544 } else 8545 return super.setProperty(name, value); 8546 return value; 8547 } 8548 8549 @Override 8550 public Base makeProperty(int hash, String name) throws FHIRException { 8551 switch (hash) { 8552 case -919875273: return getRuleIdElement(); 8553 case 106436749: return addParam(); 8554 default: return super.makeProperty(hash, name); 8555 } 8556 8557 } 8558 8559 @Override 8560 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8561 switch (hash) { 8562 case -919875273: /*ruleId*/ return new String[] {"id"}; 8563 case 106436749: /*param*/ return new String[] {}; 8564 default: return super.getTypesForProperty(hash, name); 8565 } 8566 8567 } 8568 8569 @Override 8570 public Base addChild(String name) throws FHIRException { 8571 if (name.equals("ruleId")) { 8572 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 8573 } 8574 else if (name.equals("param")) { 8575 return addParam(); 8576 } 8577 else 8578 return super.addChild(name); 8579 } 8580 8581 public ActionAssertRuleComponent copy() { 8582 ActionAssertRuleComponent dst = new ActionAssertRuleComponent(); 8583 copyValues(dst); 8584 dst.ruleId = ruleId == null ? null : ruleId.copy(); 8585 if (param != null) { 8586 dst.param = new ArrayList<ActionAssertRuleParamComponent>(); 8587 for (ActionAssertRuleParamComponent i : param) 8588 dst.param.add(i.copy()); 8589 }; 8590 return dst; 8591 } 8592 8593 @Override 8594 public boolean equalsDeep(Base other_) { 8595 if (!super.equalsDeep(other_)) 8596 return false; 8597 if (!(other_ instanceof ActionAssertRuleComponent)) 8598 return false; 8599 ActionAssertRuleComponent o = (ActionAssertRuleComponent) other_; 8600 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 8601 } 8602 8603 @Override 8604 public boolean equalsShallow(Base other_) { 8605 if (!super.equalsShallow(other_)) 8606 return false; 8607 if (!(other_ instanceof ActionAssertRuleComponent)) 8608 return false; 8609 ActionAssertRuleComponent o = (ActionAssertRuleComponent) other_; 8610 return compareValues(ruleId, o.ruleId, true); 8611 } 8612 8613 public boolean isEmpty() { 8614 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 8615 } 8616 8617 public String fhirType() { 8618 return "TestScript.setup.action.assert.rule"; 8619 8620 } 8621 8622 } 8623 8624 @Block() 8625 public static class ActionAssertRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 8626 /** 8627 * Descriptive name for this parameter that matches the external assert rule parameter name. 8628 */ 8629 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8630 @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) 8631 protected StringType name; 8632 8633 /** 8634 * The value for the parameter that will be passed on to the external rule template. 8635 */ 8636 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 8637 @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." ) 8638 protected StringType value; 8639 8640 private static final long serialVersionUID = 395259392L; 8641 8642 /** 8643 * Constructor 8644 */ 8645 public ActionAssertRuleParamComponent() { 8646 super(); 8647 } 8648 8649 /** 8650 * Constructor 8651 */ 8652 public ActionAssertRuleParamComponent(StringType name, StringType value) { 8653 super(); 8654 this.name = name; 8655 this.value = value; 8656 } 8657 8658 /** 8659 * @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 8660 */ 8661 public StringType getNameElement() { 8662 if (this.name == null) 8663 if (Configuration.errorOnAutoCreate()) 8664 throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.name"); 8665 else if (Configuration.doAutoCreate()) 8666 this.name = new StringType(); // bb 8667 return this.name; 8668 } 8669 8670 public boolean hasNameElement() { 8671 return this.name != null && !this.name.isEmpty(); 8672 } 8673 8674 public boolean hasName() { 8675 return this.name != null && !this.name.isEmpty(); 8676 } 8677 8678 /** 8679 * @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 8680 */ 8681 public ActionAssertRuleParamComponent setNameElement(StringType value) { 8682 this.name = value; 8683 return this; 8684 } 8685 8686 /** 8687 * @return Descriptive name for this parameter that matches the external assert rule parameter name. 8688 */ 8689 public String getName() { 8690 return this.name == null ? null : this.name.getValue(); 8691 } 8692 8693 /** 8694 * @param value Descriptive name for this parameter that matches the external assert rule parameter name. 8695 */ 8696 public ActionAssertRuleParamComponent setName(String value) { 8697 if (this.name == null) 8698 this.name = new StringType(); 8699 this.name.setValue(value); 8700 return this; 8701 } 8702 8703 /** 8704 * @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 8705 */ 8706 public StringType getValueElement() { 8707 if (this.value == null) 8708 if (Configuration.errorOnAutoCreate()) 8709 throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.value"); 8710 else if (Configuration.doAutoCreate()) 8711 this.value = new StringType(); // bb 8712 return this.value; 8713 } 8714 8715 public boolean hasValueElement() { 8716 return this.value != null && !this.value.isEmpty(); 8717 } 8718 8719 public boolean hasValue() { 8720 return this.value != null && !this.value.isEmpty(); 8721 } 8722 8723 /** 8724 * @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 8725 */ 8726 public ActionAssertRuleParamComponent setValueElement(StringType value) { 8727 this.value = value; 8728 return this; 8729 } 8730 8731 /** 8732 * @return The value for the parameter that will be passed on to the external rule template. 8733 */ 8734 public String getValue() { 8735 return this.value == null ? null : this.value.getValue(); 8736 } 8737 8738 /** 8739 * @param value The value for the parameter that will be passed on to the external rule template. 8740 */ 8741 public ActionAssertRuleParamComponent setValue(String value) { 8742 if (this.value == null) 8743 this.value = new StringType(); 8744 this.value.setValue(value); 8745 return this; 8746 } 8747 8748 protected void listChildren(List<Property> children) { 8749 super.listChildren(children); 8750 children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name)); 8751 children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, 1, value)); 8752 } 8753 8754 @Override 8755 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8756 switch (_hash) { 8757 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name); 8758 case 111972721: /*value*/ return new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, 1, value); 8759 default: return super.getNamedProperty(_hash, _name, _checkValid); 8760 } 8761 8762 } 8763 8764 @Override 8765 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8766 switch (hash) { 8767 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 8768 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 8769 default: return super.getProperty(hash, name, checkValid); 8770 } 8771 8772 } 8773 8774 @Override 8775 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8776 switch (hash) { 8777 case 3373707: // name 8778 this.name = castToString(value); // StringType 8779 return value; 8780 case 111972721: // value 8781 this.value = castToString(value); // StringType 8782 return value; 8783 default: return super.setProperty(hash, name, value); 8784 } 8785 8786 } 8787 8788 @Override 8789 public Base setProperty(String name, Base value) throws FHIRException { 8790 if (name.equals("name")) { 8791 this.name = castToString(value); // StringType 8792 } else if (name.equals("value")) { 8793 this.value = castToString(value); // StringType 8794 } else 8795 return super.setProperty(name, value); 8796 return value; 8797 } 8798 8799 @Override 8800 public Base makeProperty(int hash, String name) throws FHIRException { 8801 switch (hash) { 8802 case 3373707: return getNameElement(); 8803 case 111972721: return getValueElement(); 8804 default: return super.makeProperty(hash, name); 8805 } 8806 8807 } 8808 8809 @Override 8810 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8811 switch (hash) { 8812 case 3373707: /*name*/ return new String[] {"string"}; 8813 case 111972721: /*value*/ return new String[] {"string"}; 8814 default: return super.getTypesForProperty(hash, name); 8815 } 8816 8817 } 8818 8819 @Override 8820 public Base addChild(String name) throws FHIRException { 8821 if (name.equals("name")) { 8822 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 8823 } 8824 else if (name.equals("value")) { 8825 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 8826 } 8827 else 8828 return super.addChild(name); 8829 } 8830 8831 public ActionAssertRuleParamComponent copy() { 8832 ActionAssertRuleParamComponent dst = new ActionAssertRuleParamComponent(); 8833 copyValues(dst); 8834 dst.name = name == null ? null : name.copy(); 8835 dst.value = value == null ? null : value.copy(); 8836 return dst; 8837 } 8838 8839 @Override 8840 public boolean equalsDeep(Base other_) { 8841 if (!super.equalsDeep(other_)) 8842 return false; 8843 if (!(other_ instanceof ActionAssertRuleParamComponent)) 8844 return false; 8845 ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other_; 8846 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 8847 } 8848 8849 @Override 8850 public boolean equalsShallow(Base other_) { 8851 if (!super.equalsShallow(other_)) 8852 return false; 8853 if (!(other_ instanceof ActionAssertRuleParamComponent)) 8854 return false; 8855 ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other_; 8856 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 8857 } 8858 8859 public boolean isEmpty() { 8860 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 8861 } 8862 8863 public String fhirType() { 8864 return "TestScript.setup.action.assert.rule.param"; 8865 8866 } 8867 8868 } 8869 8870 @Block() 8871 public static class ActionAssertRulesetComponent extends BackboneElement implements IBaseBackboneElement { 8872 /** 8873 * The TestScript.ruleset id value this assert will evaluate. 8874 */ 8875 @Child(name = "rulesetId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8876 @Description(shortDefinition="Id of the TestScript.ruleset", formalDefinition="The TestScript.ruleset id value this assert will evaluate." ) 8877 protected IdType rulesetId; 8878 8879 /** 8880 * The referenced rule within the external ruleset template. 8881 */ 8882 @Child(name = "rule", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8883 @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." ) 8884 protected List<ActionAssertRulesetRuleComponent> rule; 8885 8886 private static final long serialVersionUID = -976736025L; 8887 8888 /** 8889 * Constructor 8890 */ 8891 public ActionAssertRulesetComponent() { 8892 super(); 8893 } 8894 8895 /** 8896 * Constructor 8897 */ 8898 public ActionAssertRulesetComponent(IdType rulesetId) { 8899 super(); 8900 this.rulesetId = rulesetId; 8901 } 8902 8903 /** 8904 * @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 8905 */ 8906 public IdType getRulesetIdElement() { 8907 if (this.rulesetId == null) 8908 if (Configuration.errorOnAutoCreate()) 8909 throw new Error("Attempt to auto-create ActionAssertRulesetComponent.rulesetId"); 8910 else if (Configuration.doAutoCreate()) 8911 this.rulesetId = new IdType(); // bb 8912 return this.rulesetId; 8913 } 8914 8915 public boolean hasRulesetIdElement() { 8916 return this.rulesetId != null && !this.rulesetId.isEmpty(); 8917 } 8918 8919 public boolean hasRulesetId() { 8920 return this.rulesetId != null && !this.rulesetId.isEmpty(); 8921 } 8922 8923 /** 8924 * @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 8925 */ 8926 public ActionAssertRulesetComponent setRulesetIdElement(IdType value) { 8927 this.rulesetId = value; 8928 return this; 8929 } 8930 8931 /** 8932 * @return The TestScript.ruleset id value this assert will evaluate. 8933 */ 8934 public String getRulesetId() { 8935 return this.rulesetId == null ? null : this.rulesetId.getValue(); 8936 } 8937 8938 /** 8939 * @param value The TestScript.ruleset id value this assert will evaluate. 8940 */ 8941 public ActionAssertRulesetComponent setRulesetId(String value) { 8942 if (this.rulesetId == null) 8943 this.rulesetId = new IdType(); 8944 this.rulesetId.setValue(value); 8945 return this; 8946 } 8947 8948 /** 8949 * @return {@link #rule} (The referenced rule within the external ruleset template.) 8950 */ 8951 public List<ActionAssertRulesetRuleComponent> getRule() { 8952 if (this.rule == null) 8953 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 8954 return this.rule; 8955 } 8956 8957 /** 8958 * @return Returns a reference to <code>this</code> for easy method chaining 8959 */ 8960 public ActionAssertRulesetComponent setRule(List<ActionAssertRulesetRuleComponent> theRule) { 8961 this.rule = theRule; 8962 return this; 8963 } 8964 8965 public boolean hasRule() { 8966 if (this.rule == null) 8967 return false; 8968 for (ActionAssertRulesetRuleComponent item : this.rule) 8969 if (!item.isEmpty()) 8970 return true; 8971 return false; 8972 } 8973 8974 public ActionAssertRulesetRuleComponent addRule() { //3 8975 ActionAssertRulesetRuleComponent t = new ActionAssertRulesetRuleComponent(); 8976 if (this.rule == null) 8977 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 8978 this.rule.add(t); 8979 return t; 8980 } 8981 8982 public ActionAssertRulesetComponent addRule(ActionAssertRulesetRuleComponent t) { //3 8983 if (t == null) 8984 return this; 8985 if (this.rule == null) 8986 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 8987 this.rule.add(t); 8988 return this; 8989 } 8990 8991 /** 8992 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 8993 */ 8994 public ActionAssertRulesetRuleComponent getRuleFirstRep() { 8995 if (getRule().isEmpty()) { 8996 addRule(); 8997 } 8998 return getRule().get(0); 8999 } 9000 9001 protected void listChildren(List<Property> children) { 9002 super.listChildren(children); 9003 children.add(new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, 1, rulesetId)); 9004 children.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); 9005 } 9006 9007 @Override 9008 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9009 switch (_hash) { 9010 case -2073977951: /*rulesetId*/ return new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, 1, rulesetId); 9011 case 3512060: /*rule*/ return new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule); 9012 default: return super.getNamedProperty(_hash, _name, _checkValid); 9013 } 9014 9015 } 9016 9017 @Override 9018 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9019 switch (hash) { 9020 case -2073977951: /*rulesetId*/ return this.rulesetId == null ? new Base[0] : new Base[] {this.rulesetId}; // IdType 9021 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // ActionAssertRulesetRuleComponent 9022 default: return super.getProperty(hash, name, checkValid); 9023 } 9024 9025 } 9026 9027 @Override 9028 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9029 switch (hash) { 9030 case -2073977951: // rulesetId 9031 this.rulesetId = castToId(value); // IdType 9032 return value; 9033 case 3512060: // rule 9034 this.getRule().add((ActionAssertRulesetRuleComponent) value); // ActionAssertRulesetRuleComponent 9035 return value; 9036 default: return super.setProperty(hash, name, value); 9037 } 9038 9039 } 9040 9041 @Override 9042 public Base setProperty(String name, Base value) throws FHIRException { 9043 if (name.equals("rulesetId")) { 9044 this.rulesetId = castToId(value); // IdType 9045 } else if (name.equals("rule")) { 9046 this.getRule().add((ActionAssertRulesetRuleComponent) value); 9047 } else 9048 return super.setProperty(name, value); 9049 return value; 9050 } 9051 9052 @Override 9053 public Base makeProperty(int hash, String name) throws FHIRException { 9054 switch (hash) { 9055 case -2073977951: return getRulesetIdElement(); 9056 case 3512060: return addRule(); 9057 default: return super.makeProperty(hash, name); 9058 } 9059 9060 } 9061 9062 @Override 9063 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9064 switch (hash) { 9065 case -2073977951: /*rulesetId*/ return new String[] {"id"}; 9066 case 3512060: /*rule*/ return new String[] {}; 9067 default: return super.getTypesForProperty(hash, name); 9068 } 9069 9070 } 9071 9072 @Override 9073 public Base addChild(String name) throws FHIRException { 9074 if (name.equals("rulesetId")) { 9075 throw new FHIRException("Cannot call addChild on a primitive type TestScript.rulesetId"); 9076 } 9077 else if (name.equals("rule")) { 9078 return addRule(); 9079 } 9080 else 9081 return super.addChild(name); 9082 } 9083 9084 public ActionAssertRulesetComponent copy() { 9085 ActionAssertRulesetComponent dst = new ActionAssertRulesetComponent(); 9086 copyValues(dst); 9087 dst.rulesetId = rulesetId == null ? null : rulesetId.copy(); 9088 if (rule != null) { 9089 dst.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 9090 for (ActionAssertRulesetRuleComponent i : rule) 9091 dst.rule.add(i.copy()); 9092 }; 9093 return dst; 9094 } 9095 9096 @Override 9097 public boolean equalsDeep(Base other_) { 9098 if (!super.equalsDeep(other_)) 9099 return false; 9100 if (!(other_ instanceof ActionAssertRulesetComponent)) 9101 return false; 9102 ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other_; 9103 return compareDeep(rulesetId, o.rulesetId, true) && compareDeep(rule, o.rule, true); 9104 } 9105 9106 @Override 9107 public boolean equalsShallow(Base other_) { 9108 if (!super.equalsShallow(other_)) 9109 return false; 9110 if (!(other_ instanceof ActionAssertRulesetComponent)) 9111 return false; 9112 ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other_; 9113 return compareValues(rulesetId, o.rulesetId, true); 9114 } 9115 9116 public boolean isEmpty() { 9117 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(rulesetId, rule); 9118 } 9119 9120 public String fhirType() { 9121 return "TestScript.setup.action.assert.ruleset"; 9122 9123 } 9124 9125 } 9126 9127 @Block() 9128 public static class ActionAssertRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { 9129 /** 9130 * Id of the referenced rule within the external ruleset template. 9131 */ 9132 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 9133 @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) 9134 protected IdType ruleId; 9135 9136 /** 9137 * Each rule template can take one or more parameters for rule evaluation. 9138 */ 9139 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9140 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 9141 protected List<ActionAssertRulesetRuleParamComponent> param; 9142 9143 private static final long serialVersionUID = -1850698529L; 9144 9145 /** 9146 * Constructor 9147 */ 9148 public ActionAssertRulesetRuleComponent() { 9149 super(); 9150 } 9151 9152 /** 9153 * Constructor 9154 */ 9155 public ActionAssertRulesetRuleComponent(IdType ruleId) { 9156 super(); 9157 this.ruleId = ruleId; 9158 } 9159 9160 /** 9161 * @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 9162 */ 9163 public IdType getRuleIdElement() { 9164 if (this.ruleId == null) 9165 if (Configuration.errorOnAutoCreate()) 9166 throw new Error("Attempt to auto-create ActionAssertRulesetRuleComponent.ruleId"); 9167 else if (Configuration.doAutoCreate()) 9168 this.ruleId = new IdType(); // bb 9169 return this.ruleId; 9170 } 9171 9172 public boolean hasRuleIdElement() { 9173 return this.ruleId != null && !this.ruleId.isEmpty(); 9174 } 9175 9176 public boolean hasRuleId() { 9177 return this.ruleId != null && !this.ruleId.isEmpty(); 9178 } 9179 9180 /** 9181 * @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 9182 */ 9183 public ActionAssertRulesetRuleComponent setRuleIdElement(IdType value) { 9184 this.ruleId = value; 9185 return this; 9186 } 9187 9188 /** 9189 * @return Id of the referenced rule within the external ruleset template. 9190 */ 9191 public String getRuleId() { 9192 return this.ruleId == null ? null : this.ruleId.getValue(); 9193 } 9194 9195 /** 9196 * @param value Id of the referenced rule within the external ruleset template. 9197 */ 9198 public ActionAssertRulesetRuleComponent setRuleId(String value) { 9199 if (this.ruleId == null) 9200 this.ruleId = new IdType(); 9201 this.ruleId.setValue(value); 9202 return this; 9203 } 9204 9205 /** 9206 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 9207 */ 9208 public List<ActionAssertRulesetRuleParamComponent> getParam() { 9209 if (this.param == null) 9210 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9211 return this.param; 9212 } 9213 9214 /** 9215 * @return Returns a reference to <code>this</code> for easy method chaining 9216 */ 9217 public ActionAssertRulesetRuleComponent setParam(List<ActionAssertRulesetRuleParamComponent> theParam) { 9218 this.param = theParam; 9219 return this; 9220 } 9221 9222 public boolean hasParam() { 9223 if (this.param == null) 9224 return false; 9225 for (ActionAssertRulesetRuleParamComponent item : this.param) 9226 if (!item.isEmpty()) 9227 return true; 9228 return false; 9229 } 9230 9231 public ActionAssertRulesetRuleParamComponent addParam() { //3 9232 ActionAssertRulesetRuleParamComponent t = new ActionAssertRulesetRuleParamComponent(); 9233 if (this.param == null) 9234 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9235 this.param.add(t); 9236 return t; 9237 } 9238 9239 public ActionAssertRulesetRuleComponent addParam(ActionAssertRulesetRuleParamComponent t) { //3 9240 if (t == null) 9241 return this; 9242 if (this.param == null) 9243 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9244 this.param.add(t); 9245 return this; 9246 } 9247 9248 /** 9249 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 9250 */ 9251 public ActionAssertRulesetRuleParamComponent getParamFirstRep() { 9252 if (getParam().isEmpty()) { 9253 addParam(); 9254 } 9255 return getParam().get(0); 9256 } 9257 9258 protected void listChildren(List<Property> children) { 9259 super.listChildren(children); 9260 children.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId)); 9261 children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 9262 } 9263 9264 @Override 9265 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9266 switch (_hash) { 9267 case -919875273: /*ruleId*/ return new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId); 9268 case 106436749: /*param*/ return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param); 9269 default: return super.getNamedProperty(_hash, _name, _checkValid); 9270 } 9271 9272 } 9273 9274 @Override 9275 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9276 switch (hash) { 9277 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 9278 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRulesetRuleParamComponent 9279 default: return super.getProperty(hash, name, checkValid); 9280 } 9281 9282 } 9283 9284 @Override 9285 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9286 switch (hash) { 9287 case -919875273: // ruleId 9288 this.ruleId = castToId(value); // IdType 9289 return value; 9290 case 106436749: // param 9291 this.getParam().add((ActionAssertRulesetRuleParamComponent) value); // ActionAssertRulesetRuleParamComponent 9292 return value; 9293 default: return super.setProperty(hash, name, value); 9294 } 9295 9296 } 9297 9298 @Override 9299 public Base setProperty(String name, Base value) throws FHIRException { 9300 if (name.equals("ruleId")) { 9301 this.ruleId = castToId(value); // IdType 9302 } else if (name.equals("param")) { 9303 this.getParam().add((ActionAssertRulesetRuleParamComponent) value); 9304 } else 9305 return super.setProperty(name, value); 9306 return value; 9307 } 9308 9309 @Override 9310 public Base makeProperty(int hash, String name) throws FHIRException { 9311 switch (hash) { 9312 case -919875273: return getRuleIdElement(); 9313 case 106436749: return addParam(); 9314 default: return super.makeProperty(hash, name); 9315 } 9316 9317 } 9318 9319 @Override 9320 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9321 switch (hash) { 9322 case -919875273: /*ruleId*/ return new String[] {"id"}; 9323 case 106436749: /*param*/ return new String[] {}; 9324 default: return super.getTypesForProperty(hash, name); 9325 } 9326 9327 } 9328 9329 @Override 9330 public Base addChild(String name) throws FHIRException { 9331 if (name.equals("ruleId")) { 9332 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 9333 } 9334 else if (name.equals("param")) { 9335 return addParam(); 9336 } 9337 else 9338 return super.addChild(name); 9339 } 9340 9341 public ActionAssertRulesetRuleComponent copy() { 9342 ActionAssertRulesetRuleComponent dst = new ActionAssertRulesetRuleComponent(); 9343 copyValues(dst); 9344 dst.ruleId = ruleId == null ? null : ruleId.copy(); 9345 if (param != null) { 9346 dst.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9347 for (ActionAssertRulesetRuleParamComponent i : param) 9348 dst.param.add(i.copy()); 9349 }; 9350 return dst; 9351 } 9352 9353 @Override 9354 public boolean equalsDeep(Base other_) { 9355 if (!super.equalsDeep(other_)) 9356 return false; 9357 if (!(other_ instanceof ActionAssertRulesetRuleComponent)) 9358 return false; 9359 ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other_; 9360 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 9361 } 9362 9363 @Override 9364 public boolean equalsShallow(Base other_) { 9365 if (!super.equalsShallow(other_)) 9366 return false; 9367 if (!(other_ instanceof ActionAssertRulesetRuleComponent)) 9368 return false; 9369 ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other_; 9370 return compareValues(ruleId, o.ruleId, true); 9371 } 9372 9373 public boolean isEmpty() { 9374 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 9375 } 9376 9377 public String fhirType() { 9378 return "TestScript.setup.action.assert.ruleset.rule"; 9379 9380 } 9381 9382 } 9383 9384 @Block() 9385 public static class ActionAssertRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 9386 /** 9387 * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9388 */ 9389 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 9390 @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." ) 9391 protected StringType name; 9392 9393 /** 9394 * The value for the parameter that will be passed on to the external ruleset rule template. 9395 */ 9396 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 9397 @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." ) 9398 protected StringType value; 9399 9400 private static final long serialVersionUID = 395259392L; 9401 9402 /** 9403 * Constructor 9404 */ 9405 public ActionAssertRulesetRuleParamComponent() { 9406 super(); 9407 } 9408 9409 /** 9410 * Constructor 9411 */ 9412 public ActionAssertRulesetRuleParamComponent(StringType name, StringType value) { 9413 super(); 9414 this.name = name; 9415 this.value = value; 9416 } 9417 9418 /** 9419 * @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 9420 */ 9421 public StringType getNameElement() { 9422 if (this.name == null) 9423 if (Configuration.errorOnAutoCreate()) 9424 throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.name"); 9425 else if (Configuration.doAutoCreate()) 9426 this.name = new StringType(); // bb 9427 return this.name; 9428 } 9429 9430 public boolean hasNameElement() { 9431 return this.name != null && !this.name.isEmpty(); 9432 } 9433 9434 public boolean hasName() { 9435 return this.name != null && !this.name.isEmpty(); 9436 } 9437 9438 /** 9439 * @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 9440 */ 9441 public ActionAssertRulesetRuleParamComponent setNameElement(StringType value) { 9442 this.name = value; 9443 return this; 9444 } 9445 9446 /** 9447 * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9448 */ 9449 public String getName() { 9450 return this.name == null ? null : this.name.getValue(); 9451 } 9452 9453 /** 9454 * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9455 */ 9456 public ActionAssertRulesetRuleParamComponent setName(String value) { 9457 if (this.name == null) 9458 this.name = new StringType(); 9459 this.name.setValue(value); 9460 return this; 9461 } 9462 9463 /** 9464 * @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 9465 */ 9466 public StringType getValueElement() { 9467 if (this.value == null) 9468 if (Configuration.errorOnAutoCreate()) 9469 throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.value"); 9470 else if (Configuration.doAutoCreate()) 9471 this.value = new StringType(); // bb 9472 return this.value; 9473 } 9474 9475 public boolean hasValueElement() { 9476 return this.value != null && !this.value.isEmpty(); 9477 } 9478 9479 public boolean hasValue() { 9480 return this.value != null && !this.value.isEmpty(); 9481 } 9482 9483 /** 9484 * @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 9485 */ 9486 public ActionAssertRulesetRuleParamComponent setValueElement(StringType value) { 9487 this.value = value; 9488 return this; 9489 } 9490 9491 /** 9492 * @return The value for the parameter that will be passed on to the external ruleset rule template. 9493 */ 9494 public String getValue() { 9495 return this.value == null ? null : this.value.getValue(); 9496 } 9497 9498 /** 9499 * @param value The value for the parameter that will be passed on to the external ruleset rule template. 9500 */ 9501 public ActionAssertRulesetRuleParamComponent setValue(String value) { 9502 if (this.value == null) 9503 this.value = new StringType(); 9504 this.value.setValue(value); 9505 return this; 9506 } 9507 9508 protected void listChildren(List<Property> children) { 9509 super.listChildren(children); 9510 children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name)); 9511 children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value)); 9512 } 9513 9514 @Override 9515 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9516 switch (_hash) { 9517 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name); 9518 case 111972721: /*value*/ return new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value); 9519 default: return super.getNamedProperty(_hash, _name, _checkValid); 9520 } 9521 9522 } 9523 9524 @Override 9525 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9526 switch (hash) { 9527 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 9528 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 9529 default: return super.getProperty(hash, name, checkValid); 9530 } 9531 9532 } 9533 9534 @Override 9535 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9536 switch (hash) { 9537 case 3373707: // name 9538 this.name = castToString(value); // StringType 9539 return value; 9540 case 111972721: // value 9541 this.value = castToString(value); // StringType 9542 return value; 9543 default: return super.setProperty(hash, name, value); 9544 } 9545 9546 } 9547 9548 @Override 9549 public Base setProperty(String name, Base value) throws FHIRException { 9550 if (name.equals("name")) { 9551 this.name = castToString(value); // StringType 9552 } else if (name.equals("value")) { 9553 this.value = castToString(value); // StringType 9554 } else 9555 return super.setProperty(name, value); 9556 return value; 9557 } 9558 9559 @Override 9560 public Base makeProperty(int hash, String name) throws FHIRException { 9561 switch (hash) { 9562 case 3373707: return getNameElement(); 9563 case 111972721: return getValueElement(); 9564 default: return super.makeProperty(hash, name); 9565 } 9566 9567 } 9568 9569 @Override 9570 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9571 switch (hash) { 9572 case 3373707: /*name*/ return new String[] {"string"}; 9573 case 111972721: /*value*/ return new String[] {"string"}; 9574 default: return super.getTypesForProperty(hash, name); 9575 } 9576 9577 } 9578 9579 @Override 9580 public Base addChild(String name) throws FHIRException { 9581 if (name.equals("name")) { 9582 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 9583 } 9584 else if (name.equals("value")) { 9585 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 9586 } 9587 else 9588 return super.addChild(name); 9589 } 9590 9591 public ActionAssertRulesetRuleParamComponent copy() { 9592 ActionAssertRulesetRuleParamComponent dst = new ActionAssertRulesetRuleParamComponent(); 9593 copyValues(dst); 9594 dst.name = name == null ? null : name.copy(); 9595 dst.value = value == null ? null : value.copy(); 9596 return dst; 9597 } 9598 9599 @Override 9600 public boolean equalsDeep(Base other_) { 9601 if (!super.equalsDeep(other_)) 9602 return false; 9603 if (!(other_ instanceof ActionAssertRulesetRuleParamComponent)) 9604 return false; 9605 ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other_; 9606 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 9607 } 9608 9609 @Override 9610 public boolean equalsShallow(Base other_) { 9611 if (!super.equalsShallow(other_)) 9612 return false; 9613 if (!(other_ instanceof ActionAssertRulesetRuleParamComponent)) 9614 return false; 9615 ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other_; 9616 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 9617 } 9618 9619 public boolean isEmpty() { 9620 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 9621 } 9622 9623 public String fhirType() { 9624 return "TestScript.setup.action.assert.ruleset.rule.param"; 9625 9626 } 9627 9628 } 9629 9630 @Block() 9631 public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement { 9632 /** 9633 * The name of this test used for tracking/logging purposes by test engines. 9634 */ 9635 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 9636 @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." ) 9637 protected StringType name; 9638 9639 /** 9640 * A short description of the test used by test engines for tracking and reporting purposes. 9641 */ 9642 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 9643 @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." ) 9644 protected StringType description; 9645 9646 /** 9647 * Action would contain either an operation or an assertion. 9648 */ 9649 @Child(name = "action", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9650 @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 9651 protected List<TestActionComponent> action; 9652 9653 private static final long serialVersionUID = -865006110L; 9654 9655 /** 9656 * Constructor 9657 */ 9658 public TestScriptTestComponent() { 9659 super(); 9660 } 9661 9662 /** 9663 * @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 9664 */ 9665 public StringType getNameElement() { 9666 if (this.name == null) 9667 if (Configuration.errorOnAutoCreate()) 9668 throw new Error("Attempt to auto-create TestScriptTestComponent.name"); 9669 else if (Configuration.doAutoCreate()) 9670 this.name = new StringType(); // bb 9671 return this.name; 9672 } 9673 9674 public boolean hasNameElement() { 9675 return this.name != null && !this.name.isEmpty(); 9676 } 9677 9678 public boolean hasName() { 9679 return this.name != null && !this.name.isEmpty(); 9680 } 9681 9682 /** 9683 * @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 9684 */ 9685 public TestScriptTestComponent setNameElement(StringType value) { 9686 this.name = value; 9687 return this; 9688 } 9689 9690 /** 9691 * @return The name of this test used for tracking/logging purposes by test engines. 9692 */ 9693 public String getName() { 9694 return this.name == null ? null : this.name.getValue(); 9695 } 9696 9697 /** 9698 * @param value The name of this test used for tracking/logging purposes by test engines. 9699 */ 9700 public TestScriptTestComponent setName(String value) { 9701 if (Utilities.noString(value)) 9702 this.name = null; 9703 else { 9704 if (this.name == null) 9705 this.name = new StringType(); 9706 this.name.setValue(value); 9707 } 9708 return this; 9709 } 9710 9711 /** 9712 * @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 9713 */ 9714 public StringType getDescriptionElement() { 9715 if (this.description == null) 9716 if (Configuration.errorOnAutoCreate()) 9717 throw new Error("Attempt to auto-create TestScriptTestComponent.description"); 9718 else if (Configuration.doAutoCreate()) 9719 this.description = new StringType(); // bb 9720 return this.description; 9721 } 9722 9723 public boolean hasDescriptionElement() { 9724 return this.description != null && !this.description.isEmpty(); 9725 } 9726 9727 public boolean hasDescription() { 9728 return this.description != null && !this.description.isEmpty(); 9729 } 9730 9731 /** 9732 * @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 9733 */ 9734 public TestScriptTestComponent setDescriptionElement(StringType value) { 9735 this.description = value; 9736 return this; 9737 } 9738 9739 /** 9740 * @return A short description of the test used by test engines for tracking and reporting purposes. 9741 */ 9742 public String getDescription() { 9743 return this.description == null ? null : this.description.getValue(); 9744 } 9745 9746 /** 9747 * @param value A short description of the test used by test engines for tracking and reporting purposes. 9748 */ 9749 public TestScriptTestComponent setDescription(String value) { 9750 if (Utilities.noString(value)) 9751 this.description = null; 9752 else { 9753 if (this.description == null) 9754 this.description = new StringType(); 9755 this.description.setValue(value); 9756 } 9757 return this; 9758 } 9759 9760 /** 9761 * @return {@link #action} (Action would contain either an operation or an assertion.) 9762 */ 9763 public List<TestActionComponent> getAction() { 9764 if (this.action == null) 9765 this.action = new ArrayList<TestActionComponent>(); 9766 return this.action; 9767 } 9768 9769 /** 9770 * @return Returns a reference to <code>this</code> for easy method chaining 9771 */ 9772 public TestScriptTestComponent setAction(List<TestActionComponent> theAction) { 9773 this.action = theAction; 9774 return this; 9775 } 9776 9777 public boolean hasAction() { 9778 if (this.action == null) 9779 return false; 9780 for (TestActionComponent item : this.action) 9781 if (!item.isEmpty()) 9782 return true; 9783 return false; 9784 } 9785 9786 public TestActionComponent addAction() { //3 9787 TestActionComponent t = new TestActionComponent(); 9788 if (this.action == null) 9789 this.action = new ArrayList<TestActionComponent>(); 9790 this.action.add(t); 9791 return t; 9792 } 9793 9794 public TestScriptTestComponent addAction(TestActionComponent t) { //3 9795 if (t == null) 9796 return this; 9797 if (this.action == null) 9798 this.action = new ArrayList<TestActionComponent>(); 9799 this.action.add(t); 9800 return this; 9801 } 9802 9803 /** 9804 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 9805 */ 9806 public TestActionComponent getActionFirstRep() { 9807 if (getAction().isEmpty()) { 9808 addAction(); 9809 } 9810 return getAction().get(0); 9811 } 9812 9813 protected void listChildren(List<Property> children) { 9814 super.listChildren(children); 9815 children.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name)); 9816 children.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1, description)); 9817 children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 9818 } 9819 9820 @Override 9821 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9822 switch (_hash) { 9823 case 3373707: /*name*/ return new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name); 9824 case -1724546052: /*description*/ return new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1, description); 9825 case -1422950858: /*action*/ return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action); 9826 default: return super.getNamedProperty(_hash, _name, _checkValid); 9827 } 9828 9829 } 9830 9831 @Override 9832 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9833 switch (hash) { 9834 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 9835 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 9836 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent 9837 default: return super.getProperty(hash, name, checkValid); 9838 } 9839 9840 } 9841 9842 @Override 9843 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9844 switch (hash) { 9845 case 3373707: // name 9846 this.name = castToString(value); // StringType 9847 return value; 9848 case -1724546052: // description 9849 this.description = castToString(value); // StringType 9850 return value; 9851 case -1422950858: // action 9852 this.getAction().add((TestActionComponent) value); // TestActionComponent 9853 return value; 9854 default: return super.setProperty(hash, name, value); 9855 } 9856 9857 } 9858 9859 @Override 9860 public Base setProperty(String name, Base value) throws FHIRException { 9861 if (name.equals("name")) { 9862 this.name = castToString(value); // StringType 9863 } else if (name.equals("description")) { 9864 this.description = castToString(value); // StringType 9865 } else if (name.equals("action")) { 9866 this.getAction().add((TestActionComponent) value); 9867 } else 9868 return super.setProperty(name, value); 9869 return value; 9870 } 9871 9872 @Override 9873 public Base makeProperty(int hash, String name) throws FHIRException { 9874 switch (hash) { 9875 case 3373707: return getNameElement(); 9876 case -1724546052: return getDescriptionElement(); 9877 case -1422950858: return addAction(); 9878 default: return super.makeProperty(hash, name); 9879 } 9880 9881 } 9882 9883 @Override 9884 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9885 switch (hash) { 9886 case 3373707: /*name*/ return new String[] {"string"}; 9887 case -1724546052: /*description*/ return new String[] {"string"}; 9888 case -1422950858: /*action*/ return new String[] {}; 9889 default: return super.getTypesForProperty(hash, name); 9890 } 9891 9892 } 9893 9894 @Override 9895 public Base addChild(String name) throws FHIRException { 9896 if (name.equals("name")) { 9897 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 9898 } 9899 else if (name.equals("description")) { 9900 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 9901 } 9902 else if (name.equals("action")) { 9903 return addAction(); 9904 } 9905 else 9906 return super.addChild(name); 9907 } 9908 9909 public TestScriptTestComponent copy() { 9910 TestScriptTestComponent dst = new TestScriptTestComponent(); 9911 copyValues(dst); 9912 dst.name = name == null ? null : name.copy(); 9913 dst.description = description == null ? null : description.copy(); 9914 if (action != null) { 9915 dst.action = new ArrayList<TestActionComponent>(); 9916 for (TestActionComponent i : action) 9917 dst.action.add(i.copy()); 9918 }; 9919 return dst; 9920 } 9921 9922 @Override 9923 public boolean equalsDeep(Base other_) { 9924 if (!super.equalsDeep(other_)) 9925 return false; 9926 if (!(other_ instanceof TestScriptTestComponent)) 9927 return false; 9928 TestScriptTestComponent o = (TestScriptTestComponent) other_; 9929 return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(action, o.action, true) 9930 ; 9931 } 9932 9933 @Override 9934 public boolean equalsShallow(Base other_) { 9935 if (!super.equalsShallow(other_)) 9936 return false; 9937 if (!(other_ instanceof TestScriptTestComponent)) 9938 return false; 9939 TestScriptTestComponent o = (TestScriptTestComponent) other_; 9940 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 9941 } 9942 9943 public boolean isEmpty() { 9944 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action 9945 ); 9946 } 9947 9948 public String fhirType() { 9949 return "TestScript.test"; 9950 9951 } 9952 9953 } 9954 9955 @Block() 9956 public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement { 9957 /** 9958 * An operation would involve a REST request to a server. 9959 */ 9960 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 9961 @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 9962 protected SetupActionOperationComponent operation; 9963 9964 /** 9965 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 9966 */ 9967 @Child(name = "assert", type = {SetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false) 9968 @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 9969 protected SetupActionAssertComponent assert_; 9970 9971 private static final long serialVersionUID = -252088305L; 9972 9973 /** 9974 * Constructor 9975 */ 9976 public TestActionComponent() { 9977 super(); 9978 } 9979 9980 /** 9981 * @return {@link #operation} (An operation would involve a REST request to a server.) 9982 */ 9983 public SetupActionOperationComponent getOperation() { 9984 if (this.operation == null) 9985 if (Configuration.errorOnAutoCreate()) 9986 throw new Error("Attempt to auto-create TestActionComponent.operation"); 9987 else if (Configuration.doAutoCreate()) 9988 this.operation = new SetupActionOperationComponent(); // cc 9989 return this.operation; 9990 } 9991 9992 public boolean hasOperation() { 9993 return this.operation != null && !this.operation.isEmpty(); 9994 } 9995 9996 /** 9997 * @param value {@link #operation} (An operation would involve a REST request to a server.) 9998 */ 9999 public TestActionComponent setOperation(SetupActionOperationComponent value) { 10000 this.operation = value; 10001 return this; 10002 } 10003 10004 /** 10005 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 10006 */ 10007 public SetupActionAssertComponent getAssert() { 10008 if (this.assert_ == null) 10009 if (Configuration.errorOnAutoCreate()) 10010 throw new Error("Attempt to auto-create TestActionComponent.assert_"); 10011 else if (Configuration.doAutoCreate()) 10012 this.assert_ = new SetupActionAssertComponent(); // cc 10013 return this.assert_; 10014 } 10015 10016 public boolean hasAssert() { 10017 return this.assert_ != null && !this.assert_.isEmpty(); 10018 } 10019 10020 /** 10021 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 10022 */ 10023 public TestActionComponent setAssert(SetupActionAssertComponent value) { 10024 this.assert_ = value; 10025 return this; 10026 } 10027 10028 protected void listChildren(List<Property> children) { 10029 super.listChildren(children); 10030 children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation)); 10031 children.add(new Property("assert", "@TestScript.setup.action.assert", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_)); 10032 } 10033 10034 @Override 10035 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 10036 switch (_hash) { 10037 case 1662702951: /*operation*/ return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation); 10038 case -1408208058: /*assert*/ return new Property("assert", "@TestScript.setup.action.assert", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_); 10039 default: return super.getNamedProperty(_hash, _name, _checkValid); 10040 } 10041 10042 } 10043 10044 @Override 10045 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10046 switch (hash) { 10047 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 10048 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 10049 default: return super.getProperty(hash, name, checkValid); 10050 } 10051 10052 } 10053 10054 @Override 10055 public Base setProperty(int hash, String name, Base value) throws FHIRException { 10056 switch (hash) { 10057 case 1662702951: // operation 10058 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10059 return value; 10060 case -1408208058: // assert 10061 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 10062 return value; 10063 default: return super.setProperty(hash, name, value); 10064 } 10065 10066 } 10067 10068 @Override 10069 public Base setProperty(String name, Base value) throws FHIRException { 10070 if (name.equals("operation")) { 10071 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10072 } else if (name.equals("assert")) { 10073 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 10074 } else 10075 return super.setProperty(name, value); 10076 return value; 10077 } 10078 10079 @Override 10080 public Base makeProperty(int hash, String name) throws FHIRException { 10081 switch (hash) { 10082 case 1662702951: return getOperation(); 10083 case -1408208058: return getAssert(); 10084 default: return super.makeProperty(hash, name); 10085 } 10086 10087 } 10088 10089 @Override 10090 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 10091 switch (hash) { 10092 case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"}; 10093 case -1408208058: /*assert*/ return new String[] {"@TestScript.setup.action.assert"}; 10094 default: return super.getTypesForProperty(hash, name); 10095 } 10096 10097 } 10098 10099 @Override 10100 public Base addChild(String name) throws FHIRException { 10101 if (name.equals("operation")) { 10102 this.operation = new SetupActionOperationComponent(); 10103 return this.operation; 10104 } 10105 else if (name.equals("assert")) { 10106 this.assert_ = new SetupActionAssertComponent(); 10107 return this.assert_; 10108 } 10109 else 10110 return super.addChild(name); 10111 } 10112 10113 public TestActionComponent copy() { 10114 TestActionComponent dst = new TestActionComponent(); 10115 copyValues(dst); 10116 dst.operation = operation == null ? null : operation.copy(); 10117 dst.assert_ = assert_ == null ? null : assert_.copy(); 10118 return dst; 10119 } 10120 10121 @Override 10122 public boolean equalsDeep(Base other_) { 10123 if (!super.equalsDeep(other_)) 10124 return false; 10125 if (!(other_ instanceof TestActionComponent)) 10126 return false; 10127 TestActionComponent o = (TestActionComponent) other_; 10128 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 10129 } 10130 10131 @Override 10132 public boolean equalsShallow(Base other_) { 10133 if (!super.equalsShallow(other_)) 10134 return false; 10135 if (!(other_ instanceof TestActionComponent)) 10136 return false; 10137 TestActionComponent o = (TestActionComponent) other_; 10138 return true; 10139 } 10140 10141 public boolean isEmpty() { 10142 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_); 10143 } 10144 10145 public String fhirType() { 10146 return "TestScript.test.action"; 10147 10148 } 10149 10150 } 10151 10152 @Block() 10153 public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement { 10154 /** 10155 * The teardown action will only contain an operation. 10156 */ 10157 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10158 @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." ) 10159 protected List<TeardownActionComponent> action; 10160 10161 private static final long serialVersionUID = 1168638089L; 10162 10163 /** 10164 * Constructor 10165 */ 10166 public TestScriptTeardownComponent() { 10167 super(); 10168 } 10169 10170 /** 10171 * @return {@link #action} (The teardown action will only contain an operation.) 10172 */ 10173 public List<TeardownActionComponent> getAction() { 10174 if (this.action == null) 10175 this.action = new ArrayList<TeardownActionComponent>(); 10176 return this.action; 10177 } 10178 10179 /** 10180 * @return Returns a reference to <code>this</code> for easy method chaining 10181 */ 10182 public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) { 10183 this.action = theAction; 10184 return this; 10185 } 10186 10187 public boolean hasAction() { 10188 if (this.action == null) 10189 return false; 10190 for (TeardownActionComponent item : this.action) 10191 if (!item.isEmpty()) 10192 return true; 10193 return false; 10194 } 10195 10196 public TeardownActionComponent addAction() { //3 10197 TeardownActionComponent t = new TeardownActionComponent(); 10198 if (this.action == null) 10199 this.action = new ArrayList<TeardownActionComponent>(); 10200 this.action.add(t); 10201 return t; 10202 } 10203 10204 public TestScriptTeardownComponent addAction(TeardownActionComponent t) { //3 10205 if (t == null) 10206 return this; 10207 if (this.action == null) 10208 this.action = new ArrayList<TeardownActionComponent>(); 10209 this.action.add(t); 10210 return this; 10211 } 10212 10213 /** 10214 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 10215 */ 10216 public TeardownActionComponent getActionFirstRep() { 10217 if (getAction().isEmpty()) { 10218 addAction(); 10219 } 10220 return getAction().get(0); 10221 } 10222 10223 protected void listChildren(List<Property> children) { 10224 super.listChildren(children); 10225 children.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action)); 10226 } 10227 10228 @Override 10229 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 10230 switch (_hash) { 10231 case -1422950858: /*action*/ return new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action); 10232 default: return super.getNamedProperty(_hash, _name, _checkValid); 10233 } 10234 10235 } 10236 10237 @Override 10238 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10239 switch (hash) { 10240 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent 10241 default: return super.getProperty(hash, name, checkValid); 10242 } 10243 10244 } 10245 10246 @Override 10247 public Base setProperty(int hash, String name, Base value) throws FHIRException { 10248 switch (hash) { 10249 case -1422950858: // action 10250 this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent 10251 return value; 10252 default: return super.setProperty(hash, name, value); 10253 } 10254 10255 } 10256 10257 @Override 10258 public Base setProperty(String name, Base value) throws FHIRException { 10259 if (name.equals("action")) { 10260 this.getAction().add((TeardownActionComponent) value); 10261 } else 10262 return super.setProperty(name, value); 10263 return value; 10264 } 10265 10266 @Override 10267 public Base makeProperty(int hash, String name) throws FHIRException { 10268 switch (hash) { 10269 case -1422950858: return addAction(); 10270 default: return super.makeProperty(hash, name); 10271 } 10272 10273 } 10274 10275 @Override 10276 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 10277 switch (hash) { 10278 case -1422950858: /*action*/ return new String[] {}; 10279 default: return super.getTypesForProperty(hash, name); 10280 } 10281 10282 } 10283 10284 @Override 10285 public Base addChild(String name) throws FHIRException { 10286 if (name.equals("action")) { 10287 return addAction(); 10288 } 10289 else 10290 return super.addChild(name); 10291 } 10292 10293 public TestScriptTeardownComponent copy() { 10294 TestScriptTeardownComponent dst = new TestScriptTeardownComponent(); 10295 copyValues(dst); 10296 if (action != null) { 10297 dst.action = new ArrayList<TeardownActionComponent>(); 10298 for (TeardownActionComponent i : action) 10299 dst.action.add(i.copy()); 10300 }; 10301 return dst; 10302 } 10303 10304 @Override 10305 public boolean equalsDeep(Base other_) { 10306 if (!super.equalsDeep(other_)) 10307 return false; 10308 if (!(other_ instanceof TestScriptTeardownComponent)) 10309 return false; 10310 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_; 10311 return compareDeep(action, o.action, true); 10312 } 10313 10314 @Override 10315 public boolean equalsShallow(Base other_) { 10316 if (!super.equalsShallow(other_)) 10317 return false; 10318 if (!(other_ instanceof TestScriptTeardownComponent)) 10319 return false; 10320 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_; 10321 return true; 10322 } 10323 10324 public boolean isEmpty() { 10325 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action); 10326 } 10327 10328 public String fhirType() { 10329 return "TestScript.teardown"; 10330 10331 } 10332 10333 } 10334 10335 @Block() 10336 public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement { 10337 /** 10338 * An operation would involve a REST request to a server. 10339 */ 10340 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=1, max=1, modifier=false, summary=false) 10341 @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 10342 protected SetupActionOperationComponent operation; 10343 10344 private static final long serialVersionUID = -1099598054L; 10345 10346 /** 10347 * Constructor 10348 */ 10349 public TeardownActionComponent() { 10350 super(); 10351 } 10352 10353 /** 10354 * Constructor 10355 */ 10356 public TeardownActionComponent(SetupActionOperationComponent operation) { 10357 super(); 10358 this.operation = operation; 10359 } 10360 10361 /** 10362 * @return {@link #operation} (An operation would involve a REST request to a server.) 10363 */ 10364 public SetupActionOperationComponent getOperation() { 10365 if (this.operation == null) 10366 if (Configuration.errorOnAutoCreate()) 10367 throw new Error("Attempt to auto-create TeardownActionComponent.operation"); 10368 else if (Configuration.doAutoCreate()) 10369 this.operation = new SetupActionOperationComponent(); // cc 10370 return this.operation; 10371 } 10372 10373 public boolean hasOperation() { 10374 return this.operation != null && !this.operation.isEmpty(); 10375 } 10376 10377 /** 10378 * @param value {@link #operation} (An operation would involve a REST request to a server.) 10379 */ 10380 public TeardownActionComponent setOperation(SetupActionOperationComponent value) { 10381 this.operation = value; 10382 return this; 10383 } 10384 10385 protected void listChildren(List<Property> children) { 10386 super.listChildren(children); 10387 children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation)); 10388 } 10389 10390 @Override 10391 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 10392 switch (_hash) { 10393 case 1662702951: /*operation*/ return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation); 10394 default: return super.getNamedProperty(_hash, _name, _checkValid); 10395 } 10396 10397 } 10398 10399 @Override 10400 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10401 switch (hash) { 10402 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 10403 default: return super.getProperty(hash, name, checkValid); 10404 } 10405 10406 } 10407 10408 @Override 10409 public Base setProperty(int hash, String name, Base value) throws FHIRException { 10410 switch (hash) { 10411 case 1662702951: // operation 10412 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10413 return value; 10414 default: return super.setProperty(hash, name, value); 10415 } 10416 10417 } 10418 10419 @Override 10420 public Base setProperty(String name, Base value) throws FHIRException { 10421 if (name.equals("operation")) { 10422 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10423 } else 10424 return super.setProperty(name, value); 10425 return value; 10426 } 10427 10428 @Override 10429 public Base makeProperty(int hash, String name) throws FHIRException { 10430 switch (hash) { 10431 case 1662702951: return getOperation(); 10432 default: return super.makeProperty(hash, name); 10433 } 10434 10435 } 10436 10437 @Override 10438 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 10439 switch (hash) { 10440 case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"}; 10441 default: return super.getTypesForProperty(hash, name); 10442 } 10443 10444 } 10445 10446 @Override 10447 public Base addChild(String name) throws FHIRException { 10448 if (name.equals("operation")) { 10449 this.operation = new SetupActionOperationComponent(); 10450 return this.operation; 10451 } 10452 else 10453 return super.addChild(name); 10454 } 10455 10456 public TeardownActionComponent copy() { 10457 TeardownActionComponent dst = new TeardownActionComponent(); 10458 copyValues(dst); 10459 dst.operation = operation == null ? null : operation.copy(); 10460 return dst; 10461 } 10462 10463 @Override 10464 public boolean equalsDeep(Base other_) { 10465 if (!super.equalsDeep(other_)) 10466 return false; 10467 if (!(other_ instanceof TeardownActionComponent)) 10468 return false; 10469 TeardownActionComponent o = (TeardownActionComponent) other_; 10470 return compareDeep(operation, o.operation, true); 10471 } 10472 10473 @Override 10474 public boolean equalsShallow(Base other_) { 10475 if (!super.equalsShallow(other_)) 10476 return false; 10477 if (!(other_ instanceof TeardownActionComponent)) 10478 return false; 10479 TeardownActionComponent o = (TeardownActionComponent) other_; 10480 return true; 10481 } 10482 10483 public boolean isEmpty() { 10484 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation); 10485 } 10486 10487 public String fhirType() { 10488 return "TestScript.teardown.action"; 10489 10490 } 10491 10492 } 10493 10494 /** 10495 * 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. 10496 */ 10497 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 10498 @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." ) 10499 protected Identifier identifier; 10500 10501 /** 10502 * Explaination of why this test script is needed and why it has been designed as it has. 10503 */ 10504 @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false) 10505 @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." ) 10506 protected MarkdownType purpose; 10507 10508 /** 10509 * 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. 10510 */ 10511 @Child(name = "copyright", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 10512 @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." ) 10513 protected MarkdownType copyright; 10514 10515 /** 10516 * An abstract server used in operations within this test script in the origin element. 10517 */ 10518 @Child(name = "origin", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10519 @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." ) 10520 protected List<TestScriptOriginComponent> origin; 10521 10522 /** 10523 * An abstract server used in operations within this test script in the destination element. 10524 */ 10525 @Child(name = "destination", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10526 @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." ) 10527 protected List<TestScriptDestinationComponent> destination; 10528 10529 /** 10530 * The required capability must exist and are assumed to function correctly on the FHIR server being tested. 10531 */ 10532 @Child(name = "metadata", type = {}, order=5, min=0, max=1, modifier=false, summary=false) 10533 @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." ) 10534 protected TestScriptMetadataComponent metadata; 10535 10536 /** 10537 * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute. 10538 */ 10539 @Child(name = "fixture", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10540 @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." ) 10541 protected List<TestScriptFixtureComponent> fixture; 10542 10543 /** 10544 * Reference to the profile to be used for validation. 10545 */ 10546 @Child(name = "profile", type = {Reference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10547 @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." ) 10548 protected List<Reference> profile; 10549 /** 10550 * The actual objects that are the target of the reference (Reference to the profile to be used for validation.) 10551 */ 10552 protected List<Resource> profileTarget; 10553 10554 10555 /** 10556 * Variable is set based either on element value in response body or on header field value in the response headers. 10557 */ 10558 @Child(name = "variable", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10559 @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." ) 10560 protected List<TestScriptVariableComponent> variable; 10561 10562 /** 10563 * Assert rule to be used in one or more asserts within the test script. 10564 */ 10565 @Child(name = "rule", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10566 @Description(shortDefinition="Assert rule used within the test script", formalDefinition="Assert rule to be used in one or more asserts within the test script." ) 10567 protected List<TestScriptRuleComponent> rule; 10568 10569 /** 10570 * Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied. 10571 */ 10572 @Child(name = "ruleset", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10573 @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." ) 10574 protected List<TestScriptRulesetComponent> ruleset; 10575 10576 /** 10577 * A series of required setup operations before tests are executed. 10578 */ 10579 @Child(name = "setup", type = {}, order=11, min=0, max=1, modifier=false, summary=false) 10580 @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." ) 10581 protected TestScriptSetupComponent setup; 10582 10583 /** 10584 * A test in this script. 10585 */ 10586 @Child(name = "test", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10587 @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." ) 10588 protected List<TestScriptTestComponent> test; 10589 10590 /** 10591 * A series of operations required to clean up after the all the tests are executed (successfully or otherwise). 10592 */ 10593 @Child(name = "teardown", type = {}, order=13, min=0, max=1, modifier=false, summary=false) 10594 @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)." ) 10595 protected TestScriptTeardownComponent teardown; 10596 10597 private static final long serialVersionUID = 1164952373L; 10598 10599 /** 10600 * Constructor 10601 */ 10602 public TestScript() { 10603 super(); 10604 } 10605 10606 /** 10607 * Constructor 10608 */ 10609 public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) { 10610 super(); 10611 this.url = url; 10612 this.name = name; 10613 this.status = status; 10614 } 10615 10616 /** 10617 * @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 10618 */ 10619 public UriType getUrlElement() { 10620 if (this.url == null) 10621 if (Configuration.errorOnAutoCreate()) 10622 throw new Error("Attempt to auto-create TestScript.url"); 10623 else if (Configuration.doAutoCreate()) 10624 this.url = new UriType(); // bb 10625 return this.url; 10626 } 10627 10628 public boolean hasUrlElement() { 10629 return this.url != null && !this.url.isEmpty(); 10630 } 10631 10632 public boolean hasUrl() { 10633 return this.url != null && !this.url.isEmpty(); 10634 } 10635 10636 /** 10637 * @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 10638 */ 10639 public TestScript setUrlElement(UriType value) { 10640 this.url = value; 10641 return this; 10642 } 10643 10644 /** 10645 * @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). 10646 */ 10647 public String getUrl() { 10648 return this.url == null ? null : this.url.getValue(); 10649 } 10650 10651 /** 10652 * @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). 10653 */ 10654 public TestScript setUrl(String value) { 10655 if (this.url == null) 10656 this.url = new UriType(); 10657 this.url.setValue(value); 10658 return this; 10659 } 10660 10661 /** 10662 * @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.) 10663 */ 10664 public Identifier getIdentifier() { 10665 if (this.identifier == null) 10666 if (Configuration.errorOnAutoCreate()) 10667 throw new Error("Attempt to auto-create TestScript.identifier"); 10668 else if (Configuration.doAutoCreate()) 10669 this.identifier = new Identifier(); // cc 10670 return this.identifier; 10671 } 10672 10673 public boolean hasIdentifier() { 10674 return this.identifier != null && !this.identifier.isEmpty(); 10675 } 10676 10677 /** 10678 * @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.) 10679 */ 10680 public TestScript setIdentifier(Identifier value) { 10681 this.identifier = value; 10682 return this; 10683 } 10684 10685 /** 10686 * @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 10687 */ 10688 public StringType getVersionElement() { 10689 if (this.version == null) 10690 if (Configuration.errorOnAutoCreate()) 10691 throw new Error("Attempt to auto-create TestScript.version"); 10692 else if (Configuration.doAutoCreate()) 10693 this.version = new StringType(); // bb 10694 return this.version; 10695 } 10696 10697 public boolean hasVersionElement() { 10698 return this.version != null && !this.version.isEmpty(); 10699 } 10700 10701 public boolean hasVersion() { 10702 return this.version != null && !this.version.isEmpty(); 10703 } 10704 10705 /** 10706 * @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 10707 */ 10708 public TestScript setVersionElement(StringType value) { 10709 this.version = value; 10710 return this; 10711 } 10712 10713 /** 10714 * @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. 10715 */ 10716 public String getVersion() { 10717 return this.version == null ? null : this.version.getValue(); 10718 } 10719 10720 /** 10721 * @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. 10722 */ 10723 public TestScript setVersion(String value) { 10724 if (Utilities.noString(value)) 10725 this.version = null; 10726 else { 10727 if (this.version == null) 10728 this.version = new StringType(); 10729 this.version.setValue(value); 10730 } 10731 return this; 10732 } 10733 10734 /** 10735 * @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 10736 */ 10737 public StringType getNameElement() { 10738 if (this.name == null) 10739 if (Configuration.errorOnAutoCreate()) 10740 throw new Error("Attempt to auto-create TestScript.name"); 10741 else if (Configuration.doAutoCreate()) 10742 this.name = new StringType(); // bb 10743 return this.name; 10744 } 10745 10746 public boolean hasNameElement() { 10747 return this.name != null && !this.name.isEmpty(); 10748 } 10749 10750 public boolean hasName() { 10751 return this.name != null && !this.name.isEmpty(); 10752 } 10753 10754 /** 10755 * @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 10756 */ 10757 public TestScript setNameElement(StringType value) { 10758 this.name = value; 10759 return this; 10760 } 10761 10762 /** 10763 * @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. 10764 */ 10765 public String getName() { 10766 return this.name == null ? null : this.name.getValue(); 10767 } 10768 10769 /** 10770 * @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. 10771 */ 10772 public TestScript setName(String value) { 10773 if (this.name == null) 10774 this.name = new StringType(); 10775 this.name.setValue(value); 10776 return this; 10777 } 10778 10779 /** 10780 * @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 10781 */ 10782 public StringType getTitleElement() { 10783 if (this.title == null) 10784 if (Configuration.errorOnAutoCreate()) 10785 throw new Error("Attempt to auto-create TestScript.title"); 10786 else if (Configuration.doAutoCreate()) 10787 this.title = new StringType(); // bb 10788 return this.title; 10789 } 10790 10791 public boolean hasTitleElement() { 10792 return this.title != null && !this.title.isEmpty(); 10793 } 10794 10795 public boolean hasTitle() { 10796 return this.title != null && !this.title.isEmpty(); 10797 } 10798 10799 /** 10800 * @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 10801 */ 10802 public TestScript setTitleElement(StringType value) { 10803 this.title = value; 10804 return this; 10805 } 10806 10807 /** 10808 * @return A short, descriptive, user-friendly title for the test script. 10809 */ 10810 public String getTitle() { 10811 return this.title == null ? null : this.title.getValue(); 10812 } 10813 10814 /** 10815 * @param value A short, descriptive, user-friendly title for the test script. 10816 */ 10817 public TestScript setTitle(String value) { 10818 if (Utilities.noString(value)) 10819 this.title = null; 10820 else { 10821 if (this.title == null) 10822 this.title = new StringType(); 10823 this.title.setValue(value); 10824 } 10825 return this; 10826 } 10827 10828 /** 10829 * @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 10830 */ 10831 public Enumeration<PublicationStatus> getStatusElement() { 10832 if (this.status == null) 10833 if (Configuration.errorOnAutoCreate()) 10834 throw new Error("Attempt to auto-create TestScript.status"); 10835 else if (Configuration.doAutoCreate()) 10836 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 10837 return this.status; 10838 } 10839 10840 public boolean hasStatusElement() { 10841 return this.status != null && !this.status.isEmpty(); 10842 } 10843 10844 public boolean hasStatus() { 10845 return this.status != null && !this.status.isEmpty(); 10846 } 10847 10848 /** 10849 * @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 10850 */ 10851 public TestScript setStatusElement(Enumeration<PublicationStatus> value) { 10852 this.status = value; 10853 return this; 10854 } 10855 10856 /** 10857 * @return The status of this test script. Enables tracking the life-cycle of the content. 10858 */ 10859 public PublicationStatus getStatus() { 10860 return this.status == null ? null : this.status.getValue(); 10861 } 10862 10863 /** 10864 * @param value The status of this test script. Enables tracking the life-cycle of the content. 10865 */ 10866 public TestScript setStatus(PublicationStatus value) { 10867 if (this.status == null) 10868 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 10869 this.status.setValue(value); 10870 return this; 10871 } 10872 10873 /** 10874 * @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 10875 */ 10876 public BooleanType getExperimentalElement() { 10877 if (this.experimental == null) 10878 if (Configuration.errorOnAutoCreate()) 10879 throw new Error("Attempt to auto-create TestScript.experimental"); 10880 else if (Configuration.doAutoCreate()) 10881 this.experimental = new BooleanType(); // bb 10882 return this.experimental; 10883 } 10884 10885 public boolean hasExperimentalElement() { 10886 return this.experimental != null && !this.experimental.isEmpty(); 10887 } 10888 10889 public boolean hasExperimental() { 10890 return this.experimental != null && !this.experimental.isEmpty(); 10891 } 10892 10893 /** 10894 * @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 10895 */ 10896 public TestScript setExperimentalElement(BooleanType value) { 10897 this.experimental = value; 10898 return this; 10899 } 10900 10901 /** 10902 * @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. 10903 */ 10904 public boolean getExperimental() { 10905 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 10906 } 10907 10908 /** 10909 * @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. 10910 */ 10911 public TestScript setExperimental(boolean value) { 10912 if (this.experimental == null) 10913 this.experimental = new BooleanType(); 10914 this.experimental.setValue(value); 10915 return this; 10916 } 10917 10918 /** 10919 * @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 10920 */ 10921 public DateTimeType getDateElement() { 10922 if (this.date == null) 10923 if (Configuration.errorOnAutoCreate()) 10924 throw new Error("Attempt to auto-create TestScript.date"); 10925 else if (Configuration.doAutoCreate()) 10926 this.date = new DateTimeType(); // bb 10927 return this.date; 10928 } 10929 10930 public boolean hasDateElement() { 10931 return this.date != null && !this.date.isEmpty(); 10932 } 10933 10934 public boolean hasDate() { 10935 return this.date != null && !this.date.isEmpty(); 10936 } 10937 10938 /** 10939 * @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 10940 */ 10941 public TestScript setDateElement(DateTimeType value) { 10942 this.date = value; 10943 return this; 10944 } 10945 10946 /** 10947 * @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. 10948 */ 10949 public Date getDate() { 10950 return this.date == null ? null : this.date.getValue(); 10951 } 10952 10953 /** 10954 * @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. 10955 */ 10956 public TestScript setDate(Date value) { 10957 if (value == null) 10958 this.date = null; 10959 else { 10960 if (this.date == null) 10961 this.date = new DateTimeType(); 10962 this.date.setValue(value); 10963 } 10964 return this; 10965 } 10966 10967 /** 10968 * @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 10969 */ 10970 public StringType getPublisherElement() { 10971 if (this.publisher == null) 10972 if (Configuration.errorOnAutoCreate()) 10973 throw new Error("Attempt to auto-create TestScript.publisher"); 10974 else if (Configuration.doAutoCreate()) 10975 this.publisher = new StringType(); // bb 10976 return this.publisher; 10977 } 10978 10979 public boolean hasPublisherElement() { 10980 return this.publisher != null && !this.publisher.isEmpty(); 10981 } 10982 10983 public boolean hasPublisher() { 10984 return this.publisher != null && !this.publisher.isEmpty(); 10985 } 10986 10987 /** 10988 * @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 10989 */ 10990 public TestScript setPublisherElement(StringType value) { 10991 this.publisher = value; 10992 return this; 10993 } 10994 10995 /** 10996 * @return The name of the individual or organization that published the test script. 10997 */ 10998 public String getPublisher() { 10999 return this.publisher == null ? null : this.publisher.getValue(); 11000 } 11001 11002 /** 11003 * @param value The name of the individual or organization that published the test script. 11004 */ 11005 public TestScript setPublisher(String value) { 11006 if (Utilities.noString(value)) 11007 this.publisher = null; 11008 else { 11009 if (this.publisher == null) 11010 this.publisher = new StringType(); 11011 this.publisher.setValue(value); 11012 } 11013 return this; 11014 } 11015 11016 /** 11017 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 11018 */ 11019 public List<ContactDetail> getContact() { 11020 if (this.contact == null) 11021 this.contact = new ArrayList<ContactDetail>(); 11022 return this.contact; 11023 } 11024 11025 /** 11026 * @return Returns a reference to <code>this</code> for easy method chaining 11027 */ 11028 public TestScript setContact(List<ContactDetail> theContact) { 11029 this.contact = theContact; 11030 return this; 11031 } 11032 11033 public boolean hasContact() { 11034 if (this.contact == null) 11035 return false; 11036 for (ContactDetail item : this.contact) 11037 if (!item.isEmpty()) 11038 return true; 11039 return false; 11040 } 11041 11042 public ContactDetail addContact() { //3 11043 ContactDetail t = new ContactDetail(); 11044 if (this.contact == null) 11045 this.contact = new ArrayList<ContactDetail>(); 11046 this.contact.add(t); 11047 return t; 11048 } 11049 11050 public TestScript addContact(ContactDetail t) { //3 11051 if (t == null) 11052 return this; 11053 if (this.contact == null) 11054 this.contact = new ArrayList<ContactDetail>(); 11055 this.contact.add(t); 11056 return this; 11057 } 11058 11059 /** 11060 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 11061 */ 11062 public ContactDetail getContactFirstRep() { 11063 if (getContact().isEmpty()) { 11064 addContact(); 11065 } 11066 return getContact().get(0); 11067 } 11068 11069 /** 11070 * @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 11071 */ 11072 public MarkdownType getDescriptionElement() { 11073 if (this.description == null) 11074 if (Configuration.errorOnAutoCreate()) 11075 throw new Error("Attempt to auto-create TestScript.description"); 11076 else if (Configuration.doAutoCreate()) 11077 this.description = new MarkdownType(); // bb 11078 return this.description; 11079 } 11080 11081 public boolean hasDescriptionElement() { 11082 return this.description != null && !this.description.isEmpty(); 11083 } 11084 11085 public boolean hasDescription() { 11086 return this.description != null && !this.description.isEmpty(); 11087 } 11088 11089 /** 11090 * @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 11091 */ 11092 public TestScript setDescriptionElement(MarkdownType value) { 11093 this.description = value; 11094 return this; 11095 } 11096 11097 /** 11098 * @return A free text natural language description of the test script from a consumer's perspective. 11099 */ 11100 public String getDescription() { 11101 return this.description == null ? null : this.description.getValue(); 11102 } 11103 11104 /** 11105 * @param value A free text natural language description of the test script from a consumer's perspective. 11106 */ 11107 public TestScript setDescription(String value) { 11108 if (value == null) 11109 this.description = null; 11110 else { 11111 if (this.description == null) 11112 this.description = new MarkdownType(); 11113 this.description.setValue(value); 11114 } 11115 return this; 11116 } 11117 11118 /** 11119 * @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.) 11120 */ 11121 public List<UsageContext> getUseContext() { 11122 if (this.useContext == null) 11123 this.useContext = new ArrayList<UsageContext>(); 11124 return this.useContext; 11125 } 11126 11127 /** 11128 * @return Returns a reference to <code>this</code> for easy method chaining 11129 */ 11130 public TestScript setUseContext(List<UsageContext> theUseContext) { 11131 this.useContext = theUseContext; 11132 return this; 11133 } 11134 11135 public boolean hasUseContext() { 11136 if (this.useContext == null) 11137 return false; 11138 for (UsageContext item : this.useContext) 11139 if (!item.isEmpty()) 11140 return true; 11141 return false; 11142 } 11143 11144 public UsageContext addUseContext() { //3 11145 UsageContext t = new UsageContext(); 11146 if (this.useContext == null) 11147 this.useContext = new ArrayList<UsageContext>(); 11148 this.useContext.add(t); 11149 return t; 11150 } 11151 11152 public TestScript addUseContext(UsageContext t) { //3 11153 if (t == null) 11154 return this; 11155 if (this.useContext == null) 11156 this.useContext = new ArrayList<UsageContext>(); 11157 this.useContext.add(t); 11158 return this; 11159 } 11160 11161 /** 11162 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 11163 */ 11164 public UsageContext getUseContextFirstRep() { 11165 if (getUseContext().isEmpty()) { 11166 addUseContext(); 11167 } 11168 return getUseContext().get(0); 11169 } 11170 11171 /** 11172 * @return {@link #jurisdiction} (A legal or geographic region in which the test script is intended to be used.) 11173 */ 11174 public List<CodeableConcept> getJurisdiction() { 11175 if (this.jurisdiction == null) 11176 this.jurisdiction = new ArrayList<CodeableConcept>(); 11177 return this.jurisdiction; 11178 } 11179 11180 /** 11181 * @return Returns a reference to <code>this</code> for easy method chaining 11182 */ 11183 public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) { 11184 this.jurisdiction = theJurisdiction; 11185 return this; 11186 } 11187 11188 public boolean hasJurisdiction() { 11189 if (this.jurisdiction == null) 11190 return false; 11191 for (CodeableConcept item : this.jurisdiction) 11192 if (!item.isEmpty()) 11193 return true; 11194 return false; 11195 } 11196 11197 public CodeableConcept addJurisdiction() { //3 11198 CodeableConcept t = new CodeableConcept(); 11199 if (this.jurisdiction == null) 11200 this.jurisdiction = new ArrayList<CodeableConcept>(); 11201 this.jurisdiction.add(t); 11202 return t; 11203 } 11204 11205 public TestScript addJurisdiction(CodeableConcept t) { //3 11206 if (t == null) 11207 return this; 11208 if (this.jurisdiction == null) 11209 this.jurisdiction = new ArrayList<CodeableConcept>(); 11210 this.jurisdiction.add(t); 11211 return this; 11212 } 11213 11214 /** 11215 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 11216 */ 11217 public CodeableConcept getJurisdictionFirstRep() { 11218 if (getJurisdiction().isEmpty()) { 11219 addJurisdiction(); 11220 } 11221 return getJurisdiction().get(0); 11222 } 11223 11224 /** 11225 * @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 11226 */ 11227 public MarkdownType getPurposeElement() { 11228 if (this.purpose == null) 11229 if (Configuration.errorOnAutoCreate()) 11230 throw new Error("Attempt to auto-create TestScript.purpose"); 11231 else if (Configuration.doAutoCreate()) 11232 this.purpose = new MarkdownType(); // bb 11233 return this.purpose; 11234 } 11235 11236 public boolean hasPurposeElement() { 11237 return this.purpose != null && !this.purpose.isEmpty(); 11238 } 11239 11240 public boolean hasPurpose() { 11241 return this.purpose != null && !this.purpose.isEmpty(); 11242 } 11243 11244 /** 11245 * @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 11246 */ 11247 public TestScript setPurposeElement(MarkdownType value) { 11248 this.purpose = value; 11249 return this; 11250 } 11251 11252 /** 11253 * @return Explaination of why this test script is needed and why it has been designed as it has. 11254 */ 11255 public String getPurpose() { 11256 return this.purpose == null ? null : this.purpose.getValue(); 11257 } 11258 11259 /** 11260 * @param value Explaination of why this test script is needed and why it has been designed as it has. 11261 */ 11262 public TestScript setPurpose(String value) { 11263 if (value == null) 11264 this.purpose = null; 11265 else { 11266 if (this.purpose == null) 11267 this.purpose = new MarkdownType(); 11268 this.purpose.setValue(value); 11269 } 11270 return this; 11271 } 11272 11273 /** 11274 * @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 11275 */ 11276 public MarkdownType getCopyrightElement() { 11277 if (this.copyright == null) 11278 if (Configuration.errorOnAutoCreate()) 11279 throw new Error("Attempt to auto-create TestScript.copyright"); 11280 else if (Configuration.doAutoCreate()) 11281 this.copyright = new MarkdownType(); // bb 11282 return this.copyright; 11283 } 11284 11285 public boolean hasCopyrightElement() { 11286 return this.copyright != null && !this.copyright.isEmpty(); 11287 } 11288 11289 public boolean hasCopyright() { 11290 return this.copyright != null && !this.copyright.isEmpty(); 11291 } 11292 11293 /** 11294 * @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 11295 */ 11296 public TestScript setCopyrightElement(MarkdownType value) { 11297 this.copyright = value; 11298 return this; 11299 } 11300 11301 /** 11302 * @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. 11303 */ 11304 public String getCopyright() { 11305 return this.copyright == null ? null : this.copyright.getValue(); 11306 } 11307 11308 /** 11309 * @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. 11310 */ 11311 public TestScript setCopyright(String value) { 11312 if (value == null) 11313 this.copyright = null; 11314 else { 11315 if (this.copyright == null) 11316 this.copyright = new MarkdownType(); 11317 this.copyright.setValue(value); 11318 } 11319 return this; 11320 } 11321 11322 /** 11323 * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) 11324 */ 11325 public List<TestScriptOriginComponent> getOrigin() { 11326 if (this.origin == null) 11327 this.origin = new ArrayList<TestScriptOriginComponent>(); 11328 return this.origin; 11329 } 11330 11331 /** 11332 * @return Returns a reference to <code>this</code> for easy method chaining 11333 */ 11334 public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) { 11335 this.origin = theOrigin; 11336 return this; 11337 } 11338 11339 public boolean hasOrigin() { 11340 if (this.origin == null) 11341 return false; 11342 for (TestScriptOriginComponent item : this.origin) 11343 if (!item.isEmpty()) 11344 return true; 11345 return false; 11346 } 11347 11348 public TestScriptOriginComponent addOrigin() { //3 11349 TestScriptOriginComponent t = new TestScriptOriginComponent(); 11350 if (this.origin == null) 11351 this.origin = new ArrayList<TestScriptOriginComponent>(); 11352 this.origin.add(t); 11353 return t; 11354 } 11355 11356 public TestScript addOrigin(TestScriptOriginComponent t) { //3 11357 if (t == null) 11358 return this; 11359 if (this.origin == null) 11360 this.origin = new ArrayList<TestScriptOriginComponent>(); 11361 this.origin.add(t); 11362 return this; 11363 } 11364 11365 /** 11366 * @return The first repetition of repeating field {@link #origin}, creating it if it does not already exist 11367 */ 11368 public TestScriptOriginComponent getOriginFirstRep() { 11369 if (getOrigin().isEmpty()) { 11370 addOrigin(); 11371 } 11372 return getOrigin().get(0); 11373 } 11374 11375 /** 11376 * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.) 11377 */ 11378 public List<TestScriptDestinationComponent> getDestination() { 11379 if (this.destination == null) 11380 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11381 return this.destination; 11382 } 11383 11384 /** 11385 * @return Returns a reference to <code>this</code> for easy method chaining 11386 */ 11387 public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) { 11388 this.destination = theDestination; 11389 return this; 11390 } 11391 11392 public boolean hasDestination() { 11393 if (this.destination == null) 11394 return false; 11395 for (TestScriptDestinationComponent item : this.destination) 11396 if (!item.isEmpty()) 11397 return true; 11398 return false; 11399 } 11400 11401 public TestScriptDestinationComponent addDestination() { //3 11402 TestScriptDestinationComponent t = new TestScriptDestinationComponent(); 11403 if (this.destination == null) 11404 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11405 this.destination.add(t); 11406 return t; 11407 } 11408 11409 public TestScript addDestination(TestScriptDestinationComponent t) { //3 11410 if (t == null) 11411 return this; 11412 if (this.destination == null) 11413 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11414 this.destination.add(t); 11415 return this; 11416 } 11417 11418 /** 11419 * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist 11420 */ 11421 public TestScriptDestinationComponent getDestinationFirstRep() { 11422 if (getDestination().isEmpty()) { 11423 addDestination(); 11424 } 11425 return getDestination().get(0); 11426 } 11427 11428 /** 11429 * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 11430 */ 11431 public TestScriptMetadataComponent getMetadata() { 11432 if (this.metadata == null) 11433 if (Configuration.errorOnAutoCreate()) 11434 throw new Error("Attempt to auto-create TestScript.metadata"); 11435 else if (Configuration.doAutoCreate()) 11436 this.metadata = new TestScriptMetadataComponent(); // cc 11437 return this.metadata; 11438 } 11439 11440 public boolean hasMetadata() { 11441 return this.metadata != null && !this.metadata.isEmpty(); 11442 } 11443 11444 /** 11445 * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 11446 */ 11447 public TestScript setMetadata(TestScriptMetadataComponent value) { 11448 this.metadata = value; 11449 return this; 11450 } 11451 11452 /** 11453 * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) 11454 */ 11455 public List<TestScriptFixtureComponent> getFixture() { 11456 if (this.fixture == null) 11457 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11458 return this.fixture; 11459 } 11460 11461 /** 11462 * @return Returns a reference to <code>this</code> for easy method chaining 11463 */ 11464 public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) { 11465 this.fixture = theFixture; 11466 return this; 11467 } 11468 11469 public boolean hasFixture() { 11470 if (this.fixture == null) 11471 return false; 11472 for (TestScriptFixtureComponent item : this.fixture) 11473 if (!item.isEmpty()) 11474 return true; 11475 return false; 11476 } 11477 11478 public TestScriptFixtureComponent addFixture() { //3 11479 TestScriptFixtureComponent t = new TestScriptFixtureComponent(); 11480 if (this.fixture == null) 11481 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11482 this.fixture.add(t); 11483 return t; 11484 } 11485 11486 public TestScript addFixture(TestScriptFixtureComponent t) { //3 11487 if (t == null) 11488 return this; 11489 if (this.fixture == null) 11490 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11491 this.fixture.add(t); 11492 return this; 11493 } 11494 11495 /** 11496 * @return The first repetition of repeating field {@link #fixture}, creating it if it does not already exist 11497 */ 11498 public TestScriptFixtureComponent getFixtureFirstRep() { 11499 if (getFixture().isEmpty()) { 11500 addFixture(); 11501 } 11502 return getFixture().get(0); 11503 } 11504 11505 /** 11506 * @return {@link #profile} (Reference to the profile to be used for validation.) 11507 */ 11508 public List<Reference> getProfile() { 11509 if (this.profile == null) 11510 this.profile = new ArrayList<Reference>(); 11511 return this.profile; 11512 } 11513 11514 /** 11515 * @return Returns a reference to <code>this</code> for easy method chaining 11516 */ 11517 public TestScript setProfile(List<Reference> theProfile) { 11518 this.profile = theProfile; 11519 return this; 11520 } 11521 11522 public boolean hasProfile() { 11523 if (this.profile == null) 11524 return false; 11525 for (Reference item : this.profile) 11526 if (!item.isEmpty()) 11527 return true; 11528 return false; 11529 } 11530 11531 public Reference addProfile() { //3 11532 Reference t = new Reference(); 11533 if (this.profile == null) 11534 this.profile = new ArrayList<Reference>(); 11535 this.profile.add(t); 11536 return t; 11537 } 11538 11539 public TestScript addProfile(Reference t) { //3 11540 if (t == null) 11541 return this; 11542 if (this.profile == null) 11543 this.profile = new ArrayList<Reference>(); 11544 this.profile.add(t); 11545 return this; 11546 } 11547 11548 /** 11549 * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist 11550 */ 11551 public Reference getProfileFirstRep() { 11552 if (getProfile().isEmpty()) { 11553 addProfile(); 11554 } 11555 return getProfile().get(0); 11556 } 11557 11558 /** 11559 * @deprecated Use Reference#setResource(IBaseResource) instead 11560 */ 11561 @Deprecated 11562 public List<Resource> getProfileTarget() { 11563 if (this.profileTarget == null) 11564 this.profileTarget = new ArrayList<Resource>(); 11565 return this.profileTarget; 11566 } 11567 11568 /** 11569 * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) 11570 */ 11571 public List<TestScriptVariableComponent> getVariable() { 11572 if (this.variable == null) 11573 this.variable = new ArrayList<TestScriptVariableComponent>(); 11574 return this.variable; 11575 } 11576 11577 /** 11578 * @return Returns a reference to <code>this</code> for easy method chaining 11579 */ 11580 public TestScript setVariable(List<TestScriptVariableComponent> theVariable) { 11581 this.variable = theVariable; 11582 return this; 11583 } 11584 11585 public boolean hasVariable() { 11586 if (this.variable == null) 11587 return false; 11588 for (TestScriptVariableComponent item : this.variable) 11589 if (!item.isEmpty()) 11590 return true; 11591 return false; 11592 } 11593 11594 public TestScriptVariableComponent addVariable() { //3 11595 TestScriptVariableComponent t = new TestScriptVariableComponent(); 11596 if (this.variable == null) 11597 this.variable = new ArrayList<TestScriptVariableComponent>(); 11598 this.variable.add(t); 11599 return t; 11600 } 11601 11602 public TestScript addVariable(TestScriptVariableComponent t) { //3 11603 if (t == null) 11604 return this; 11605 if (this.variable == null) 11606 this.variable = new ArrayList<TestScriptVariableComponent>(); 11607 this.variable.add(t); 11608 return this; 11609 } 11610 11611 /** 11612 * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist 11613 */ 11614 public TestScriptVariableComponent getVariableFirstRep() { 11615 if (getVariable().isEmpty()) { 11616 addVariable(); 11617 } 11618 return getVariable().get(0); 11619 } 11620 11621 /** 11622 * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.) 11623 */ 11624 public List<TestScriptRuleComponent> getRule() { 11625 if (this.rule == null) 11626 this.rule = new ArrayList<TestScriptRuleComponent>(); 11627 return this.rule; 11628 } 11629 11630 /** 11631 * @return Returns a reference to <code>this</code> for easy method chaining 11632 */ 11633 public TestScript setRule(List<TestScriptRuleComponent> theRule) { 11634 this.rule = theRule; 11635 return this; 11636 } 11637 11638 public boolean hasRule() { 11639 if (this.rule == null) 11640 return false; 11641 for (TestScriptRuleComponent item : this.rule) 11642 if (!item.isEmpty()) 11643 return true; 11644 return false; 11645 } 11646 11647 public TestScriptRuleComponent addRule() { //3 11648 TestScriptRuleComponent t = new TestScriptRuleComponent(); 11649 if (this.rule == null) 11650 this.rule = new ArrayList<TestScriptRuleComponent>(); 11651 this.rule.add(t); 11652 return t; 11653 } 11654 11655 public TestScript addRule(TestScriptRuleComponent t) { //3 11656 if (t == null) 11657 return this; 11658 if (this.rule == null) 11659 this.rule = new ArrayList<TestScriptRuleComponent>(); 11660 this.rule.add(t); 11661 return this; 11662 } 11663 11664 /** 11665 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 11666 */ 11667 public TestScriptRuleComponent getRuleFirstRep() { 11668 if (getRule().isEmpty()) { 11669 addRule(); 11670 } 11671 return getRule().get(0); 11672 } 11673 11674 /** 11675 * @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.) 11676 */ 11677 public List<TestScriptRulesetComponent> getRuleset() { 11678 if (this.ruleset == null) 11679 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11680 return this.ruleset; 11681 } 11682 11683 /** 11684 * @return Returns a reference to <code>this</code> for easy method chaining 11685 */ 11686 public TestScript setRuleset(List<TestScriptRulesetComponent> theRuleset) { 11687 this.ruleset = theRuleset; 11688 return this; 11689 } 11690 11691 public boolean hasRuleset() { 11692 if (this.ruleset == null) 11693 return false; 11694 for (TestScriptRulesetComponent item : this.ruleset) 11695 if (!item.isEmpty()) 11696 return true; 11697 return false; 11698 } 11699 11700 public TestScriptRulesetComponent addRuleset() { //3 11701 TestScriptRulesetComponent t = new TestScriptRulesetComponent(); 11702 if (this.ruleset == null) 11703 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11704 this.ruleset.add(t); 11705 return t; 11706 } 11707 11708 public TestScript addRuleset(TestScriptRulesetComponent t) { //3 11709 if (t == null) 11710 return this; 11711 if (this.ruleset == null) 11712 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11713 this.ruleset.add(t); 11714 return this; 11715 } 11716 11717 /** 11718 * @return The first repetition of repeating field {@link #ruleset}, creating it if it does not already exist 11719 */ 11720 public TestScriptRulesetComponent getRulesetFirstRep() { 11721 if (getRuleset().isEmpty()) { 11722 addRuleset(); 11723 } 11724 return getRuleset().get(0); 11725 } 11726 11727 /** 11728 * @return {@link #setup} (A series of required setup operations before tests are executed.) 11729 */ 11730 public TestScriptSetupComponent getSetup() { 11731 if (this.setup == null) 11732 if (Configuration.errorOnAutoCreate()) 11733 throw new Error("Attempt to auto-create TestScript.setup"); 11734 else if (Configuration.doAutoCreate()) 11735 this.setup = new TestScriptSetupComponent(); // cc 11736 return this.setup; 11737 } 11738 11739 public boolean hasSetup() { 11740 return this.setup != null && !this.setup.isEmpty(); 11741 } 11742 11743 /** 11744 * @param value {@link #setup} (A series of required setup operations before tests are executed.) 11745 */ 11746 public TestScript setSetup(TestScriptSetupComponent value) { 11747 this.setup = value; 11748 return this; 11749 } 11750 11751 /** 11752 * @return {@link #test} (A test in this script.) 11753 */ 11754 public List<TestScriptTestComponent> getTest() { 11755 if (this.test == null) 11756 this.test = new ArrayList<TestScriptTestComponent>(); 11757 return this.test; 11758 } 11759 11760 /** 11761 * @return Returns a reference to <code>this</code> for easy method chaining 11762 */ 11763 public TestScript setTest(List<TestScriptTestComponent> theTest) { 11764 this.test = theTest; 11765 return this; 11766 } 11767 11768 public boolean hasTest() { 11769 if (this.test == null) 11770 return false; 11771 for (TestScriptTestComponent item : this.test) 11772 if (!item.isEmpty()) 11773 return true; 11774 return false; 11775 } 11776 11777 public TestScriptTestComponent addTest() { //3 11778 TestScriptTestComponent t = new TestScriptTestComponent(); 11779 if (this.test == null) 11780 this.test = new ArrayList<TestScriptTestComponent>(); 11781 this.test.add(t); 11782 return t; 11783 } 11784 11785 public TestScript addTest(TestScriptTestComponent t) { //3 11786 if (t == null) 11787 return this; 11788 if (this.test == null) 11789 this.test = new ArrayList<TestScriptTestComponent>(); 11790 this.test.add(t); 11791 return this; 11792 } 11793 11794 /** 11795 * @return The first repetition of repeating field {@link #test}, creating it if it does not already exist 11796 */ 11797 public TestScriptTestComponent getTestFirstRep() { 11798 if (getTest().isEmpty()) { 11799 addTest(); 11800 } 11801 return getTest().get(0); 11802 } 11803 11804 /** 11805 * @return {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 11806 */ 11807 public TestScriptTeardownComponent getTeardown() { 11808 if (this.teardown == null) 11809 if (Configuration.errorOnAutoCreate()) 11810 throw new Error("Attempt to auto-create TestScript.teardown"); 11811 else if (Configuration.doAutoCreate()) 11812 this.teardown = new TestScriptTeardownComponent(); // cc 11813 return this.teardown; 11814 } 11815 11816 public boolean hasTeardown() { 11817 return this.teardown != null && !this.teardown.isEmpty(); 11818 } 11819 11820 /** 11821 * @param value {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 11822 */ 11823 public TestScript setTeardown(TestScriptTeardownComponent value) { 11824 this.teardown = value; 11825 return this; 11826 } 11827 11828 protected void listChildren(List<Property> children) { 11829 super.listChildren(children); 11830 children.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, 1, url)); 11831 children.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, 1, identifier)); 11832 children.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, 1, version)); 11833 children.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, 1, name)); 11834 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title)); 11835 children.add(new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status)); 11836 children.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, 1, experimental)); 11837 children.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, 1, date)); 11838 children.add(new Property("publisher", "string", "The name of the individual or organization that published the test script.", 0, 1, publisher)); 11839 children.add(new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 11840 children.add(new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description)); 11841 children.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)); 11842 children.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)); 11843 children.add(new Property("purpose", "markdown", "Explaination of why this test script is needed and why it has been designed as it has.", 0, 1, purpose)); 11844 children.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, 1, copyright)); 11845 children.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)); 11846 children.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)); 11847 children.add(new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, 1, metadata)); 11848 children.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)); 11849 children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile)); 11850 children.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)); 11851 children.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)); 11852 children.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)); 11853 children.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup)); 11854 children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test)); 11855 children.add(new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, 1, teardown)); 11856 } 11857 11858 @Override 11859 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 11860 switch (_hash) { 11861 case 116079: /*url*/ return 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, 1, url); 11862 case -1618432855: /*identifier*/ return 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, 1, identifier); 11863 case 351608024: /*version*/ return 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, 1, version); 11864 case 3373707: /*name*/ return 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, 1, name); 11865 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title); 11866 case -892481550: /*status*/ return new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status); 11867 case -404562712: /*experimental*/ return 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, 1, experimental); 11868 case 3076014: /*date*/ return 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, 1, date); 11869 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the individual or organization that published the test script.", 0, 1, publisher); 11870 case 951526432: /*contact*/ return new Property("contact", "ContactDetail", "Contact details to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact); 11871 case -1724546052: /*description*/ return new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description); 11872 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 11873 case -507075711: /*jurisdiction*/ return 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); 11874 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explaination of why this test script is needed and why it has been designed as it has.", 0, 1, purpose); 11875 case 1522889671: /*copyright*/ return 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, 1, copyright); 11876 case -1008619738: /*origin*/ return new Property("origin", "", "An abstract server used in operations within this test script in the origin element.", 0, java.lang.Integer.MAX_VALUE, origin); 11877 case -1429847026: /*destination*/ return new Property("destination", "", "An abstract server used in operations within this test script in the destination element.", 0, java.lang.Integer.MAX_VALUE, destination); 11878 case -450004177: /*metadata*/ return new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, 1, metadata); 11879 case -843449847: /*fixture*/ return 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); 11880 case -309425751: /*profile*/ return new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile); 11881 case -1249586564: /*variable*/ return 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); 11882 case 3512060: /*rule*/ return new Property("rule", "", "Assert rule to be used in one or more asserts within the test script.", 0, java.lang.Integer.MAX_VALUE, rule); 11883 case 1548678118: /*ruleset*/ return 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); 11884 case 109329021: /*setup*/ return new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup); 11885 case 3556498: /*test*/ return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test); 11886 case -1663474172: /*teardown*/ return new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, 1, teardown); 11887 default: return super.getNamedProperty(_hash, _name, _checkValid); 11888 } 11889 11890 } 11891 11892 @Override 11893 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 11894 switch (hash) { 11895 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 11896 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 11897 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 11898 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 11899 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 11900 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 11901 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 11902 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 11903 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 11904 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 11905 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 11906 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 11907 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 11908 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 11909 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 11910 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent 11911 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent 11912 case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent 11913 case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent 11914 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference 11915 case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent 11916 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // TestScriptRuleComponent 11917 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : this.ruleset.toArray(new Base[this.ruleset.size()]); // TestScriptRulesetComponent 11918 case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent 11919 case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent 11920 case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent 11921 default: return super.getProperty(hash, name, checkValid); 11922 } 11923 11924 } 11925 11926 @Override 11927 public Base setProperty(int hash, String name, Base value) throws FHIRException { 11928 switch (hash) { 11929 case 116079: // url 11930 this.url = castToUri(value); // UriType 11931 return value; 11932 case -1618432855: // identifier 11933 this.identifier = castToIdentifier(value); // Identifier 11934 return value; 11935 case 351608024: // version 11936 this.version = castToString(value); // StringType 11937 return value; 11938 case 3373707: // name 11939 this.name = castToString(value); // StringType 11940 return value; 11941 case 110371416: // title 11942 this.title = castToString(value); // StringType 11943 return value; 11944 case -892481550: // status 11945 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 11946 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 11947 return value; 11948 case -404562712: // experimental 11949 this.experimental = castToBoolean(value); // BooleanType 11950 return value; 11951 case 3076014: // date 11952 this.date = castToDateTime(value); // DateTimeType 11953 return value; 11954 case 1447404028: // publisher 11955 this.publisher = castToString(value); // StringType 11956 return value; 11957 case 951526432: // contact 11958 this.getContact().add(castToContactDetail(value)); // ContactDetail 11959 return value; 11960 case -1724546052: // description 11961 this.description = castToMarkdown(value); // MarkdownType 11962 return value; 11963 case -669707736: // useContext 11964 this.getUseContext().add(castToUsageContext(value)); // UsageContext 11965 return value; 11966 case -507075711: // jurisdiction 11967 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 11968 return value; 11969 case -220463842: // purpose 11970 this.purpose = castToMarkdown(value); // MarkdownType 11971 return value; 11972 case 1522889671: // copyright 11973 this.copyright = castToMarkdown(value); // MarkdownType 11974 return value; 11975 case -1008619738: // origin 11976 this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent 11977 return value; 11978 case -1429847026: // destination 11979 this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent 11980 return value; 11981 case -450004177: // metadata 11982 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 11983 return value; 11984 case -843449847: // fixture 11985 this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent 11986 return value; 11987 case -309425751: // profile 11988 this.getProfile().add(castToReference(value)); // Reference 11989 return value; 11990 case -1249586564: // variable 11991 this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent 11992 return value; 11993 case 3512060: // rule 11994 this.getRule().add((TestScriptRuleComponent) value); // TestScriptRuleComponent 11995 return value; 11996 case 1548678118: // ruleset 11997 this.getRuleset().add((TestScriptRulesetComponent) value); // TestScriptRulesetComponent 11998 return value; 11999 case 109329021: // setup 12000 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 12001 return value; 12002 case 3556498: // test 12003 this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent 12004 return value; 12005 case -1663474172: // teardown 12006 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 12007 return value; 12008 default: return super.setProperty(hash, name, value); 12009 } 12010 12011 } 12012 12013 @Override 12014 public Base setProperty(String name, Base value) throws FHIRException { 12015 if (name.equals("url")) { 12016 this.url = castToUri(value); // UriType 12017 } else if (name.equals("identifier")) { 12018 this.identifier = castToIdentifier(value); // Identifier 12019 } else if (name.equals("version")) { 12020 this.version = castToString(value); // StringType 12021 } else if (name.equals("name")) { 12022 this.name = castToString(value); // StringType 12023 } else if (name.equals("title")) { 12024 this.title = castToString(value); // StringType 12025 } else if (name.equals("status")) { 12026 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 12027 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 12028 } else if (name.equals("experimental")) { 12029 this.experimental = castToBoolean(value); // BooleanType 12030 } else if (name.equals("date")) { 12031 this.date = castToDateTime(value); // DateTimeType 12032 } else if (name.equals("publisher")) { 12033 this.publisher = castToString(value); // StringType 12034 } else if (name.equals("contact")) { 12035 this.getContact().add(castToContactDetail(value)); 12036 } else if (name.equals("description")) { 12037 this.description = castToMarkdown(value); // MarkdownType 12038 } else if (name.equals("useContext")) { 12039 this.getUseContext().add(castToUsageContext(value)); 12040 } else if (name.equals("jurisdiction")) { 12041 this.getJurisdiction().add(castToCodeableConcept(value)); 12042 } else if (name.equals("purpose")) { 12043 this.purpose = castToMarkdown(value); // MarkdownType 12044 } else if (name.equals("copyright")) { 12045 this.copyright = castToMarkdown(value); // MarkdownType 12046 } else if (name.equals("origin")) { 12047 this.getOrigin().add((TestScriptOriginComponent) value); 12048 } else if (name.equals("destination")) { 12049 this.getDestination().add((TestScriptDestinationComponent) value); 12050 } else if (name.equals("metadata")) { 12051 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 12052 } else if (name.equals("fixture")) { 12053 this.getFixture().add((TestScriptFixtureComponent) value); 12054 } else if (name.equals("profile")) { 12055 this.getProfile().add(castToReference(value)); 12056 } else if (name.equals("variable")) { 12057 this.getVariable().add((TestScriptVariableComponent) value); 12058 } else if (name.equals("rule")) { 12059 this.getRule().add((TestScriptRuleComponent) value); 12060 } else if (name.equals("ruleset")) { 12061 this.getRuleset().add((TestScriptRulesetComponent) value); 12062 } else if (name.equals("setup")) { 12063 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 12064 } else if (name.equals("test")) { 12065 this.getTest().add((TestScriptTestComponent) value); 12066 } else if (name.equals("teardown")) { 12067 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 12068 } else 12069 return super.setProperty(name, value); 12070 return value; 12071 } 12072 12073 @Override 12074 public Base makeProperty(int hash, String name) throws FHIRException { 12075 switch (hash) { 12076 case 116079: return getUrlElement(); 12077 case -1618432855: return getIdentifier(); 12078 case 351608024: return getVersionElement(); 12079 case 3373707: return getNameElement(); 12080 case 110371416: return getTitleElement(); 12081 case -892481550: return getStatusElement(); 12082 case -404562712: return getExperimentalElement(); 12083 case 3076014: return getDateElement(); 12084 case 1447404028: return getPublisherElement(); 12085 case 951526432: return addContact(); 12086 case -1724546052: return getDescriptionElement(); 12087 case -669707736: return addUseContext(); 12088 case -507075711: return addJurisdiction(); 12089 case -220463842: return getPurposeElement(); 12090 case 1522889671: return getCopyrightElement(); 12091 case -1008619738: return addOrigin(); 12092 case -1429847026: return addDestination(); 12093 case -450004177: return getMetadata(); 12094 case -843449847: return addFixture(); 12095 case -309425751: return addProfile(); 12096 case -1249586564: return addVariable(); 12097 case 3512060: return addRule(); 12098 case 1548678118: return addRuleset(); 12099 case 109329021: return getSetup(); 12100 case 3556498: return addTest(); 12101 case -1663474172: return getTeardown(); 12102 default: return super.makeProperty(hash, name); 12103 } 12104 12105 } 12106 12107 @Override 12108 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 12109 switch (hash) { 12110 case 116079: /*url*/ return new String[] {"uri"}; 12111 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 12112 case 351608024: /*version*/ return new String[] {"string"}; 12113 case 3373707: /*name*/ return new String[] {"string"}; 12114 case 110371416: /*title*/ return new String[] {"string"}; 12115 case -892481550: /*status*/ return new String[] {"code"}; 12116 case -404562712: /*experimental*/ return new String[] {"boolean"}; 12117 case 3076014: /*date*/ return new String[] {"dateTime"}; 12118 case 1447404028: /*publisher*/ return new String[] {"string"}; 12119 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 12120 case -1724546052: /*description*/ return new String[] {"markdown"}; 12121 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 12122 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 12123 case -220463842: /*purpose*/ return new String[] {"markdown"}; 12124 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 12125 case -1008619738: /*origin*/ return new String[] {}; 12126 case -1429847026: /*destination*/ return new String[] {}; 12127 case -450004177: /*metadata*/ return new String[] {}; 12128 case -843449847: /*fixture*/ return new String[] {}; 12129 case -309425751: /*profile*/ return new String[] {"Reference"}; 12130 case -1249586564: /*variable*/ return new String[] {}; 12131 case 3512060: /*rule*/ return new String[] {}; 12132 case 1548678118: /*ruleset*/ return new String[] {}; 12133 case 109329021: /*setup*/ return new String[] {}; 12134 case 3556498: /*test*/ return new String[] {}; 12135 case -1663474172: /*teardown*/ return new String[] {}; 12136 default: return super.getTypesForProperty(hash, name); 12137 } 12138 12139 } 12140 12141 @Override 12142 public Base addChild(String name) throws FHIRException { 12143 if (name.equals("url")) { 12144 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 12145 } 12146 else if (name.equals("identifier")) { 12147 this.identifier = new Identifier(); 12148 return this.identifier; 12149 } 12150 else if (name.equals("version")) { 12151 throw new FHIRException("Cannot call addChild on a primitive type TestScript.version"); 12152 } 12153 else if (name.equals("name")) { 12154 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 12155 } 12156 else if (name.equals("title")) { 12157 throw new FHIRException("Cannot call addChild on a primitive type TestScript.title"); 12158 } 12159 else if (name.equals("status")) { 12160 throw new FHIRException("Cannot call addChild on a primitive type TestScript.status"); 12161 } 12162 else if (name.equals("experimental")) { 12163 throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental"); 12164 } 12165 else if (name.equals("date")) { 12166 throw new FHIRException("Cannot call addChild on a primitive type TestScript.date"); 12167 } 12168 else if (name.equals("publisher")) { 12169 throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher"); 12170 } 12171 else if (name.equals("contact")) { 12172 return addContact(); 12173 } 12174 else if (name.equals("description")) { 12175 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 12176 } 12177 else if (name.equals("useContext")) { 12178 return addUseContext(); 12179 } 12180 else if (name.equals("jurisdiction")) { 12181 return addJurisdiction(); 12182 } 12183 else if (name.equals("purpose")) { 12184 throw new FHIRException("Cannot call addChild on a primitive type TestScript.purpose"); 12185 } 12186 else if (name.equals("copyright")) { 12187 throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright"); 12188 } 12189 else if (name.equals("origin")) { 12190 return addOrigin(); 12191 } 12192 else if (name.equals("destination")) { 12193 return addDestination(); 12194 } 12195 else if (name.equals("metadata")) { 12196 this.metadata = new TestScriptMetadataComponent(); 12197 return this.metadata; 12198 } 12199 else if (name.equals("fixture")) { 12200 return addFixture(); 12201 } 12202 else if (name.equals("profile")) { 12203 return addProfile(); 12204 } 12205 else if (name.equals("variable")) { 12206 return addVariable(); 12207 } 12208 else if (name.equals("rule")) { 12209 return addRule(); 12210 } 12211 else if (name.equals("ruleset")) { 12212 return addRuleset(); 12213 } 12214 else if (name.equals("setup")) { 12215 this.setup = new TestScriptSetupComponent(); 12216 return this.setup; 12217 } 12218 else if (name.equals("test")) { 12219 return addTest(); 12220 } 12221 else if (name.equals("teardown")) { 12222 this.teardown = new TestScriptTeardownComponent(); 12223 return this.teardown; 12224 } 12225 else 12226 return super.addChild(name); 12227 } 12228 12229 public String fhirType() { 12230 return "TestScript"; 12231 12232 } 12233 12234 public TestScript copy() { 12235 TestScript dst = new TestScript(); 12236 copyValues(dst); 12237 dst.url = url == null ? null : url.copy(); 12238 dst.identifier = identifier == null ? null : identifier.copy(); 12239 dst.version = version == null ? null : version.copy(); 12240 dst.name = name == null ? null : name.copy(); 12241 dst.title = title == null ? null : title.copy(); 12242 dst.status = status == null ? null : status.copy(); 12243 dst.experimental = experimental == null ? null : experimental.copy(); 12244 dst.date = date == null ? null : date.copy(); 12245 dst.publisher = publisher == null ? null : publisher.copy(); 12246 if (contact != null) { 12247 dst.contact = new ArrayList<ContactDetail>(); 12248 for (ContactDetail i : contact) 12249 dst.contact.add(i.copy()); 12250 }; 12251 dst.description = description == null ? null : description.copy(); 12252 if (useContext != null) { 12253 dst.useContext = new ArrayList<UsageContext>(); 12254 for (UsageContext i : useContext) 12255 dst.useContext.add(i.copy()); 12256 }; 12257 if (jurisdiction != null) { 12258 dst.jurisdiction = new ArrayList<CodeableConcept>(); 12259 for (CodeableConcept i : jurisdiction) 12260 dst.jurisdiction.add(i.copy()); 12261 }; 12262 dst.purpose = purpose == null ? null : purpose.copy(); 12263 dst.copyright = copyright == null ? null : copyright.copy(); 12264 if (origin != null) { 12265 dst.origin = new ArrayList<TestScriptOriginComponent>(); 12266 for (TestScriptOriginComponent i : origin) 12267 dst.origin.add(i.copy()); 12268 }; 12269 if (destination != null) { 12270 dst.destination = new ArrayList<TestScriptDestinationComponent>(); 12271 for (TestScriptDestinationComponent i : destination) 12272 dst.destination.add(i.copy()); 12273 }; 12274 dst.metadata = metadata == null ? null : metadata.copy(); 12275 if (fixture != null) { 12276 dst.fixture = new ArrayList<TestScriptFixtureComponent>(); 12277 for (TestScriptFixtureComponent i : fixture) 12278 dst.fixture.add(i.copy()); 12279 }; 12280 if (profile != null) { 12281 dst.profile = new ArrayList<Reference>(); 12282 for (Reference i : profile) 12283 dst.profile.add(i.copy()); 12284 }; 12285 if (variable != null) { 12286 dst.variable = new ArrayList<TestScriptVariableComponent>(); 12287 for (TestScriptVariableComponent i : variable) 12288 dst.variable.add(i.copy()); 12289 }; 12290 if (rule != null) { 12291 dst.rule = new ArrayList<TestScriptRuleComponent>(); 12292 for (TestScriptRuleComponent i : rule) 12293 dst.rule.add(i.copy()); 12294 }; 12295 if (ruleset != null) { 12296 dst.ruleset = new ArrayList<TestScriptRulesetComponent>(); 12297 for (TestScriptRulesetComponent i : ruleset) 12298 dst.ruleset.add(i.copy()); 12299 }; 12300 dst.setup = setup == null ? null : setup.copy(); 12301 if (test != null) { 12302 dst.test = new ArrayList<TestScriptTestComponent>(); 12303 for (TestScriptTestComponent i : test) 12304 dst.test.add(i.copy()); 12305 }; 12306 dst.teardown = teardown == null ? null : teardown.copy(); 12307 return dst; 12308 } 12309 12310 protected TestScript typedCopy() { 12311 return copy(); 12312 } 12313 12314 @Override 12315 public boolean equalsDeep(Base other_) { 12316 if (!super.equalsDeep(other_)) 12317 return false; 12318 if (!(other_ instanceof TestScript)) 12319 return false; 12320 TestScript o = (TestScript) other_; 12321 return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true) 12322 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true) 12323 && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true) 12324 && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(setup, o.setup, true) 12325 && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true); 12326 } 12327 12328 @Override 12329 public boolean equalsShallow(Base other_) { 12330 if (!super.equalsShallow(other_)) 12331 return false; 12332 if (!(other_ instanceof TestScript)) 12333 return false; 12334 TestScript o = (TestScript) other_; 12335 return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true); 12336 } 12337 12338 public boolean isEmpty() { 12339 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright 12340 , origin, destination, metadata, fixture, profile, variable, rule, ruleset, setup 12341 , test, teardown); 12342 } 12343 12344 @Override 12345 public ResourceType getResourceType() { 12346 return ResourceType.TestScript; 12347 } 12348 12349 /** 12350 * Search parameter: <b>date</b> 12351 * <p> 12352 * Description: <b>The test script publication date</b><br> 12353 * Type: <b>date</b><br> 12354 * Path: <b>TestScript.date</b><br> 12355 * </p> 12356 */ 12357 @SearchParamDefinition(name="date", path="TestScript.date", description="The test script publication date", type="date" ) 12358 public static final String SP_DATE = "date"; 12359 /** 12360 * <b>Fluent Client</b> search parameter constant for <b>date</b> 12361 * <p> 12362 * Description: <b>The test script publication date</b><br> 12363 * Type: <b>date</b><br> 12364 * Path: <b>TestScript.date</b><br> 12365 * </p> 12366 */ 12367 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 12368 12369 /** 12370 * Search parameter: <b>identifier</b> 12371 * <p> 12372 * Description: <b>External identifier for the test script</b><br> 12373 * Type: <b>token</b><br> 12374 * Path: <b>TestScript.identifier</b><br> 12375 * </p> 12376 */ 12377 @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier for the test script", type="token" ) 12378 public static final String SP_IDENTIFIER = "identifier"; 12379 /** 12380 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 12381 * <p> 12382 * Description: <b>External identifier for the test script</b><br> 12383 * Type: <b>token</b><br> 12384 * Path: <b>TestScript.identifier</b><br> 12385 * </p> 12386 */ 12387 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 12388 12389 /** 12390 * Search parameter: <b>jurisdiction</b> 12391 * <p> 12392 * Description: <b>Intended jurisdiction for the test script</b><br> 12393 * Type: <b>token</b><br> 12394 * Path: <b>TestScript.jurisdiction</b><br> 12395 * </p> 12396 */ 12397 @SearchParamDefinition(name="jurisdiction", path="TestScript.jurisdiction", description="Intended jurisdiction for the test script", type="token" ) 12398 public static final String SP_JURISDICTION = "jurisdiction"; 12399 /** 12400 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 12401 * <p> 12402 * Description: <b>Intended jurisdiction for the test script</b><br> 12403 * Type: <b>token</b><br> 12404 * Path: <b>TestScript.jurisdiction</b><br> 12405 * </p> 12406 */ 12407 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 12408 12409 /** 12410 * Search parameter: <b>name</b> 12411 * <p> 12412 * Description: <b>Computationally friendly name of the test script</b><br> 12413 * Type: <b>string</b><br> 12414 * Path: <b>TestScript.name</b><br> 12415 * </p> 12416 */ 12417 @SearchParamDefinition(name="name", path="TestScript.name", description="Computationally friendly name of the test script", type="string" ) 12418 public static final String SP_NAME = "name"; 12419 /** 12420 * <b>Fluent Client</b> search parameter constant for <b>name</b> 12421 * <p> 12422 * Description: <b>Computationally friendly name of the test script</b><br> 12423 * Type: <b>string</b><br> 12424 * Path: <b>TestScript.name</b><br> 12425 * </p> 12426 */ 12427 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 12428 12429 /** 12430 * Search parameter: <b>description</b> 12431 * <p> 12432 * Description: <b>The description of the test script</b><br> 12433 * Type: <b>string</b><br> 12434 * Path: <b>TestScript.description</b><br> 12435 * </p> 12436 */ 12437 @SearchParamDefinition(name="description", path="TestScript.description", description="The description of the test script", type="string" ) 12438 public static final String SP_DESCRIPTION = "description"; 12439 /** 12440 * <b>Fluent Client</b> search parameter constant for <b>description</b> 12441 * <p> 12442 * Description: <b>The description of the test script</b><br> 12443 * Type: <b>string</b><br> 12444 * Path: <b>TestScript.description</b><br> 12445 * </p> 12446 */ 12447 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 12448 12449 /** 12450 * Search parameter: <b>publisher</b> 12451 * <p> 12452 * Description: <b>Name of the publisher of the test script</b><br> 12453 * Type: <b>string</b><br> 12454 * Path: <b>TestScript.publisher</b><br> 12455 * </p> 12456 */ 12457 @SearchParamDefinition(name="publisher", path="TestScript.publisher", description="Name of the publisher of the test script", type="string" ) 12458 public static final String SP_PUBLISHER = "publisher"; 12459 /** 12460 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 12461 * <p> 12462 * Description: <b>Name of the publisher of the test script</b><br> 12463 * Type: <b>string</b><br> 12464 * Path: <b>TestScript.publisher</b><br> 12465 * </p> 12466 */ 12467 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 12468 12469 /** 12470 * Search parameter: <b>testscript-capability</b> 12471 * <p> 12472 * Description: <b>TestScript required and validated capability</b><br> 12473 * Type: <b>string</b><br> 12474 * Path: <b>TestScript.metadata.capability.description</b><br> 12475 * </p> 12476 */ 12477 @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" ) 12478 public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability"; 12479 /** 12480 * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b> 12481 * <p> 12482 * Description: <b>TestScript required and validated capability</b><br> 12483 * Type: <b>string</b><br> 12484 * Path: <b>TestScript.metadata.capability.description</b><br> 12485 * </p> 12486 */ 12487 public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY); 12488 12489 /** 12490 * Search parameter: <b>title</b> 12491 * <p> 12492 * Description: <b>The human-friendly name of the test script</b><br> 12493 * Type: <b>string</b><br> 12494 * Path: <b>TestScript.title</b><br> 12495 * </p> 12496 */ 12497 @SearchParamDefinition(name="title", path="TestScript.title", description="The human-friendly name of the test script", type="string" ) 12498 public static final String SP_TITLE = "title"; 12499 /** 12500 * <b>Fluent Client</b> search parameter constant for <b>title</b> 12501 * <p> 12502 * Description: <b>The human-friendly name of the test script</b><br> 12503 * Type: <b>string</b><br> 12504 * Path: <b>TestScript.title</b><br> 12505 * </p> 12506 */ 12507 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 12508 12509 /** 12510 * Search parameter: <b>version</b> 12511 * <p> 12512 * Description: <b>The business version of the test script</b><br> 12513 * Type: <b>token</b><br> 12514 * Path: <b>TestScript.version</b><br> 12515 * </p> 12516 */ 12517 @SearchParamDefinition(name="version", path="TestScript.version", description="The business version of the test script", type="token" ) 12518 public static final String SP_VERSION = "version"; 12519 /** 12520 * <b>Fluent Client</b> search parameter constant for <b>version</b> 12521 * <p> 12522 * Description: <b>The business version of the test script</b><br> 12523 * Type: <b>token</b><br> 12524 * Path: <b>TestScript.version</b><br> 12525 * </p> 12526 */ 12527 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 12528 12529 /** 12530 * Search parameter: <b>url</b> 12531 * <p> 12532 * Description: <b>The uri that identifies the test script</b><br> 12533 * Type: <b>uri</b><br> 12534 * Path: <b>TestScript.url</b><br> 12535 * </p> 12536 */ 12537 @SearchParamDefinition(name="url", path="TestScript.url", description="The uri that identifies the test script", type="uri" ) 12538 public static final String SP_URL = "url"; 12539 /** 12540 * <b>Fluent Client</b> search parameter constant for <b>url</b> 12541 * <p> 12542 * Description: <b>The uri that identifies the test script</b><br> 12543 * Type: <b>uri</b><br> 12544 * Path: <b>TestScript.url</b><br> 12545 * </p> 12546 */ 12547 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 12548 12549 /** 12550 * Search parameter: <b>status</b> 12551 * <p> 12552 * Description: <b>The current status of the test script</b><br> 12553 * Type: <b>token</b><br> 12554 * Path: <b>TestScript.status</b><br> 12555 * </p> 12556 */ 12557 @SearchParamDefinition(name="status", path="TestScript.status", description="The current status of the test script", type="token" ) 12558 public static final String SP_STATUS = "status"; 12559 /** 12560 * <b>Fluent Client</b> search parameter constant for <b>status</b> 12561 * <p> 12562 * Description: <b>The current status of the test script</b><br> 12563 * Type: <b>token</b><br> 12564 * Path: <b>TestScript.status</b><br> 12565 * </p> 12566 */ 12567 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 12568 12569 12570} 12571