001package org.hl7.fhir.r4.model; 002 003 004 005/* 006 Copyright (c) 2011+, HL7, Inc. 007 All rights reserved. 008 009 Redistribution and use in source and binary forms, with or without modification, 010 are permitted provided that the following conditions are met: 011 012 * Redistributions of source code must retain the above copyright notice, this 013 list of conditions and the following disclaimer. 014 * Redistributions in binary form must reproduce the above copyright notice, 015 this list of conditions and the following disclaimer in the documentation 016 and/or other materials provided with the distribution. 017 * Neither the name of HL7 nor the names of its contributors may be used to 018 endorse or promote products derived from this software without specific 019 prior written permission. 020 021 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 022 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 023 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 024 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 025 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 026 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 027 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 028 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 029 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 030 POSSIBILITY OF SUCH DAMAGE. 031 032*/ 033 034 035// Generated on Tue, May 12, 2020 07:26+1000 for FHIR v4.0.1 036 037import java.util.*; 038 039import org.hl7.fhir.utilities.Utilities; 040import org.hl7.fhir.r4.model.Enumerations.*; 041import ca.uhn.fhir.model.api.annotation.ResourceDef; 042import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 043import ca.uhn.fhir.model.api.annotation.Child; 044import ca.uhn.fhir.model.api.annotation.ChildOrder; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.Block; 047import org.hl7.fhir.instance.model.api.*; 048import org.hl7.fhir.exceptions.FHIRException; 049/** 050 * A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification. 051 */ 052@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/StructureDefinition/TestScript") 053@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "origin", "destination", "metadata", "fixture", "profile", "variable", "setup", "test", "teardown"}) 054public class TestScript extends MetadataResource { 055 056 public enum TestScriptRequestMethodCode { 057 /** 058 * HTTP DELETE operation. 059 */ 060 DELETE, 061 /** 062 * HTTP GET operation. 063 */ 064 GET, 065 /** 066 * HTTP OPTIONS operation. 067 */ 068 OPTIONS, 069 /** 070 * HTTP PATCH operation. 071 */ 072 PATCH, 073 /** 074 * HTTP POST operation. 075 */ 076 POST, 077 /** 078 * HTTP PUT operation. 079 */ 080 PUT, 081 /** 082 * HTTP HEAD operation. 083 */ 084 HEAD, 085 /** 086 * added to help the parsers with the generic types 087 */ 088 NULL; 089 public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException { 090 if (codeString == null || "".equals(codeString)) 091 return null; 092 if ("delete".equals(codeString)) 093 return DELETE; 094 if ("get".equals(codeString)) 095 return GET; 096 if ("options".equals(codeString)) 097 return OPTIONS; 098 if ("patch".equals(codeString)) 099 return PATCH; 100 if ("post".equals(codeString)) 101 return POST; 102 if ("put".equals(codeString)) 103 return PUT; 104 if ("head".equals(codeString)) 105 return HEAD; 106 if (Configuration.isAcceptInvalidEnums()) 107 return null; 108 else 109 throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 110 } 111 public String toCode() { 112 switch (this) { 113 case DELETE: return "delete"; 114 case GET: return "get"; 115 case OPTIONS: return "options"; 116 case PATCH: return "patch"; 117 case POST: return "post"; 118 case PUT: return "put"; 119 case HEAD: return "head"; 120 case NULL: return null; 121 default: return "?"; 122 } 123 } 124 public String getSystem() { 125 switch (this) { 126 case DELETE: return "http://hl7.org/fhir/http-operations"; 127 case GET: return "http://hl7.org/fhir/http-operations"; 128 case OPTIONS: return "http://hl7.org/fhir/http-operations"; 129 case PATCH: return "http://hl7.org/fhir/http-operations"; 130 case POST: return "http://hl7.org/fhir/http-operations"; 131 case PUT: return "http://hl7.org/fhir/http-operations"; 132 case HEAD: return "http://hl7.org/fhir/http-operations"; 133 case NULL: return null; 134 default: return "?"; 135 } 136 } 137 public String getDefinition() { 138 switch (this) { 139 case DELETE: return "HTTP DELETE operation."; 140 case GET: return "HTTP GET operation."; 141 case OPTIONS: return "HTTP OPTIONS operation."; 142 case PATCH: return "HTTP PATCH operation."; 143 case POST: return "HTTP POST operation."; 144 case PUT: return "HTTP PUT operation."; 145 case HEAD: return "HTTP HEAD operation."; 146 case NULL: return null; 147 default: return "?"; 148 } 149 } 150 public String getDisplay() { 151 switch (this) { 152 case DELETE: return "DELETE"; 153 case GET: return "GET"; 154 case OPTIONS: return "OPTIONS"; 155 case PATCH: return "PATCH"; 156 case POST: return "POST"; 157 case PUT: return "PUT"; 158 case HEAD: return "HEAD"; 159 case NULL: return null; 160 default: return "?"; 161 } 162 } 163 } 164 165 public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> { 166 public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException { 167 if (codeString == null || "".equals(codeString)) 168 if (codeString == null || "".equals(codeString)) 169 return null; 170 if ("delete".equals(codeString)) 171 return TestScriptRequestMethodCode.DELETE; 172 if ("get".equals(codeString)) 173 return TestScriptRequestMethodCode.GET; 174 if ("options".equals(codeString)) 175 return TestScriptRequestMethodCode.OPTIONS; 176 if ("patch".equals(codeString)) 177 return TestScriptRequestMethodCode.PATCH; 178 if ("post".equals(codeString)) 179 return TestScriptRequestMethodCode.POST; 180 if ("put".equals(codeString)) 181 return TestScriptRequestMethodCode.PUT; 182 if ("head".equals(codeString)) 183 return TestScriptRequestMethodCode.HEAD; 184 throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 185 } 186 public Enumeration<TestScriptRequestMethodCode> fromType(Base code) throws FHIRException { 187 if (code == null) 188 return null; 189 if (code.isEmpty()) 190 return new Enumeration<TestScriptRequestMethodCode>(this); 191 String codeString = ((PrimitiveType) code).asStringValue(); 192 if (codeString == null || "".equals(codeString)) 193 return null; 194 if ("delete".equals(codeString)) 195 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE); 196 if ("get".equals(codeString)) 197 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET); 198 if ("options".equals(codeString)) 199 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS); 200 if ("patch".equals(codeString)) 201 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH); 202 if ("post".equals(codeString)) 203 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST); 204 if ("put".equals(codeString)) 205 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT); 206 if ("head".equals(codeString)) 207 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.HEAD); 208 throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 209 } 210 public String toCode(TestScriptRequestMethodCode code) { 211 if (code == TestScriptRequestMethodCode.DELETE) 212 return "delete"; 213 if (code == TestScriptRequestMethodCode.GET) 214 return "get"; 215 if (code == TestScriptRequestMethodCode.OPTIONS) 216 return "options"; 217 if (code == TestScriptRequestMethodCode.PATCH) 218 return "patch"; 219 if (code == TestScriptRequestMethodCode.POST) 220 return "post"; 221 if (code == TestScriptRequestMethodCode.PUT) 222 return "put"; 223 if (code == TestScriptRequestMethodCode.HEAD) 224 return "head"; 225 return "?"; 226 } 227 public String toSystem(TestScriptRequestMethodCode code) { 228 return code.getSystem(); 229 } 230 } 231 232 public enum AssertionDirectionType { 233 /** 234 * The assertion is evaluated on the response. This is the default value. 235 */ 236 RESPONSE, 237 /** 238 * The assertion is evaluated on the request. 239 */ 240 REQUEST, 241 /** 242 * added to help the parsers with the generic types 243 */ 244 NULL; 245 public static AssertionDirectionType fromCode(String codeString) throws FHIRException { 246 if (codeString == null || "".equals(codeString)) 247 return null; 248 if ("response".equals(codeString)) 249 return RESPONSE; 250 if ("request".equals(codeString)) 251 return REQUEST; 252 if (Configuration.isAcceptInvalidEnums()) 253 return null; 254 else 255 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 256 } 257 public String toCode() { 258 switch (this) { 259 case RESPONSE: return "response"; 260 case REQUEST: return "request"; 261 case NULL: return null; 262 default: return "?"; 263 } 264 } 265 public String getSystem() { 266 switch (this) { 267 case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes"; 268 case REQUEST: return "http://hl7.org/fhir/assert-direction-codes"; 269 case NULL: return null; 270 default: return "?"; 271 } 272 } 273 public String getDefinition() { 274 switch (this) { 275 case RESPONSE: return "The assertion is evaluated on the response. This is the default value."; 276 case REQUEST: return "The assertion is evaluated on the request."; 277 case NULL: return null; 278 default: return "?"; 279 } 280 } 281 public String getDisplay() { 282 switch (this) { 283 case RESPONSE: return "response"; 284 case REQUEST: return "request"; 285 case NULL: return null; 286 default: return "?"; 287 } 288 } 289 } 290 291 public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> { 292 public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException { 293 if (codeString == null || "".equals(codeString)) 294 if (codeString == null || "".equals(codeString)) 295 return null; 296 if ("response".equals(codeString)) 297 return AssertionDirectionType.RESPONSE; 298 if ("request".equals(codeString)) 299 return AssertionDirectionType.REQUEST; 300 throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'"); 301 } 302 public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException { 303 if (code == null) 304 return null; 305 if (code.isEmpty()) 306 return new Enumeration<AssertionDirectionType>(this); 307 String codeString = ((PrimitiveType) code).asStringValue(); 308 if (codeString == null || "".equals(codeString)) 309 return null; 310 if ("response".equals(codeString)) 311 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE); 312 if ("request".equals(codeString)) 313 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST); 314 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 315 } 316 public String toCode(AssertionDirectionType code) { 317 if (code == AssertionDirectionType.RESPONSE) 318 return "response"; 319 if (code == AssertionDirectionType.REQUEST) 320 return "request"; 321 return "?"; 322 } 323 public String toSystem(AssertionDirectionType code) { 324 return code.getSystem(); 325 } 326 } 327 328 public enum AssertionOperatorType { 329 /** 330 * Default value. Equals comparison. 331 */ 332 EQUALS, 333 /** 334 * Not equals comparison. 335 */ 336 NOTEQUALS, 337 /** 338 * Compare value within a known set of values. 339 */ 340 IN, 341 /** 342 * Compare value not within a known set of values. 343 */ 344 NOTIN, 345 /** 346 * Compare value to be greater than a known value. 347 */ 348 GREATERTHAN, 349 /** 350 * Compare value to be less than a known value. 351 */ 352 LESSTHAN, 353 /** 354 * Compare value is empty. 355 */ 356 EMPTY, 357 /** 358 * Compare value is not empty. 359 */ 360 NOTEMPTY, 361 /** 362 * Compare value string contains a known value. 363 */ 364 CONTAINS, 365 /** 366 * Compare value string does not contain a known value. 367 */ 368 NOTCONTAINS, 369 /** 370 * Evaluate the FHIRPath expression as a boolean condition. 371 */ 372 EVAL, 373 /** 374 * added to help the parsers with the generic types 375 */ 376 NULL; 377 public static AssertionOperatorType fromCode(String codeString) throws FHIRException { 378 if (codeString == null || "".equals(codeString)) 379 return null; 380 if ("equals".equals(codeString)) 381 return EQUALS; 382 if ("notEquals".equals(codeString)) 383 return NOTEQUALS; 384 if ("in".equals(codeString)) 385 return IN; 386 if ("notIn".equals(codeString)) 387 return NOTIN; 388 if ("greaterThan".equals(codeString)) 389 return GREATERTHAN; 390 if ("lessThan".equals(codeString)) 391 return LESSTHAN; 392 if ("empty".equals(codeString)) 393 return EMPTY; 394 if ("notEmpty".equals(codeString)) 395 return NOTEMPTY; 396 if ("contains".equals(codeString)) 397 return CONTAINS; 398 if ("notContains".equals(codeString)) 399 return NOTCONTAINS; 400 if ("eval".equals(codeString)) 401 return EVAL; 402 if (Configuration.isAcceptInvalidEnums()) 403 return null; 404 else 405 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 406 } 407 public String toCode() { 408 switch (this) { 409 case EQUALS: return "equals"; 410 case NOTEQUALS: return "notEquals"; 411 case IN: return "in"; 412 case NOTIN: return "notIn"; 413 case GREATERTHAN: return "greaterThan"; 414 case LESSTHAN: return "lessThan"; 415 case EMPTY: return "empty"; 416 case NOTEMPTY: return "notEmpty"; 417 case CONTAINS: return "contains"; 418 case NOTCONTAINS: return "notContains"; 419 case EVAL: return "eval"; 420 case NULL: return null; 421 default: return "?"; 422 } 423 } 424 public String getSystem() { 425 switch (this) { 426 case EQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 427 case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 428 case IN: return "http://hl7.org/fhir/assert-operator-codes"; 429 case NOTIN: return "http://hl7.org/fhir/assert-operator-codes"; 430 case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 431 case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 432 case EMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 433 case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 434 case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 435 case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 436 case EVAL: return "http://hl7.org/fhir/assert-operator-codes"; 437 case NULL: return null; 438 default: return "?"; 439 } 440 } 441 public String getDefinition() { 442 switch (this) { 443 case EQUALS: return "Default value. Equals comparison."; 444 case NOTEQUALS: return "Not equals comparison."; 445 case IN: return "Compare value within a known set of values."; 446 case NOTIN: return "Compare value not within a known set of values."; 447 case GREATERTHAN: return "Compare value to be greater than a known value."; 448 case LESSTHAN: return "Compare value to be less than a known value."; 449 case EMPTY: return "Compare value is empty."; 450 case NOTEMPTY: return "Compare value is not empty."; 451 case CONTAINS: return "Compare value string contains a known value."; 452 case NOTCONTAINS: return "Compare value string does not contain a known value."; 453 case EVAL: return "Evaluate the FHIRPath expression as a boolean condition."; 454 case NULL: return null; 455 default: return "?"; 456 } 457 } 458 public String getDisplay() { 459 switch (this) { 460 case EQUALS: return "equals"; 461 case NOTEQUALS: return "notEquals"; 462 case IN: return "in"; 463 case NOTIN: return "notIn"; 464 case GREATERTHAN: return "greaterThan"; 465 case LESSTHAN: return "lessThan"; 466 case EMPTY: return "empty"; 467 case NOTEMPTY: return "notEmpty"; 468 case CONTAINS: return "contains"; 469 case NOTCONTAINS: return "notContains"; 470 case EVAL: return "evaluate"; 471 case NULL: return null; 472 default: return "?"; 473 } 474 } 475 } 476 477 public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> { 478 public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException { 479 if (codeString == null || "".equals(codeString)) 480 if (codeString == null || "".equals(codeString)) 481 return null; 482 if ("equals".equals(codeString)) 483 return AssertionOperatorType.EQUALS; 484 if ("notEquals".equals(codeString)) 485 return AssertionOperatorType.NOTEQUALS; 486 if ("in".equals(codeString)) 487 return AssertionOperatorType.IN; 488 if ("notIn".equals(codeString)) 489 return AssertionOperatorType.NOTIN; 490 if ("greaterThan".equals(codeString)) 491 return AssertionOperatorType.GREATERTHAN; 492 if ("lessThan".equals(codeString)) 493 return AssertionOperatorType.LESSTHAN; 494 if ("empty".equals(codeString)) 495 return AssertionOperatorType.EMPTY; 496 if ("notEmpty".equals(codeString)) 497 return AssertionOperatorType.NOTEMPTY; 498 if ("contains".equals(codeString)) 499 return AssertionOperatorType.CONTAINS; 500 if ("notContains".equals(codeString)) 501 return AssertionOperatorType.NOTCONTAINS; 502 if ("eval".equals(codeString)) 503 return AssertionOperatorType.EVAL; 504 throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'"); 505 } 506 public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException { 507 if (code == null) 508 return null; 509 if (code.isEmpty()) 510 return new Enumeration<AssertionOperatorType>(this); 511 String codeString = ((PrimitiveType) code).asStringValue(); 512 if (codeString == null || "".equals(codeString)) 513 return null; 514 if ("equals".equals(codeString)) 515 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS); 516 if ("notEquals".equals(codeString)) 517 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS); 518 if ("in".equals(codeString)) 519 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN); 520 if ("notIn".equals(codeString)) 521 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN); 522 if ("greaterThan".equals(codeString)) 523 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN); 524 if ("lessThan".equals(codeString)) 525 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN); 526 if ("empty".equals(codeString)) 527 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY); 528 if ("notEmpty".equals(codeString)) 529 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY); 530 if ("contains".equals(codeString)) 531 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS); 532 if ("notContains".equals(codeString)) 533 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS); 534 if ("eval".equals(codeString)) 535 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL); 536 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 537 } 538 public String toCode(AssertionOperatorType code) { 539 if (code == AssertionOperatorType.EQUALS) 540 return "equals"; 541 if (code == AssertionOperatorType.NOTEQUALS) 542 return "notEquals"; 543 if (code == AssertionOperatorType.IN) 544 return "in"; 545 if (code == AssertionOperatorType.NOTIN) 546 return "notIn"; 547 if (code == AssertionOperatorType.GREATERTHAN) 548 return "greaterThan"; 549 if (code == AssertionOperatorType.LESSTHAN) 550 return "lessThan"; 551 if (code == AssertionOperatorType.EMPTY) 552 return "empty"; 553 if (code == AssertionOperatorType.NOTEMPTY) 554 return "notEmpty"; 555 if (code == AssertionOperatorType.CONTAINS) 556 return "contains"; 557 if (code == AssertionOperatorType.NOTCONTAINS) 558 return "notContains"; 559 if (code == AssertionOperatorType.EVAL) 560 return "eval"; 561 return "?"; 562 } 563 public String toSystem(AssertionOperatorType code) { 564 return code.getSystem(); 565 } 566 } 567 568 public enum AssertionResponseTypes { 569 /** 570 * Response code is 200. 571 */ 572 OKAY, 573 /** 574 * Response code is 201. 575 */ 576 CREATED, 577 /** 578 * Response code is 204. 579 */ 580 NOCONTENT, 581 /** 582 * Response code is 304. 583 */ 584 NOTMODIFIED, 585 /** 586 * Response code is 400. 587 */ 588 BAD, 589 /** 590 * Response code is 403. 591 */ 592 FORBIDDEN, 593 /** 594 * Response code is 404. 595 */ 596 NOTFOUND, 597 /** 598 * Response code is 405. 599 */ 600 METHODNOTALLOWED, 601 /** 602 * Response code is 409. 603 */ 604 CONFLICT, 605 /** 606 * Response code is 410. 607 */ 608 GONE, 609 /** 610 * Response code is 412. 611 */ 612 PRECONDITIONFAILED, 613 /** 614 * Response code is 422. 615 */ 616 UNPROCESSABLE, 617 /** 618 * added to help the parsers with the generic types 619 */ 620 NULL; 621 public static AssertionResponseTypes fromCode(String codeString) throws FHIRException { 622 if (codeString == null || "".equals(codeString)) 623 return null; 624 if ("okay".equals(codeString)) 625 return OKAY; 626 if ("created".equals(codeString)) 627 return CREATED; 628 if ("noContent".equals(codeString)) 629 return NOCONTENT; 630 if ("notModified".equals(codeString)) 631 return NOTMODIFIED; 632 if ("bad".equals(codeString)) 633 return BAD; 634 if ("forbidden".equals(codeString)) 635 return FORBIDDEN; 636 if ("notFound".equals(codeString)) 637 return NOTFOUND; 638 if ("methodNotAllowed".equals(codeString)) 639 return METHODNOTALLOWED; 640 if ("conflict".equals(codeString)) 641 return CONFLICT; 642 if ("gone".equals(codeString)) 643 return GONE; 644 if ("preconditionFailed".equals(codeString)) 645 return PRECONDITIONFAILED; 646 if ("unprocessable".equals(codeString)) 647 return UNPROCESSABLE; 648 if (Configuration.isAcceptInvalidEnums()) 649 return null; 650 else 651 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 652 } 653 public String toCode() { 654 switch (this) { 655 case OKAY: return "okay"; 656 case CREATED: return "created"; 657 case NOCONTENT: return "noContent"; 658 case NOTMODIFIED: return "notModified"; 659 case BAD: return "bad"; 660 case FORBIDDEN: return "forbidden"; 661 case NOTFOUND: return "notFound"; 662 case METHODNOTALLOWED: return "methodNotAllowed"; 663 case CONFLICT: return "conflict"; 664 case GONE: return "gone"; 665 case PRECONDITIONFAILED: return "preconditionFailed"; 666 case UNPROCESSABLE: return "unprocessable"; 667 case NULL: return null; 668 default: return "?"; 669 } 670 } 671 public String getSystem() { 672 switch (this) { 673 case OKAY: return "http://hl7.org/fhir/assert-response-code-types"; 674 case CREATED: return "http://hl7.org/fhir/assert-response-code-types"; 675 case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types"; 676 case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types"; 677 case BAD: return "http://hl7.org/fhir/assert-response-code-types"; 678 case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types"; 679 case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types"; 680 case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types"; 681 case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types"; 682 case GONE: return "http://hl7.org/fhir/assert-response-code-types"; 683 case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types"; 684 case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types"; 685 case NULL: return null; 686 default: return "?"; 687 } 688 } 689 public String getDefinition() { 690 switch (this) { 691 case OKAY: return "Response code is 200."; 692 case CREATED: return "Response code is 201."; 693 case NOCONTENT: return "Response code is 204."; 694 case NOTMODIFIED: return "Response code is 304."; 695 case BAD: return "Response code is 400."; 696 case FORBIDDEN: return "Response code is 403."; 697 case NOTFOUND: return "Response code is 404."; 698 case METHODNOTALLOWED: return "Response code is 405."; 699 case CONFLICT: return "Response code is 409."; 700 case GONE: return "Response code is 410."; 701 case PRECONDITIONFAILED: return "Response code is 412."; 702 case UNPROCESSABLE: return "Response code is 422."; 703 case NULL: return null; 704 default: return "?"; 705 } 706 } 707 public String getDisplay() { 708 switch (this) { 709 case OKAY: return "okay"; 710 case CREATED: return "created"; 711 case NOCONTENT: return "noContent"; 712 case NOTMODIFIED: return "notModified"; 713 case BAD: return "bad"; 714 case FORBIDDEN: return "forbidden"; 715 case NOTFOUND: return "notFound"; 716 case METHODNOTALLOWED: return "methodNotAllowed"; 717 case CONFLICT: return "conflict"; 718 case GONE: return "gone"; 719 case PRECONDITIONFAILED: return "preconditionFailed"; 720 case UNPROCESSABLE: return "unprocessable"; 721 case NULL: return null; 722 default: return "?"; 723 } 724 } 725 } 726 727 public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> { 728 public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException { 729 if (codeString == null || "".equals(codeString)) 730 if (codeString == null || "".equals(codeString)) 731 return null; 732 if ("okay".equals(codeString)) 733 return AssertionResponseTypes.OKAY; 734 if ("created".equals(codeString)) 735 return AssertionResponseTypes.CREATED; 736 if ("noContent".equals(codeString)) 737 return AssertionResponseTypes.NOCONTENT; 738 if ("notModified".equals(codeString)) 739 return AssertionResponseTypes.NOTMODIFIED; 740 if ("bad".equals(codeString)) 741 return AssertionResponseTypes.BAD; 742 if ("forbidden".equals(codeString)) 743 return AssertionResponseTypes.FORBIDDEN; 744 if ("notFound".equals(codeString)) 745 return AssertionResponseTypes.NOTFOUND; 746 if ("methodNotAllowed".equals(codeString)) 747 return AssertionResponseTypes.METHODNOTALLOWED; 748 if ("conflict".equals(codeString)) 749 return AssertionResponseTypes.CONFLICT; 750 if ("gone".equals(codeString)) 751 return AssertionResponseTypes.GONE; 752 if ("preconditionFailed".equals(codeString)) 753 return AssertionResponseTypes.PRECONDITIONFAILED; 754 if ("unprocessable".equals(codeString)) 755 return AssertionResponseTypes.UNPROCESSABLE; 756 throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'"); 757 } 758 public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException { 759 if (code == null) 760 return null; 761 if (code.isEmpty()) 762 return new Enumeration<AssertionResponseTypes>(this); 763 String codeString = ((PrimitiveType) code).asStringValue(); 764 if (codeString == null || "".equals(codeString)) 765 return null; 766 if ("okay".equals(codeString)) 767 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY); 768 if ("created".equals(codeString)) 769 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED); 770 if ("noContent".equals(codeString)) 771 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT); 772 if ("notModified".equals(codeString)) 773 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED); 774 if ("bad".equals(codeString)) 775 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD); 776 if ("forbidden".equals(codeString)) 777 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN); 778 if ("notFound".equals(codeString)) 779 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND); 780 if ("methodNotAllowed".equals(codeString)) 781 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED); 782 if ("conflict".equals(codeString)) 783 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT); 784 if ("gone".equals(codeString)) 785 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE); 786 if ("preconditionFailed".equals(codeString)) 787 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED); 788 if ("unprocessable".equals(codeString)) 789 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE); 790 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 791 } 792 public String toCode(AssertionResponseTypes code) { 793 if (code == AssertionResponseTypes.OKAY) 794 return "okay"; 795 if (code == AssertionResponseTypes.CREATED) 796 return "created"; 797 if (code == AssertionResponseTypes.NOCONTENT) 798 return "noContent"; 799 if (code == AssertionResponseTypes.NOTMODIFIED) 800 return "notModified"; 801 if (code == AssertionResponseTypes.BAD) 802 return "bad"; 803 if (code == AssertionResponseTypes.FORBIDDEN) 804 return "forbidden"; 805 if (code == AssertionResponseTypes.NOTFOUND) 806 return "notFound"; 807 if (code == AssertionResponseTypes.METHODNOTALLOWED) 808 return "methodNotAllowed"; 809 if (code == AssertionResponseTypes.CONFLICT) 810 return "conflict"; 811 if (code == AssertionResponseTypes.GONE) 812 return "gone"; 813 if (code == AssertionResponseTypes.PRECONDITIONFAILED) 814 return "preconditionFailed"; 815 if (code == AssertionResponseTypes.UNPROCESSABLE) 816 return "unprocessable"; 817 return "?"; 818 } 819 public String toSystem(AssertionResponseTypes code) { 820 return code.getSystem(); 821 } 822 } 823 824 @Block() 825 public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement { 826 /** 827 * Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 828 */ 829 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 830 @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." ) 831 protected IntegerType index; 832 833 /** 834 * The type of origin profile the test system supports. 835 */ 836 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 837 @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." ) 838 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types") 839 protected Coding profile; 840 841 private static final long serialVersionUID = -1239935149L; 842 843 /** 844 * Constructor 845 */ 846 public TestScriptOriginComponent() { 847 super(); 848 } 849 850 /** 851 * Constructor 852 */ 853 public TestScriptOriginComponent(IntegerType index, Coding profile) { 854 super(); 855 this.index = index; 856 this.profile = profile; 857 } 858 859 /** 860 * @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 861 */ 862 public IntegerType getIndexElement() { 863 if (this.index == null) 864 if (Configuration.errorOnAutoCreate()) 865 throw new Error("Attempt to auto-create TestScriptOriginComponent.index"); 866 else if (Configuration.doAutoCreate()) 867 this.index = new IntegerType(); // bb 868 return this.index; 869 } 870 871 public boolean hasIndexElement() { 872 return this.index != null && !this.index.isEmpty(); 873 } 874 875 public boolean hasIndex() { 876 return this.index != null && !this.index.isEmpty(); 877 } 878 879 /** 880 * @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 881 */ 882 public TestScriptOriginComponent setIndexElement(IntegerType value) { 883 this.index = value; 884 return this; 885 } 886 887 /** 888 * @return Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 889 */ 890 public int getIndex() { 891 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 892 } 893 894 /** 895 * @param value Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 896 */ 897 public TestScriptOriginComponent setIndex(int value) { 898 if (this.index == null) 899 this.index = new IntegerType(); 900 this.index.setValue(value); 901 return this; 902 } 903 904 /** 905 * @return {@link #profile} (The type of origin profile the test system supports.) 906 */ 907 public Coding getProfile() { 908 if (this.profile == null) 909 if (Configuration.errorOnAutoCreate()) 910 throw new Error("Attempt to auto-create TestScriptOriginComponent.profile"); 911 else if (Configuration.doAutoCreate()) 912 this.profile = new Coding(); // cc 913 return this.profile; 914 } 915 916 public boolean hasProfile() { 917 return this.profile != null && !this.profile.isEmpty(); 918 } 919 920 /** 921 * @param value {@link #profile} (The type of origin profile the test system supports.) 922 */ 923 public TestScriptOriginComponent setProfile(Coding value) { 924 this.profile = value; 925 return this; 926 } 927 928 protected void listChildren(List<Property> children) { 929 super.listChildren(children); 930 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)); 931 children.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile)); 932 } 933 934 @Override 935 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 936 switch (_hash) { 937 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); 938 case -309425751: /*profile*/ return new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile); 939 default: return super.getNamedProperty(_hash, _name, _checkValid); 940 } 941 942 } 943 944 @Override 945 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 946 switch (hash) { 947 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 948 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 949 default: return super.getProperty(hash, name, checkValid); 950 } 951 952 } 953 954 @Override 955 public Base setProperty(int hash, String name, Base value) throws FHIRException { 956 switch (hash) { 957 case 100346066: // index 958 this.index = castToInteger(value); // IntegerType 959 return value; 960 case -309425751: // profile 961 this.profile = castToCoding(value); // Coding 962 return value; 963 default: return super.setProperty(hash, name, value); 964 } 965 966 } 967 968 @Override 969 public Base setProperty(String name, Base value) throws FHIRException { 970 if (name.equals("index")) { 971 this.index = castToInteger(value); // IntegerType 972 } else if (name.equals("profile")) { 973 this.profile = castToCoding(value); // Coding 974 } else 975 return super.setProperty(name, value); 976 return value; 977 } 978 979 @Override 980 public Base makeProperty(int hash, String name) throws FHIRException { 981 switch (hash) { 982 case 100346066: return getIndexElement(); 983 case -309425751: return getProfile(); 984 default: return super.makeProperty(hash, name); 985 } 986 987 } 988 989 @Override 990 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 991 switch (hash) { 992 case 100346066: /*index*/ return new String[] {"integer"}; 993 case -309425751: /*profile*/ return new String[] {"Coding"}; 994 default: return super.getTypesForProperty(hash, name); 995 } 996 997 } 998 999 @Override 1000 public Base addChild(String name) throws FHIRException { 1001 if (name.equals("index")) { 1002 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1003 } 1004 else if (name.equals("profile")) { 1005 this.profile = new Coding(); 1006 return this.profile; 1007 } 1008 else 1009 return super.addChild(name); 1010 } 1011 1012 public TestScriptOriginComponent copy() { 1013 TestScriptOriginComponent dst = new TestScriptOriginComponent(); 1014 copyValues(dst); 1015 return dst; 1016 } 1017 1018 public void copyValues(TestScriptOriginComponent dst) { 1019 super.copyValues(dst); 1020 dst.index = index == null ? null : index.copy(); 1021 dst.profile = profile == null ? null : profile.copy(); 1022 } 1023 1024 @Override 1025 public boolean equalsDeep(Base other_) { 1026 if (!super.equalsDeep(other_)) 1027 return false; 1028 if (!(other_ instanceof TestScriptOriginComponent)) 1029 return false; 1030 TestScriptOriginComponent o = (TestScriptOriginComponent) other_; 1031 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1032 } 1033 1034 @Override 1035 public boolean equalsShallow(Base other_) { 1036 if (!super.equalsShallow(other_)) 1037 return false; 1038 if (!(other_ instanceof TestScriptOriginComponent)) 1039 return false; 1040 TestScriptOriginComponent o = (TestScriptOriginComponent) other_; 1041 return compareValues(index, o.index, true); 1042 } 1043 1044 public boolean isEmpty() { 1045 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile); 1046 } 1047 1048 public String fhirType() { 1049 return "TestScript.origin"; 1050 1051 } 1052 1053 } 1054 1055 @Block() 1056 public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement { 1057 /** 1058 * Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1059 */ 1060 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1061 @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." ) 1062 protected IntegerType index; 1063 1064 /** 1065 * The type of destination profile the test system supports. 1066 */ 1067 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 1068 @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." ) 1069 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types") 1070 protected Coding profile; 1071 1072 private static final long serialVersionUID = -1239935149L; 1073 1074 /** 1075 * Constructor 1076 */ 1077 public TestScriptDestinationComponent() { 1078 super(); 1079 } 1080 1081 /** 1082 * Constructor 1083 */ 1084 public TestScriptDestinationComponent(IntegerType index, Coding profile) { 1085 super(); 1086 this.index = index; 1087 this.profile = profile; 1088 } 1089 1090 /** 1091 * @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 1092 */ 1093 public IntegerType getIndexElement() { 1094 if (this.index == null) 1095 if (Configuration.errorOnAutoCreate()) 1096 throw new Error("Attempt to auto-create TestScriptDestinationComponent.index"); 1097 else if (Configuration.doAutoCreate()) 1098 this.index = new IntegerType(); // bb 1099 return this.index; 1100 } 1101 1102 public boolean hasIndexElement() { 1103 return this.index != null && !this.index.isEmpty(); 1104 } 1105 1106 public boolean hasIndex() { 1107 return this.index != null && !this.index.isEmpty(); 1108 } 1109 1110 /** 1111 * @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 1112 */ 1113 public TestScriptDestinationComponent setIndexElement(IntegerType value) { 1114 this.index = value; 1115 return this; 1116 } 1117 1118 /** 1119 * @return Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1120 */ 1121 public int getIndex() { 1122 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 1123 } 1124 1125 /** 1126 * @param value Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1127 */ 1128 public TestScriptDestinationComponent setIndex(int value) { 1129 if (this.index == null) 1130 this.index = new IntegerType(); 1131 this.index.setValue(value); 1132 return this; 1133 } 1134 1135 /** 1136 * @return {@link #profile} (The type of destination profile the test system supports.) 1137 */ 1138 public Coding getProfile() { 1139 if (this.profile == null) 1140 if (Configuration.errorOnAutoCreate()) 1141 throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile"); 1142 else if (Configuration.doAutoCreate()) 1143 this.profile = new Coding(); // cc 1144 return this.profile; 1145 } 1146 1147 public boolean hasProfile() { 1148 return this.profile != null && !this.profile.isEmpty(); 1149 } 1150 1151 /** 1152 * @param value {@link #profile} (The type of destination profile the test system supports.) 1153 */ 1154 public TestScriptDestinationComponent setProfile(Coding value) { 1155 this.profile = value; 1156 return this; 1157 } 1158 1159 protected void listChildren(List<Property> children) { 1160 super.listChildren(children); 1161 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)); 1162 children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile)); 1163 } 1164 1165 @Override 1166 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1167 switch (_hash) { 1168 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); 1169 case -309425751: /*profile*/ return new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile); 1170 default: return super.getNamedProperty(_hash, _name, _checkValid); 1171 } 1172 1173 } 1174 1175 @Override 1176 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1177 switch (hash) { 1178 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1179 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1180 default: return super.getProperty(hash, name, checkValid); 1181 } 1182 1183 } 1184 1185 @Override 1186 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1187 switch (hash) { 1188 case 100346066: // index 1189 this.index = castToInteger(value); // IntegerType 1190 return value; 1191 case -309425751: // profile 1192 this.profile = castToCoding(value); // Coding 1193 return value; 1194 default: return super.setProperty(hash, name, value); 1195 } 1196 1197 } 1198 1199 @Override 1200 public Base setProperty(String name, Base value) throws FHIRException { 1201 if (name.equals("index")) { 1202 this.index = castToInteger(value); // IntegerType 1203 } else if (name.equals("profile")) { 1204 this.profile = castToCoding(value); // Coding 1205 } else 1206 return super.setProperty(name, value); 1207 return value; 1208 } 1209 1210 @Override 1211 public Base makeProperty(int hash, String name) throws FHIRException { 1212 switch (hash) { 1213 case 100346066: return getIndexElement(); 1214 case -309425751: return getProfile(); 1215 default: return super.makeProperty(hash, name); 1216 } 1217 1218 } 1219 1220 @Override 1221 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1222 switch (hash) { 1223 case 100346066: /*index*/ return new String[] {"integer"}; 1224 case -309425751: /*profile*/ return new String[] {"Coding"}; 1225 default: return super.getTypesForProperty(hash, name); 1226 } 1227 1228 } 1229 1230 @Override 1231 public Base addChild(String name) throws FHIRException { 1232 if (name.equals("index")) { 1233 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1234 } 1235 else if (name.equals("profile")) { 1236 this.profile = new Coding(); 1237 return this.profile; 1238 } 1239 else 1240 return super.addChild(name); 1241 } 1242 1243 public TestScriptDestinationComponent copy() { 1244 TestScriptDestinationComponent dst = new TestScriptDestinationComponent(); 1245 copyValues(dst); 1246 return dst; 1247 } 1248 1249 public void copyValues(TestScriptDestinationComponent dst) { 1250 super.copyValues(dst); 1251 dst.index = index == null ? null : index.copy(); 1252 dst.profile = profile == null ? null : profile.copy(); 1253 } 1254 1255 @Override 1256 public boolean equalsDeep(Base other_) { 1257 if (!super.equalsDeep(other_)) 1258 return false; 1259 if (!(other_ instanceof TestScriptDestinationComponent)) 1260 return false; 1261 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_; 1262 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1263 } 1264 1265 @Override 1266 public boolean equalsShallow(Base other_) { 1267 if (!super.equalsShallow(other_)) 1268 return false; 1269 if (!(other_ instanceof TestScriptDestinationComponent)) 1270 return false; 1271 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_; 1272 return compareValues(index, o.index, true); 1273 } 1274 1275 public boolean isEmpty() { 1276 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile); 1277 } 1278 1279 public String fhirType() { 1280 return "TestScript.destination"; 1281 1282 } 1283 1284 } 1285 1286 @Block() 1287 public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement { 1288 /** 1289 * A link to the FHIR specification that this test is covering. 1290 */ 1291 @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1292 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." ) 1293 protected List<TestScriptMetadataLinkComponent> link; 1294 1295 /** 1296 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 1297 */ 1298 @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1299 @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." ) 1300 protected List<TestScriptMetadataCapabilityComponent> capability; 1301 1302 private static final long serialVersionUID = 745183328L; 1303 1304 /** 1305 * Constructor 1306 */ 1307 public TestScriptMetadataComponent() { 1308 super(); 1309 } 1310 1311 /** 1312 * @return {@link #link} (A link to the FHIR specification that this test is covering.) 1313 */ 1314 public List<TestScriptMetadataLinkComponent> getLink() { 1315 if (this.link == null) 1316 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1317 return this.link; 1318 } 1319 1320 /** 1321 * @return Returns a reference to <code>this</code> for easy method chaining 1322 */ 1323 public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 1324 this.link = theLink; 1325 return this; 1326 } 1327 1328 public boolean hasLink() { 1329 if (this.link == null) 1330 return false; 1331 for (TestScriptMetadataLinkComponent item : this.link) 1332 if (!item.isEmpty()) 1333 return true; 1334 return false; 1335 } 1336 1337 public TestScriptMetadataLinkComponent addLink() { //3 1338 TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent(); 1339 if (this.link == null) 1340 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1341 this.link.add(t); 1342 return t; 1343 } 1344 1345 public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3 1346 if (t == null) 1347 return this; 1348 if (this.link == null) 1349 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1350 this.link.add(t); 1351 return this; 1352 } 1353 1354 /** 1355 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist 1356 */ 1357 public TestScriptMetadataLinkComponent getLinkFirstRep() { 1358 if (getLink().isEmpty()) { 1359 addLink(); 1360 } 1361 return getLink().get(0); 1362 } 1363 1364 /** 1365 * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 1366 */ 1367 public List<TestScriptMetadataCapabilityComponent> getCapability() { 1368 if (this.capability == null) 1369 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1370 return this.capability; 1371 } 1372 1373 /** 1374 * @return Returns a reference to <code>this</code> for easy method chaining 1375 */ 1376 public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 1377 this.capability = theCapability; 1378 return this; 1379 } 1380 1381 public boolean hasCapability() { 1382 if (this.capability == null) 1383 return false; 1384 for (TestScriptMetadataCapabilityComponent item : this.capability) 1385 if (!item.isEmpty()) 1386 return true; 1387 return false; 1388 } 1389 1390 public TestScriptMetadataCapabilityComponent addCapability() { //3 1391 TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent(); 1392 if (this.capability == null) 1393 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1394 this.capability.add(t); 1395 return t; 1396 } 1397 1398 public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3 1399 if (t == null) 1400 return this; 1401 if (this.capability == null) 1402 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1403 this.capability.add(t); 1404 return this; 1405 } 1406 1407 /** 1408 * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist 1409 */ 1410 public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 1411 if (getCapability().isEmpty()) { 1412 addCapability(); 1413 } 1414 return getCapability().get(0); 1415 } 1416 1417 protected void listChildren(List<Property> children) { 1418 super.listChildren(children); 1419 children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link)); 1420 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)); 1421 } 1422 1423 @Override 1424 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1425 switch (_hash) { 1426 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); 1427 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); 1428 default: return super.getNamedProperty(_hash, _name, _checkValid); 1429 } 1430 1431 } 1432 1433 @Override 1434 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1435 switch (hash) { 1436 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent 1437 case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent 1438 default: return super.getProperty(hash, name, checkValid); 1439 } 1440 1441 } 1442 1443 @Override 1444 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1445 switch (hash) { 1446 case 3321850: // link 1447 this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent 1448 return value; 1449 case -783669992: // capability 1450 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent 1451 return value; 1452 default: return super.setProperty(hash, name, value); 1453 } 1454 1455 } 1456 1457 @Override 1458 public Base setProperty(String name, Base value) throws FHIRException { 1459 if (name.equals("link")) { 1460 this.getLink().add((TestScriptMetadataLinkComponent) value); 1461 } else if (name.equals("capability")) { 1462 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); 1463 } else 1464 return super.setProperty(name, value); 1465 return value; 1466 } 1467 1468 @Override 1469 public Base makeProperty(int hash, String name) throws FHIRException { 1470 switch (hash) { 1471 case 3321850: return addLink(); 1472 case -783669992: return addCapability(); 1473 default: return super.makeProperty(hash, name); 1474 } 1475 1476 } 1477 1478 @Override 1479 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1480 switch (hash) { 1481 case 3321850: /*link*/ return new String[] {}; 1482 case -783669992: /*capability*/ return new String[] {}; 1483 default: return super.getTypesForProperty(hash, name); 1484 } 1485 1486 } 1487 1488 @Override 1489 public Base addChild(String name) throws FHIRException { 1490 if (name.equals("link")) { 1491 return addLink(); 1492 } 1493 else if (name.equals("capability")) { 1494 return addCapability(); 1495 } 1496 else 1497 return super.addChild(name); 1498 } 1499 1500 public TestScriptMetadataComponent copy() { 1501 TestScriptMetadataComponent dst = new TestScriptMetadataComponent(); 1502 copyValues(dst); 1503 return dst; 1504 } 1505 1506 public void copyValues(TestScriptMetadataComponent dst) { 1507 super.copyValues(dst); 1508 if (link != null) { 1509 dst.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1510 for (TestScriptMetadataLinkComponent i : link) 1511 dst.link.add(i.copy()); 1512 }; 1513 if (capability != null) { 1514 dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1515 for (TestScriptMetadataCapabilityComponent i : capability) 1516 dst.capability.add(i.copy()); 1517 }; 1518 } 1519 1520 @Override 1521 public boolean equalsDeep(Base other_) { 1522 if (!super.equalsDeep(other_)) 1523 return false; 1524 if (!(other_ instanceof TestScriptMetadataComponent)) 1525 return false; 1526 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_; 1527 return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true); 1528 } 1529 1530 @Override 1531 public boolean equalsShallow(Base other_) { 1532 if (!super.equalsShallow(other_)) 1533 return false; 1534 if (!(other_ instanceof TestScriptMetadataComponent)) 1535 return false; 1536 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_; 1537 return true; 1538 } 1539 1540 public boolean isEmpty() { 1541 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability); 1542 } 1543 1544 public String fhirType() { 1545 return "TestScript.metadata"; 1546 1547 } 1548 1549 } 1550 1551 @Block() 1552 public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement { 1553 /** 1554 * URL to a particular requirement or feature within the FHIR specification. 1555 */ 1556 @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1557 @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." ) 1558 protected UriType url; 1559 1560 /** 1561 * Short description of the link. 1562 */ 1563 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1564 @Description(shortDefinition="Short description", formalDefinition="Short description of the link." ) 1565 protected StringType description; 1566 1567 private static final long serialVersionUID = 213372298L; 1568 1569 /** 1570 * Constructor 1571 */ 1572 public TestScriptMetadataLinkComponent() { 1573 super(); 1574 } 1575 1576 /** 1577 * Constructor 1578 */ 1579 public TestScriptMetadataLinkComponent(UriType url) { 1580 super(); 1581 this.url = url; 1582 } 1583 1584 /** 1585 * @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 1586 */ 1587 public UriType getUrlElement() { 1588 if (this.url == null) 1589 if (Configuration.errorOnAutoCreate()) 1590 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url"); 1591 else if (Configuration.doAutoCreate()) 1592 this.url = new UriType(); // bb 1593 return this.url; 1594 } 1595 1596 public boolean hasUrlElement() { 1597 return this.url != null && !this.url.isEmpty(); 1598 } 1599 1600 public boolean hasUrl() { 1601 return this.url != null && !this.url.isEmpty(); 1602 } 1603 1604 /** 1605 * @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 1606 */ 1607 public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 1608 this.url = value; 1609 return this; 1610 } 1611 1612 /** 1613 * @return URL to a particular requirement or feature within the FHIR specification. 1614 */ 1615 public String getUrl() { 1616 return this.url == null ? null : this.url.getValue(); 1617 } 1618 1619 /** 1620 * @param value URL to a particular requirement or feature within the FHIR specification. 1621 */ 1622 public TestScriptMetadataLinkComponent setUrl(String value) { 1623 if (this.url == null) 1624 this.url = new UriType(); 1625 this.url.setValue(value); 1626 return this; 1627 } 1628 1629 /** 1630 * @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 1631 */ 1632 public StringType getDescriptionElement() { 1633 if (this.description == null) 1634 if (Configuration.errorOnAutoCreate()) 1635 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description"); 1636 else if (Configuration.doAutoCreate()) 1637 this.description = new StringType(); // bb 1638 return this.description; 1639 } 1640 1641 public boolean hasDescriptionElement() { 1642 return this.description != null && !this.description.isEmpty(); 1643 } 1644 1645 public boolean hasDescription() { 1646 return this.description != null && !this.description.isEmpty(); 1647 } 1648 1649 /** 1650 * @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 1651 */ 1652 public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 1653 this.description = value; 1654 return this; 1655 } 1656 1657 /** 1658 * @return Short description of the link. 1659 */ 1660 public String getDescription() { 1661 return this.description == null ? null : this.description.getValue(); 1662 } 1663 1664 /** 1665 * @param value Short description of the link. 1666 */ 1667 public TestScriptMetadataLinkComponent setDescription(String value) { 1668 if (Utilities.noString(value)) 1669 this.description = null; 1670 else { 1671 if (this.description == null) 1672 this.description = new StringType(); 1673 this.description.setValue(value); 1674 } 1675 return this; 1676 } 1677 1678 protected void listChildren(List<Property> children) { 1679 super.listChildren(children); 1680 children.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url)); 1681 children.add(new Property("description", "string", "Short description of the link.", 0, 1, description)); 1682 } 1683 1684 @Override 1685 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1686 switch (_hash) { 1687 case 116079: /*url*/ return new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url); 1688 case -1724546052: /*description*/ return new Property("description", "string", "Short description of the link.", 0, 1, description); 1689 default: return super.getNamedProperty(_hash, _name, _checkValid); 1690 } 1691 1692 } 1693 1694 @Override 1695 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1696 switch (hash) { 1697 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1698 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1699 default: return super.getProperty(hash, name, checkValid); 1700 } 1701 1702 } 1703 1704 @Override 1705 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1706 switch (hash) { 1707 case 116079: // url 1708 this.url = castToUri(value); // UriType 1709 return value; 1710 case -1724546052: // description 1711 this.description = castToString(value); // StringType 1712 return value; 1713 default: return super.setProperty(hash, name, value); 1714 } 1715 1716 } 1717 1718 @Override 1719 public Base setProperty(String name, Base value) throws FHIRException { 1720 if (name.equals("url")) { 1721 this.url = castToUri(value); // UriType 1722 } else if (name.equals("description")) { 1723 this.description = castToString(value); // StringType 1724 } else 1725 return super.setProperty(name, value); 1726 return value; 1727 } 1728 1729 @Override 1730 public Base makeProperty(int hash, String name) throws FHIRException { 1731 switch (hash) { 1732 case 116079: return getUrlElement(); 1733 case -1724546052: return getDescriptionElement(); 1734 default: return super.makeProperty(hash, name); 1735 } 1736 1737 } 1738 1739 @Override 1740 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1741 switch (hash) { 1742 case 116079: /*url*/ return new String[] {"uri"}; 1743 case -1724546052: /*description*/ return new String[] {"string"}; 1744 default: return super.getTypesForProperty(hash, name); 1745 } 1746 1747 } 1748 1749 @Override 1750 public Base addChild(String name) throws FHIRException { 1751 if (name.equals("url")) { 1752 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 1753 } 1754 else if (name.equals("description")) { 1755 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 1756 } 1757 else 1758 return super.addChild(name); 1759 } 1760 1761 public TestScriptMetadataLinkComponent copy() { 1762 TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent(); 1763 copyValues(dst); 1764 return dst; 1765 } 1766 1767 public void copyValues(TestScriptMetadataLinkComponent dst) { 1768 super.copyValues(dst); 1769 dst.url = url == null ? null : url.copy(); 1770 dst.description = description == null ? null : description.copy(); 1771 } 1772 1773 @Override 1774 public boolean equalsDeep(Base other_) { 1775 if (!super.equalsDeep(other_)) 1776 return false; 1777 if (!(other_ instanceof TestScriptMetadataLinkComponent)) 1778 return false; 1779 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_; 1780 return compareDeep(url, o.url, true) && compareDeep(description, o.description, true); 1781 } 1782 1783 @Override 1784 public boolean equalsShallow(Base other_) { 1785 if (!super.equalsShallow(other_)) 1786 return false; 1787 if (!(other_ instanceof TestScriptMetadataLinkComponent)) 1788 return false; 1789 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_; 1790 return compareValues(url, o.url, true) && compareValues(description, o.description, true); 1791 } 1792 1793 public boolean isEmpty() { 1794 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description); 1795 } 1796 1797 public String fhirType() { 1798 return "TestScript.metadata.link"; 1799 1800 } 1801 1802 } 1803 1804 @Block() 1805 public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement { 1806 /** 1807 * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1808 */ 1809 @Child(name = "required", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1810 @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." ) 1811 protected BooleanType required; 1812 1813 /** 1814 * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1815 */ 1816 @Child(name = "validated", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false) 1817 @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." ) 1818 protected BooleanType validated; 1819 1820 /** 1821 * Description of the capabilities that this test script is requiring the server to support. 1822 */ 1823 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1824 @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." ) 1825 protected StringType description; 1826 1827 /** 1828 * Which origin server these requirements apply to. 1829 */ 1830 @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1831 @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." ) 1832 protected List<IntegerType> origin; 1833 1834 /** 1835 * Which server these requirements apply to. 1836 */ 1837 @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1838 @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." ) 1839 protected IntegerType destination; 1840 1841 /** 1842 * Links to the FHIR specification that describes this interaction and the resources involved in more detail. 1843 */ 1844 @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1845 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." ) 1846 protected List<UriType> link; 1847 1848 /** 1849 * 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. 1850 */ 1851 @Child(name = "capabilities", type = {CanonicalType.class}, order=7, min=1, max=1, modifier=false, summary=false) 1852 @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." ) 1853 protected CanonicalType capabilities; 1854 1855 private static final long serialVersionUID = -1368199288L; 1856 1857 /** 1858 * Constructor 1859 */ 1860 public TestScriptMetadataCapabilityComponent() { 1861 super(); 1862 } 1863 1864 /** 1865 * Constructor 1866 */ 1867 public TestScriptMetadataCapabilityComponent(BooleanType required, BooleanType validated, CanonicalType capabilities) { 1868 super(); 1869 this.required = required; 1870 this.validated = validated; 1871 this.capabilities = capabilities; 1872 } 1873 1874 /** 1875 * @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 1876 */ 1877 public BooleanType getRequiredElement() { 1878 if (this.required == null) 1879 if (Configuration.errorOnAutoCreate()) 1880 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required"); 1881 else if (Configuration.doAutoCreate()) 1882 this.required = new BooleanType(); // bb 1883 return this.required; 1884 } 1885 1886 public boolean hasRequiredElement() { 1887 return this.required != null && !this.required.isEmpty(); 1888 } 1889 1890 public boolean hasRequired() { 1891 return this.required != null && !this.required.isEmpty(); 1892 } 1893 1894 /** 1895 * @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 1896 */ 1897 public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 1898 this.required = value; 1899 return this; 1900 } 1901 1902 /** 1903 * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1904 */ 1905 public boolean getRequired() { 1906 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 1907 } 1908 1909 /** 1910 * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1911 */ 1912 public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 1913 if (this.required == null) 1914 this.required = new BooleanType(); 1915 this.required.setValue(value); 1916 return this; 1917 } 1918 1919 /** 1920 * @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 1921 */ 1922 public BooleanType getValidatedElement() { 1923 if (this.validated == null) 1924 if (Configuration.errorOnAutoCreate()) 1925 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated"); 1926 else if (Configuration.doAutoCreate()) 1927 this.validated = new BooleanType(); // bb 1928 return this.validated; 1929 } 1930 1931 public boolean hasValidatedElement() { 1932 return this.validated != null && !this.validated.isEmpty(); 1933 } 1934 1935 public boolean hasValidated() { 1936 return this.validated != null && !this.validated.isEmpty(); 1937 } 1938 1939 /** 1940 * @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 1941 */ 1942 public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 1943 this.validated = value; 1944 return this; 1945 } 1946 1947 /** 1948 * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1949 */ 1950 public boolean getValidated() { 1951 return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue(); 1952 } 1953 1954 /** 1955 * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1956 */ 1957 public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 1958 if (this.validated == null) 1959 this.validated = new BooleanType(); 1960 this.validated.setValue(value); 1961 return this; 1962 } 1963 1964 /** 1965 * @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 1966 */ 1967 public StringType getDescriptionElement() { 1968 if (this.description == null) 1969 if (Configuration.errorOnAutoCreate()) 1970 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description"); 1971 else if (Configuration.doAutoCreate()) 1972 this.description = new StringType(); // bb 1973 return this.description; 1974 } 1975 1976 public boolean hasDescriptionElement() { 1977 return this.description != null && !this.description.isEmpty(); 1978 } 1979 1980 public boolean hasDescription() { 1981 return this.description != null && !this.description.isEmpty(); 1982 } 1983 1984 /** 1985 * @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 1986 */ 1987 public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 1988 this.description = value; 1989 return this; 1990 } 1991 1992 /** 1993 * @return Description of the capabilities that this test script is requiring the server to support. 1994 */ 1995 public String getDescription() { 1996 return this.description == null ? null : this.description.getValue(); 1997 } 1998 1999 /** 2000 * @param value Description of the capabilities that this test script is requiring the server to support. 2001 */ 2002 public TestScriptMetadataCapabilityComponent setDescription(String value) { 2003 if (Utilities.noString(value)) 2004 this.description = null; 2005 else { 2006 if (this.description == null) 2007 this.description = new StringType(); 2008 this.description.setValue(value); 2009 } 2010 return this; 2011 } 2012 2013 /** 2014 * @return {@link #origin} (Which origin server these requirements apply to.) 2015 */ 2016 public List<IntegerType> getOrigin() { 2017 if (this.origin == null) 2018 this.origin = new ArrayList<IntegerType>(); 2019 return this.origin; 2020 } 2021 2022 /** 2023 * @return Returns a reference to <code>this</code> for easy method chaining 2024 */ 2025 public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 2026 this.origin = theOrigin; 2027 return this; 2028 } 2029 2030 public boolean hasOrigin() { 2031 if (this.origin == null) 2032 return false; 2033 for (IntegerType item : this.origin) 2034 if (!item.isEmpty()) 2035 return true; 2036 return false; 2037 } 2038 2039 /** 2040 * @return {@link #origin} (Which origin server these requirements apply to.) 2041 */ 2042 public IntegerType addOriginElement() {//2 2043 IntegerType t = new IntegerType(); 2044 if (this.origin == null) 2045 this.origin = new ArrayList<IntegerType>(); 2046 this.origin.add(t); 2047 return t; 2048 } 2049 2050 /** 2051 * @param value {@link #origin} (Which origin server these requirements apply to.) 2052 */ 2053 public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1 2054 IntegerType t = new IntegerType(); 2055 t.setValue(value); 2056 if (this.origin == null) 2057 this.origin = new ArrayList<IntegerType>(); 2058 this.origin.add(t); 2059 return this; 2060 } 2061 2062 /** 2063 * @param value {@link #origin} (Which origin server these requirements apply to.) 2064 */ 2065 public boolean hasOrigin(int value) { 2066 if (this.origin == null) 2067 return false; 2068 for (IntegerType v : this.origin) 2069 if (v.getValue().equals(value)) // integer 2070 return true; 2071 return false; 2072 } 2073 2074 /** 2075 * @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 2076 */ 2077 public IntegerType getDestinationElement() { 2078 if (this.destination == null) 2079 if (Configuration.errorOnAutoCreate()) 2080 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination"); 2081 else if (Configuration.doAutoCreate()) 2082 this.destination = new IntegerType(); // bb 2083 return this.destination; 2084 } 2085 2086 public boolean hasDestinationElement() { 2087 return this.destination != null && !this.destination.isEmpty(); 2088 } 2089 2090 public boolean hasDestination() { 2091 return this.destination != null && !this.destination.isEmpty(); 2092 } 2093 2094 /** 2095 * @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 2096 */ 2097 public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 2098 this.destination = value; 2099 return this; 2100 } 2101 2102 /** 2103 * @return Which server these requirements apply to. 2104 */ 2105 public int getDestination() { 2106 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 2107 } 2108 2109 /** 2110 * @param value Which server these requirements apply to. 2111 */ 2112 public TestScriptMetadataCapabilityComponent setDestination(int value) { 2113 if (this.destination == null) 2114 this.destination = new IntegerType(); 2115 this.destination.setValue(value); 2116 return this; 2117 } 2118 2119 /** 2120 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2121 */ 2122 public List<UriType> getLink() { 2123 if (this.link == null) 2124 this.link = new ArrayList<UriType>(); 2125 return this.link; 2126 } 2127 2128 /** 2129 * @return Returns a reference to <code>this</code> for easy method chaining 2130 */ 2131 public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 2132 this.link = theLink; 2133 return this; 2134 } 2135 2136 public boolean hasLink() { 2137 if (this.link == null) 2138 return false; 2139 for (UriType item : this.link) 2140 if (!item.isEmpty()) 2141 return true; 2142 return false; 2143 } 2144 2145 /** 2146 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2147 */ 2148 public UriType addLinkElement() {//2 2149 UriType t = new UriType(); 2150 if (this.link == null) 2151 this.link = new ArrayList<UriType>(); 2152 this.link.add(t); 2153 return t; 2154 } 2155 2156 /** 2157 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2158 */ 2159 public TestScriptMetadataCapabilityComponent addLink(String value) { //1 2160 UriType t = new UriType(); 2161 t.setValue(value); 2162 if (this.link == null) 2163 this.link = new ArrayList<UriType>(); 2164 this.link.add(t); 2165 return this; 2166 } 2167 2168 /** 2169 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2170 */ 2171 public boolean hasLink(String value) { 2172 if (this.link == null) 2173 return false; 2174 for (UriType v : this.link) 2175 if (v.getValue().equals(value)) // uri 2176 return true; 2177 return false; 2178 } 2179 2180 /** 2181 * @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.). This is the underlying object with id, value and extensions. The accessor "getCapabilities" gives direct access to the value 2182 */ 2183 public CanonicalType getCapabilitiesElement() { 2184 if (this.capabilities == null) 2185 if (Configuration.errorOnAutoCreate()) 2186 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities"); 2187 else if (Configuration.doAutoCreate()) 2188 this.capabilities = new CanonicalType(); // bb 2189 return this.capabilities; 2190 } 2191 2192 public boolean hasCapabilitiesElement() { 2193 return this.capabilities != null && !this.capabilities.isEmpty(); 2194 } 2195 2196 public boolean hasCapabilities() { 2197 return this.capabilities != null && !this.capabilities.isEmpty(); 2198 } 2199 2200 /** 2201 * @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.). This is the underlying object with id, value and extensions. The accessor "getCapabilities" gives direct access to the value 2202 */ 2203 public TestScriptMetadataCapabilityComponent setCapabilitiesElement(CanonicalType value) { 2204 this.capabilities = value; 2205 return this; 2206 } 2207 2208 /** 2209 * @return 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. 2210 */ 2211 public String getCapabilities() { 2212 return this.capabilities == null ? null : this.capabilities.getValue(); 2213 } 2214 2215 /** 2216 * @param value 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. 2217 */ 2218 public TestScriptMetadataCapabilityComponent setCapabilities(String value) { 2219 if (this.capabilities == null) 2220 this.capabilities = new CanonicalType(); 2221 this.capabilities.setValue(value); 2222 return this; 2223 } 2224 2225 protected void listChildren(List<Property> children) { 2226 super.listChildren(children); 2227 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)); 2228 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)); 2229 children.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description)); 2230 children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin)); 2231 children.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination)); 2232 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)); 2233 children.add(new Property("capabilities", "canonical(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)); 2234 } 2235 2236 @Override 2237 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2238 switch (_hash) { 2239 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); 2240 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); 2241 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); 2242 case -1008619738: /*origin*/ return new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin); 2243 case -1429847026: /*destination*/ return new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination); 2244 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); 2245 case -1487597642: /*capabilities*/ return new Property("capabilities", "canonical(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); 2246 default: return super.getNamedProperty(_hash, _name, _checkValid); 2247 } 2248 2249 } 2250 2251 @Override 2252 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2253 switch (hash) { 2254 case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType 2255 case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType 2256 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2257 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType 2258 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 2259 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType 2260 case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // CanonicalType 2261 default: return super.getProperty(hash, name, checkValid); 2262 } 2263 2264 } 2265 2266 @Override 2267 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2268 switch (hash) { 2269 case -393139297: // required 2270 this.required = castToBoolean(value); // BooleanType 2271 return value; 2272 case -1109784050: // validated 2273 this.validated = castToBoolean(value); // BooleanType 2274 return value; 2275 case -1724546052: // description 2276 this.description = castToString(value); // StringType 2277 return value; 2278 case -1008619738: // origin 2279 this.getOrigin().add(castToInteger(value)); // IntegerType 2280 return value; 2281 case -1429847026: // destination 2282 this.destination = castToInteger(value); // IntegerType 2283 return value; 2284 case 3321850: // link 2285 this.getLink().add(castToUri(value)); // UriType 2286 return value; 2287 case -1487597642: // capabilities 2288 this.capabilities = castToCanonical(value); // CanonicalType 2289 return value; 2290 default: return super.setProperty(hash, name, value); 2291 } 2292 2293 } 2294 2295 @Override 2296 public Base setProperty(String name, Base value) throws FHIRException { 2297 if (name.equals("required")) { 2298 this.required = castToBoolean(value); // BooleanType 2299 } else if (name.equals("validated")) { 2300 this.validated = castToBoolean(value); // BooleanType 2301 } else if (name.equals("description")) { 2302 this.description = castToString(value); // StringType 2303 } else if (name.equals("origin")) { 2304 this.getOrigin().add(castToInteger(value)); 2305 } else if (name.equals("destination")) { 2306 this.destination = castToInteger(value); // IntegerType 2307 } else if (name.equals("link")) { 2308 this.getLink().add(castToUri(value)); 2309 } else if (name.equals("capabilities")) { 2310 this.capabilities = castToCanonical(value); // CanonicalType 2311 } else 2312 return super.setProperty(name, value); 2313 return value; 2314 } 2315 2316 @Override 2317 public Base makeProperty(int hash, String name) throws FHIRException { 2318 switch (hash) { 2319 case -393139297: return getRequiredElement(); 2320 case -1109784050: return getValidatedElement(); 2321 case -1724546052: return getDescriptionElement(); 2322 case -1008619738: return addOriginElement(); 2323 case -1429847026: return getDestinationElement(); 2324 case 3321850: return addLinkElement(); 2325 case -1487597642: return getCapabilitiesElement(); 2326 default: return super.makeProperty(hash, name); 2327 } 2328 2329 } 2330 2331 @Override 2332 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2333 switch (hash) { 2334 case -393139297: /*required*/ return new String[] {"boolean"}; 2335 case -1109784050: /*validated*/ return new String[] {"boolean"}; 2336 case -1724546052: /*description*/ return new String[] {"string"}; 2337 case -1008619738: /*origin*/ return new String[] {"integer"}; 2338 case -1429847026: /*destination*/ return new String[] {"integer"}; 2339 case 3321850: /*link*/ return new String[] {"uri"}; 2340 case -1487597642: /*capabilities*/ return new String[] {"canonical"}; 2341 default: return super.getTypesForProperty(hash, name); 2342 } 2343 2344 } 2345 2346 @Override 2347 public Base addChild(String name) throws FHIRException { 2348 if (name.equals("required")) { 2349 throw new FHIRException("Cannot call addChild on a primitive type TestScript.required"); 2350 } 2351 else if (name.equals("validated")) { 2352 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated"); 2353 } 2354 else if (name.equals("description")) { 2355 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 2356 } 2357 else if (name.equals("origin")) { 2358 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 2359 } 2360 else if (name.equals("destination")) { 2361 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 2362 } 2363 else if (name.equals("link")) { 2364 throw new FHIRException("Cannot call addChild on a primitive type TestScript.link"); 2365 } 2366 else if (name.equals("capabilities")) { 2367 throw new FHIRException("Cannot call addChild on a primitive type TestScript.capabilities"); 2368 } 2369 else 2370 return super.addChild(name); 2371 } 2372 2373 public TestScriptMetadataCapabilityComponent copy() { 2374 TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent(); 2375 copyValues(dst); 2376 return dst; 2377 } 2378 2379 public void copyValues(TestScriptMetadataCapabilityComponent dst) { 2380 super.copyValues(dst); 2381 dst.required = required == null ? null : required.copy(); 2382 dst.validated = validated == null ? null : validated.copy(); 2383 dst.description = description == null ? null : description.copy(); 2384 if (origin != null) { 2385 dst.origin = new ArrayList<IntegerType>(); 2386 for (IntegerType i : origin) 2387 dst.origin.add(i.copy()); 2388 }; 2389 dst.destination = destination == null ? null : destination.copy(); 2390 if (link != null) { 2391 dst.link = new ArrayList<UriType>(); 2392 for (UriType i : link) 2393 dst.link.add(i.copy()); 2394 }; 2395 dst.capabilities = capabilities == null ? null : capabilities.copy(); 2396 } 2397 2398 @Override 2399 public boolean equalsDeep(Base other_) { 2400 if (!super.equalsDeep(other_)) 2401 return false; 2402 if (!(other_ instanceof TestScriptMetadataCapabilityComponent)) 2403 return false; 2404 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_; 2405 return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true) 2406 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true) 2407 && compareDeep(capabilities, o.capabilities, true); 2408 } 2409 2410 @Override 2411 public boolean equalsShallow(Base other_) { 2412 if (!super.equalsShallow(other_)) 2413 return false; 2414 if (!(other_ instanceof TestScriptMetadataCapabilityComponent)) 2415 return false; 2416 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_; 2417 return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true) 2418 && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true) 2419 ; 2420 } 2421 2422 public boolean isEmpty() { 2423 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description 2424 , origin, destination, link, capabilities); 2425 } 2426 2427 public String fhirType() { 2428 return "TestScript.metadata.capability"; 2429 2430 } 2431 2432 } 2433 2434 @Block() 2435 public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement { 2436 /** 2437 * 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. 2438 */ 2439 @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2440 @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." ) 2441 protected BooleanType autocreate; 2442 2443 /** 2444 * 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. 2445 */ 2446 @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=1, max=1, modifier=false, summary=false) 2447 @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." ) 2448 protected BooleanType autodelete; 2449 2450 /** 2451 * Reference to the resource (containing the contents of the resource needed for operations). 2452 */ 2453 @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false) 2454 @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." ) 2455 protected Reference resource; 2456 2457 /** 2458 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).) 2459 */ 2460 protected Resource resourceTarget; 2461 2462 private static final long serialVersionUID = 1110683307L; 2463 2464 /** 2465 * Constructor 2466 */ 2467 public TestScriptFixtureComponent() { 2468 super(); 2469 } 2470 2471 /** 2472 * Constructor 2473 */ 2474 public TestScriptFixtureComponent(BooleanType autocreate, BooleanType autodelete) { 2475 super(); 2476 this.autocreate = autocreate; 2477 this.autodelete = autodelete; 2478 } 2479 2480 /** 2481 * @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 2482 */ 2483 public BooleanType getAutocreateElement() { 2484 if (this.autocreate == null) 2485 if (Configuration.errorOnAutoCreate()) 2486 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate"); 2487 else if (Configuration.doAutoCreate()) 2488 this.autocreate = new BooleanType(); // bb 2489 return this.autocreate; 2490 } 2491 2492 public boolean hasAutocreateElement() { 2493 return this.autocreate != null && !this.autocreate.isEmpty(); 2494 } 2495 2496 public boolean hasAutocreate() { 2497 return this.autocreate != null && !this.autocreate.isEmpty(); 2498 } 2499 2500 /** 2501 * @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 2502 */ 2503 public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 2504 this.autocreate = value; 2505 return this; 2506 } 2507 2508 /** 2509 * @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. 2510 */ 2511 public boolean getAutocreate() { 2512 return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue(); 2513 } 2514 2515 /** 2516 * @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. 2517 */ 2518 public TestScriptFixtureComponent setAutocreate(boolean value) { 2519 if (this.autocreate == null) 2520 this.autocreate = new BooleanType(); 2521 this.autocreate.setValue(value); 2522 return this; 2523 } 2524 2525 /** 2526 * @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 2527 */ 2528 public BooleanType getAutodeleteElement() { 2529 if (this.autodelete == null) 2530 if (Configuration.errorOnAutoCreate()) 2531 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete"); 2532 else if (Configuration.doAutoCreate()) 2533 this.autodelete = new BooleanType(); // bb 2534 return this.autodelete; 2535 } 2536 2537 public boolean hasAutodeleteElement() { 2538 return this.autodelete != null && !this.autodelete.isEmpty(); 2539 } 2540 2541 public boolean hasAutodelete() { 2542 return this.autodelete != null && !this.autodelete.isEmpty(); 2543 } 2544 2545 /** 2546 * @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 2547 */ 2548 public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 2549 this.autodelete = value; 2550 return this; 2551 } 2552 2553 /** 2554 * @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. 2555 */ 2556 public boolean getAutodelete() { 2557 return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue(); 2558 } 2559 2560 /** 2561 * @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. 2562 */ 2563 public TestScriptFixtureComponent setAutodelete(boolean value) { 2564 if (this.autodelete == null) 2565 this.autodelete = new BooleanType(); 2566 this.autodelete.setValue(value); 2567 return this; 2568 } 2569 2570 /** 2571 * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2572 */ 2573 public Reference getResource() { 2574 if (this.resource == null) 2575 if (Configuration.errorOnAutoCreate()) 2576 throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource"); 2577 else if (Configuration.doAutoCreate()) 2578 this.resource = new Reference(); // cc 2579 return this.resource; 2580 } 2581 2582 public boolean hasResource() { 2583 return this.resource != null && !this.resource.isEmpty(); 2584 } 2585 2586 /** 2587 * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2588 */ 2589 public TestScriptFixtureComponent setResource(Reference value) { 2590 this.resource = value; 2591 return this; 2592 } 2593 2594 /** 2595 * @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).) 2596 */ 2597 public Resource getResourceTarget() { 2598 return this.resourceTarget; 2599 } 2600 2601 /** 2602 * @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).) 2603 */ 2604 public TestScriptFixtureComponent setResourceTarget(Resource value) { 2605 this.resourceTarget = value; 2606 return this; 2607 } 2608 2609 protected void listChildren(List<Property> children) { 2610 super.listChildren(children); 2611 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)); 2612 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)); 2613 children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource)); 2614 } 2615 2616 @Override 2617 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2618 switch (_hash) { 2619 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); 2620 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); 2621 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); 2622 default: return super.getNamedProperty(_hash, _name, _checkValid); 2623 } 2624 2625 } 2626 2627 @Override 2628 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2629 switch (hash) { 2630 case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType 2631 case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType 2632 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 2633 default: return super.getProperty(hash, name, checkValid); 2634 } 2635 2636 } 2637 2638 @Override 2639 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2640 switch (hash) { 2641 case 73154411: // autocreate 2642 this.autocreate = castToBoolean(value); // BooleanType 2643 return value; 2644 case 89990170: // autodelete 2645 this.autodelete = castToBoolean(value); // BooleanType 2646 return value; 2647 case -341064690: // resource 2648 this.resource = castToReference(value); // Reference 2649 return value; 2650 default: return super.setProperty(hash, name, value); 2651 } 2652 2653 } 2654 2655 @Override 2656 public Base setProperty(String name, Base value) throws FHIRException { 2657 if (name.equals("autocreate")) { 2658 this.autocreate = castToBoolean(value); // BooleanType 2659 } else if (name.equals("autodelete")) { 2660 this.autodelete = castToBoolean(value); // BooleanType 2661 } else if (name.equals("resource")) { 2662 this.resource = castToReference(value); // Reference 2663 } else 2664 return super.setProperty(name, value); 2665 return value; 2666 } 2667 2668 @Override 2669 public Base makeProperty(int hash, String name) throws FHIRException { 2670 switch (hash) { 2671 case 73154411: return getAutocreateElement(); 2672 case 89990170: return getAutodeleteElement(); 2673 case -341064690: return getResource(); 2674 default: return super.makeProperty(hash, name); 2675 } 2676 2677 } 2678 2679 @Override 2680 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2681 switch (hash) { 2682 case 73154411: /*autocreate*/ return new String[] {"boolean"}; 2683 case 89990170: /*autodelete*/ return new String[] {"boolean"}; 2684 case -341064690: /*resource*/ return new String[] {"Reference"}; 2685 default: return super.getTypesForProperty(hash, name); 2686 } 2687 2688 } 2689 2690 @Override 2691 public Base addChild(String name) throws FHIRException { 2692 if (name.equals("autocreate")) { 2693 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate"); 2694 } 2695 else if (name.equals("autodelete")) { 2696 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete"); 2697 } 2698 else if (name.equals("resource")) { 2699 this.resource = new Reference(); 2700 return this.resource; 2701 } 2702 else 2703 return super.addChild(name); 2704 } 2705 2706 public TestScriptFixtureComponent copy() { 2707 TestScriptFixtureComponent dst = new TestScriptFixtureComponent(); 2708 copyValues(dst); 2709 return dst; 2710 } 2711 2712 public void copyValues(TestScriptFixtureComponent dst) { 2713 super.copyValues(dst); 2714 dst.autocreate = autocreate == null ? null : autocreate.copy(); 2715 dst.autodelete = autodelete == null ? null : autodelete.copy(); 2716 dst.resource = resource == null ? null : resource.copy(); 2717 } 2718 2719 @Override 2720 public boolean equalsDeep(Base other_) { 2721 if (!super.equalsDeep(other_)) 2722 return false; 2723 if (!(other_ instanceof TestScriptFixtureComponent)) 2724 return false; 2725 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_; 2726 return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true) 2727 && compareDeep(resource, o.resource, true); 2728 } 2729 2730 @Override 2731 public boolean equalsShallow(Base other_) { 2732 if (!super.equalsShallow(other_)) 2733 return false; 2734 if (!(other_ instanceof TestScriptFixtureComponent)) 2735 return false; 2736 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_; 2737 return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true) 2738 ; 2739 } 2740 2741 public boolean isEmpty() { 2742 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource 2743 ); 2744 } 2745 2746 public String fhirType() { 2747 return "TestScript.fixture"; 2748 2749 } 2750 2751 } 2752 2753 @Block() 2754 public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement { 2755 /** 2756 * Descriptive name for this variable. 2757 */ 2758 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2759 @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." ) 2760 protected StringType name; 2761 2762 /** 2763 * A default, hard-coded, or user-defined value for this variable. 2764 */ 2765 @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2766 @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." ) 2767 protected StringType defaultValue; 2768 2769 /** 2770 * A free text natural language description of the variable and its purpose. 2771 */ 2772 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2773 @Description(shortDefinition="Natural language description of the variable", formalDefinition="A free text natural language description of the variable and its purpose." ) 2774 protected StringType description; 2775 2776 /** 2777 * The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2778 */ 2779 @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 2780 @Description(shortDefinition="The FHIRPath expression against the fixture body", formalDefinition="The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified." ) 2781 protected StringType expression; 2782 2783 /** 2784 * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2785 */ 2786 @Child(name = "headerField", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2787 @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." ) 2788 protected StringType headerField; 2789 2790 /** 2791 * Displayable text string with hint help information to the user when entering a default value. 2792 */ 2793 @Child(name = "hint", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 2794 @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." ) 2795 protected StringType hint; 2796 2797 /** 2798 * XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2799 */ 2800 @Child(name = "path", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 2801 @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." ) 2802 protected StringType path; 2803 2804 /** 2805 * Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2806 */ 2807 @Child(name = "sourceId", type = {IdType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2808 @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." ) 2809 protected IdType sourceId; 2810 2811 private static final long serialVersionUID = -1592325432L; 2812 2813 /** 2814 * Constructor 2815 */ 2816 public TestScriptVariableComponent() { 2817 super(); 2818 } 2819 2820 /** 2821 * Constructor 2822 */ 2823 public TestScriptVariableComponent(StringType name) { 2824 super(); 2825 this.name = name; 2826 } 2827 2828 /** 2829 * @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 2830 */ 2831 public StringType getNameElement() { 2832 if (this.name == null) 2833 if (Configuration.errorOnAutoCreate()) 2834 throw new Error("Attempt to auto-create TestScriptVariableComponent.name"); 2835 else if (Configuration.doAutoCreate()) 2836 this.name = new StringType(); // bb 2837 return this.name; 2838 } 2839 2840 public boolean hasNameElement() { 2841 return this.name != null && !this.name.isEmpty(); 2842 } 2843 2844 public boolean hasName() { 2845 return this.name != null && !this.name.isEmpty(); 2846 } 2847 2848 /** 2849 * @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 2850 */ 2851 public TestScriptVariableComponent setNameElement(StringType value) { 2852 this.name = value; 2853 return this; 2854 } 2855 2856 /** 2857 * @return Descriptive name for this variable. 2858 */ 2859 public String getName() { 2860 return this.name == null ? null : this.name.getValue(); 2861 } 2862 2863 /** 2864 * @param value Descriptive name for this variable. 2865 */ 2866 public TestScriptVariableComponent setName(String value) { 2867 if (this.name == null) 2868 this.name = new StringType(); 2869 this.name.setValue(value); 2870 return this; 2871 } 2872 2873 /** 2874 * @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 2875 */ 2876 public StringType getDefaultValueElement() { 2877 if (this.defaultValue == null) 2878 if (Configuration.errorOnAutoCreate()) 2879 throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue"); 2880 else if (Configuration.doAutoCreate()) 2881 this.defaultValue = new StringType(); // bb 2882 return this.defaultValue; 2883 } 2884 2885 public boolean hasDefaultValueElement() { 2886 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2887 } 2888 2889 public boolean hasDefaultValue() { 2890 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2891 } 2892 2893 /** 2894 * @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 2895 */ 2896 public TestScriptVariableComponent setDefaultValueElement(StringType value) { 2897 this.defaultValue = value; 2898 return this; 2899 } 2900 2901 /** 2902 * @return A default, hard-coded, or user-defined value for this variable. 2903 */ 2904 public String getDefaultValue() { 2905 return this.defaultValue == null ? null : this.defaultValue.getValue(); 2906 } 2907 2908 /** 2909 * @param value A default, hard-coded, or user-defined value for this variable. 2910 */ 2911 public TestScriptVariableComponent setDefaultValue(String value) { 2912 if (Utilities.noString(value)) 2913 this.defaultValue = null; 2914 else { 2915 if (this.defaultValue == null) 2916 this.defaultValue = new StringType(); 2917 this.defaultValue.setValue(value); 2918 } 2919 return this; 2920 } 2921 2922 /** 2923 * @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 2924 */ 2925 public StringType getDescriptionElement() { 2926 if (this.description == null) 2927 if (Configuration.errorOnAutoCreate()) 2928 throw new Error("Attempt to auto-create TestScriptVariableComponent.description"); 2929 else if (Configuration.doAutoCreate()) 2930 this.description = new StringType(); // bb 2931 return this.description; 2932 } 2933 2934 public boolean hasDescriptionElement() { 2935 return this.description != null && !this.description.isEmpty(); 2936 } 2937 2938 public boolean hasDescription() { 2939 return this.description != null && !this.description.isEmpty(); 2940 } 2941 2942 /** 2943 * @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 2944 */ 2945 public TestScriptVariableComponent setDescriptionElement(StringType value) { 2946 this.description = value; 2947 return this; 2948 } 2949 2950 /** 2951 * @return A free text natural language description of the variable and its purpose. 2952 */ 2953 public String getDescription() { 2954 return this.description == null ? null : this.description.getValue(); 2955 } 2956 2957 /** 2958 * @param value A free text natural language description of the variable and its purpose. 2959 */ 2960 public TestScriptVariableComponent setDescription(String value) { 2961 if (Utilities.noString(value)) 2962 this.description = null; 2963 else { 2964 if (this.description == null) 2965 this.description = new StringType(); 2966 this.description.setValue(value); 2967 } 2968 return this; 2969 } 2970 2971 /** 2972 * @return {@link #expression} (The FHIRPath 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 2973 */ 2974 public StringType getExpressionElement() { 2975 if (this.expression == null) 2976 if (Configuration.errorOnAutoCreate()) 2977 throw new Error("Attempt to auto-create TestScriptVariableComponent.expression"); 2978 else if (Configuration.doAutoCreate()) 2979 this.expression = new StringType(); // bb 2980 return this.expression; 2981 } 2982 2983 public boolean hasExpressionElement() { 2984 return this.expression != null && !this.expression.isEmpty(); 2985 } 2986 2987 public boolean hasExpression() { 2988 return this.expression != null && !this.expression.isEmpty(); 2989 } 2990 2991 /** 2992 * @param value {@link #expression} (The FHIRPath 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 2993 */ 2994 public TestScriptVariableComponent setExpressionElement(StringType value) { 2995 this.expression = value; 2996 return this; 2997 } 2998 2999 /** 3000 * @return The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 3001 */ 3002 public String getExpression() { 3003 return this.expression == null ? null : this.expression.getValue(); 3004 } 3005 3006 /** 3007 * @param value The FHIRPath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 3008 */ 3009 public TestScriptVariableComponent setExpression(String value) { 3010 if (Utilities.noString(value)) 3011 this.expression = null; 3012 else { 3013 if (this.expression == null) 3014 this.expression = new StringType(); 3015 this.expression.setValue(value); 3016 } 3017 return this; 3018 } 3019 3020 /** 3021 * @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 3022 */ 3023 public StringType getHeaderFieldElement() { 3024 if (this.headerField == null) 3025 if (Configuration.errorOnAutoCreate()) 3026 throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField"); 3027 else if (Configuration.doAutoCreate()) 3028 this.headerField = new StringType(); // bb 3029 return this.headerField; 3030 } 3031 3032 public boolean hasHeaderFieldElement() { 3033 return this.headerField != null && !this.headerField.isEmpty(); 3034 } 3035 3036 public boolean hasHeaderField() { 3037 return this.headerField != null && !this.headerField.isEmpty(); 3038 } 3039 3040 /** 3041 * @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 3042 */ 3043 public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 3044 this.headerField = value; 3045 return this; 3046 } 3047 3048 /** 3049 * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 3050 */ 3051 public String getHeaderField() { 3052 return this.headerField == null ? null : this.headerField.getValue(); 3053 } 3054 3055 /** 3056 * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 3057 */ 3058 public TestScriptVariableComponent setHeaderField(String value) { 3059 if (Utilities.noString(value)) 3060 this.headerField = null; 3061 else { 3062 if (this.headerField == null) 3063 this.headerField = new StringType(); 3064 this.headerField.setValue(value); 3065 } 3066 return this; 3067 } 3068 3069 /** 3070 * @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 3071 */ 3072 public StringType getHintElement() { 3073 if (this.hint == null) 3074 if (Configuration.errorOnAutoCreate()) 3075 throw new Error("Attempt to auto-create TestScriptVariableComponent.hint"); 3076 else if (Configuration.doAutoCreate()) 3077 this.hint = new StringType(); // bb 3078 return this.hint; 3079 } 3080 3081 public boolean hasHintElement() { 3082 return this.hint != null && !this.hint.isEmpty(); 3083 } 3084 3085 public boolean hasHint() { 3086 return this.hint != null && !this.hint.isEmpty(); 3087 } 3088 3089 /** 3090 * @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 3091 */ 3092 public TestScriptVariableComponent setHintElement(StringType value) { 3093 this.hint = value; 3094 return this; 3095 } 3096 3097 /** 3098 * @return Displayable text string with hint help information to the user when entering a default value. 3099 */ 3100 public String getHint() { 3101 return this.hint == null ? null : this.hint.getValue(); 3102 } 3103 3104 /** 3105 * @param value Displayable text string with hint help information to the user when entering a default value. 3106 */ 3107 public TestScriptVariableComponent setHint(String value) { 3108 if (Utilities.noString(value)) 3109 this.hint = null; 3110 else { 3111 if (this.hint == null) 3112 this.hint = new StringType(); 3113 this.hint.setValue(value); 3114 } 3115 return this; 3116 } 3117 3118 /** 3119 * @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 3120 */ 3121 public StringType getPathElement() { 3122 if (this.path == null) 3123 if (Configuration.errorOnAutoCreate()) 3124 throw new Error("Attempt to auto-create TestScriptVariableComponent.path"); 3125 else if (Configuration.doAutoCreate()) 3126 this.path = new StringType(); // bb 3127 return this.path; 3128 } 3129 3130 public boolean hasPathElement() { 3131 return this.path != null && !this.path.isEmpty(); 3132 } 3133 3134 public boolean hasPath() { 3135 return this.path != null && !this.path.isEmpty(); 3136 } 3137 3138 /** 3139 * @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 3140 */ 3141 public TestScriptVariableComponent setPathElement(StringType value) { 3142 this.path = value; 3143 return this; 3144 } 3145 3146 /** 3147 * @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. 3148 */ 3149 public String getPath() { 3150 return this.path == null ? null : this.path.getValue(); 3151 } 3152 3153 /** 3154 * @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. 3155 */ 3156 public TestScriptVariableComponent setPath(String value) { 3157 if (Utilities.noString(value)) 3158 this.path = null; 3159 else { 3160 if (this.path == null) 3161 this.path = new StringType(); 3162 this.path.setValue(value); 3163 } 3164 return this; 3165 } 3166 3167 /** 3168 * @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 3169 */ 3170 public IdType getSourceIdElement() { 3171 if (this.sourceId == null) 3172 if (Configuration.errorOnAutoCreate()) 3173 throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId"); 3174 else if (Configuration.doAutoCreate()) 3175 this.sourceId = new IdType(); // bb 3176 return this.sourceId; 3177 } 3178 3179 public boolean hasSourceIdElement() { 3180 return this.sourceId != null && !this.sourceId.isEmpty(); 3181 } 3182 3183 public boolean hasSourceId() { 3184 return this.sourceId != null && !this.sourceId.isEmpty(); 3185 } 3186 3187 /** 3188 * @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 3189 */ 3190 public TestScriptVariableComponent setSourceIdElement(IdType value) { 3191 this.sourceId = value; 3192 return this; 3193 } 3194 3195 /** 3196 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 3197 */ 3198 public String getSourceId() { 3199 return this.sourceId == null ? null : this.sourceId.getValue(); 3200 } 3201 3202 /** 3203 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 3204 */ 3205 public TestScriptVariableComponent setSourceId(String value) { 3206 if (Utilities.noString(value)) 3207 this.sourceId = null; 3208 else { 3209 if (this.sourceId == null) 3210 this.sourceId = new IdType(); 3211 this.sourceId.setValue(value); 3212 } 3213 return this; 3214 } 3215 3216 protected void listChildren(List<Property> children) { 3217 super.listChildren(children); 3218 children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name)); 3219 children.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue)); 3220 children.add(new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description)); 3221 children.add(new Property("expression", "string", "The FHIRPath 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)); 3222 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)); 3223 children.add(new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint)); 3224 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)); 3225 children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", 0, 1, sourceId)); 3226 } 3227 3228 @Override 3229 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3230 switch (_hash) { 3231 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name); 3232 case -659125328: /*defaultValue*/ return new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue); 3233 case -1724546052: /*description*/ return new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description); 3234 case -1795452264: /*expression*/ return new Property("expression", "string", "The FHIRPath 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); 3235 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); 3236 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); 3237 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); 3238 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); 3239 default: return super.getNamedProperty(_hash, _name, _checkValid); 3240 } 3241 3242 } 3243 3244 @Override 3245 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3246 switch (hash) { 3247 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3248 case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType 3249 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3250 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 3251 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 3252 case 3202695: /*hint*/ return this.hint == null ? new Base[0] : new Base[] {this.hint}; // StringType 3253 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 3254 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 3255 default: return super.getProperty(hash, name, checkValid); 3256 } 3257 3258 } 3259 3260 @Override 3261 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3262 switch (hash) { 3263 case 3373707: // name 3264 this.name = castToString(value); // StringType 3265 return value; 3266 case -659125328: // defaultValue 3267 this.defaultValue = castToString(value); // StringType 3268 return value; 3269 case -1724546052: // description 3270 this.description = castToString(value); // StringType 3271 return value; 3272 case -1795452264: // expression 3273 this.expression = castToString(value); // StringType 3274 return value; 3275 case 1160732269: // headerField 3276 this.headerField = castToString(value); // StringType 3277 return value; 3278 case 3202695: // hint 3279 this.hint = castToString(value); // StringType 3280 return value; 3281 case 3433509: // path 3282 this.path = castToString(value); // StringType 3283 return value; 3284 case 1746327190: // sourceId 3285 this.sourceId = castToId(value); // IdType 3286 return value; 3287 default: return super.setProperty(hash, name, value); 3288 } 3289 3290 } 3291 3292 @Override 3293 public Base setProperty(String name, Base value) throws FHIRException { 3294 if (name.equals("name")) { 3295 this.name = castToString(value); // StringType 3296 } else if (name.equals("defaultValue")) { 3297 this.defaultValue = castToString(value); // StringType 3298 } else if (name.equals("description")) { 3299 this.description = castToString(value); // StringType 3300 } else if (name.equals("expression")) { 3301 this.expression = castToString(value); // StringType 3302 } else if (name.equals("headerField")) { 3303 this.headerField = castToString(value); // StringType 3304 } else if (name.equals("hint")) { 3305 this.hint = castToString(value); // StringType 3306 } else if (name.equals("path")) { 3307 this.path = castToString(value); // StringType 3308 } else if (name.equals("sourceId")) { 3309 this.sourceId = castToId(value); // IdType 3310 } else 3311 return super.setProperty(name, value); 3312 return value; 3313 } 3314 3315 @Override 3316 public Base makeProperty(int hash, String name) throws FHIRException { 3317 switch (hash) { 3318 case 3373707: return getNameElement(); 3319 case -659125328: return getDefaultValueElement(); 3320 case -1724546052: return getDescriptionElement(); 3321 case -1795452264: return getExpressionElement(); 3322 case 1160732269: return getHeaderFieldElement(); 3323 case 3202695: return getHintElement(); 3324 case 3433509: return getPathElement(); 3325 case 1746327190: return getSourceIdElement(); 3326 default: return super.makeProperty(hash, name); 3327 } 3328 3329 } 3330 3331 @Override 3332 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3333 switch (hash) { 3334 case 3373707: /*name*/ return new String[] {"string"}; 3335 case -659125328: /*defaultValue*/ return new String[] {"string"}; 3336 case -1724546052: /*description*/ return new String[] {"string"}; 3337 case -1795452264: /*expression*/ return new String[] {"string"}; 3338 case 1160732269: /*headerField*/ return new String[] {"string"}; 3339 case 3202695: /*hint*/ return new String[] {"string"}; 3340 case 3433509: /*path*/ return new String[] {"string"}; 3341 case 1746327190: /*sourceId*/ return new String[] {"id"}; 3342 default: return super.getTypesForProperty(hash, name); 3343 } 3344 3345 } 3346 3347 @Override 3348 public Base addChild(String name) throws FHIRException { 3349 if (name.equals("name")) { 3350 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3351 } 3352 else if (name.equals("defaultValue")) { 3353 throw new FHIRException("Cannot call addChild on a primitive type TestScript.defaultValue"); 3354 } 3355 else if (name.equals("description")) { 3356 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 3357 } 3358 else if (name.equals("expression")) { 3359 throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression"); 3360 } 3361 else if (name.equals("headerField")) { 3362 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 3363 } 3364 else if (name.equals("hint")) { 3365 throw new FHIRException("Cannot call addChild on a primitive type TestScript.hint"); 3366 } 3367 else if (name.equals("path")) { 3368 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 3369 } 3370 else if (name.equals("sourceId")) { 3371 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 3372 } 3373 else 3374 return super.addChild(name); 3375 } 3376 3377 public TestScriptVariableComponent copy() { 3378 TestScriptVariableComponent dst = new TestScriptVariableComponent(); 3379 copyValues(dst); 3380 return dst; 3381 } 3382 3383 public void copyValues(TestScriptVariableComponent dst) { 3384 super.copyValues(dst); 3385 dst.name = name == null ? null : name.copy(); 3386 dst.defaultValue = defaultValue == null ? null : defaultValue.copy(); 3387 dst.description = description == null ? null : description.copy(); 3388 dst.expression = expression == null ? null : expression.copy(); 3389 dst.headerField = headerField == null ? null : headerField.copy(); 3390 dst.hint = hint == null ? null : hint.copy(); 3391 dst.path = path == null ? null : path.copy(); 3392 dst.sourceId = sourceId == null ? null : sourceId.copy(); 3393 } 3394 3395 @Override 3396 public boolean equalsDeep(Base other_) { 3397 if (!super.equalsDeep(other_)) 3398 return false; 3399 if (!(other_ instanceof TestScriptVariableComponent)) 3400 return false; 3401 TestScriptVariableComponent o = (TestScriptVariableComponent) other_; 3402 return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(description, o.description, true) 3403 && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true) 3404 && compareDeep(hint, o.hint, true) && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true) 3405 ; 3406 } 3407 3408 @Override 3409 public boolean equalsShallow(Base other_) { 3410 if (!super.equalsShallow(other_)) 3411 return false; 3412 if (!(other_ instanceof TestScriptVariableComponent)) 3413 return false; 3414 TestScriptVariableComponent o = (TestScriptVariableComponent) other_; 3415 return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(description, o.description, true) 3416 && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true) 3417 && compareValues(hint, o.hint, true) && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true) 3418 ; 3419 } 3420 3421 public boolean isEmpty() { 3422 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description 3423 , expression, headerField, hint, path, sourceId); 3424 } 3425 3426 public String fhirType() { 3427 return "TestScript.variable"; 3428 3429 } 3430 3431 } 3432 3433 @Block() 3434 public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement { 3435 /** 3436 * Action would contain either an operation or an assertion. 3437 */ 3438 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3439 @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 3440 protected List<SetupActionComponent> action; 3441 3442 private static final long serialVersionUID = -123374486L; 3443 3444 /** 3445 * Constructor 3446 */ 3447 public TestScriptSetupComponent() { 3448 super(); 3449 } 3450 3451 /** 3452 * @return {@link #action} (Action would contain either an operation or an assertion.) 3453 */ 3454 public List<SetupActionComponent> getAction() { 3455 if (this.action == null) 3456 this.action = new ArrayList<SetupActionComponent>(); 3457 return this.action; 3458 } 3459 3460 /** 3461 * @return Returns a reference to <code>this</code> for easy method chaining 3462 */ 3463 public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) { 3464 this.action = theAction; 3465 return this; 3466 } 3467 3468 public boolean hasAction() { 3469 if (this.action == null) 3470 return false; 3471 for (SetupActionComponent item : this.action) 3472 if (!item.isEmpty()) 3473 return true; 3474 return false; 3475 } 3476 3477 public SetupActionComponent addAction() { //3 3478 SetupActionComponent t = new SetupActionComponent(); 3479 if (this.action == null) 3480 this.action = new ArrayList<SetupActionComponent>(); 3481 this.action.add(t); 3482 return t; 3483 } 3484 3485 public TestScriptSetupComponent addAction(SetupActionComponent t) { //3 3486 if (t == null) 3487 return this; 3488 if (this.action == null) 3489 this.action = new ArrayList<SetupActionComponent>(); 3490 this.action.add(t); 3491 return this; 3492 } 3493 3494 /** 3495 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 3496 */ 3497 public SetupActionComponent getActionFirstRep() { 3498 if (getAction().isEmpty()) { 3499 addAction(); 3500 } 3501 return getAction().get(0); 3502 } 3503 3504 protected void listChildren(List<Property> children) { 3505 super.listChildren(children); 3506 children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 3507 } 3508 3509 @Override 3510 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3511 switch (_hash) { 3512 case -1422950858: /*action*/ return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action); 3513 default: return super.getNamedProperty(_hash, _name, _checkValid); 3514 } 3515 3516 } 3517 3518 @Override 3519 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3520 switch (hash) { 3521 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent 3522 default: return super.getProperty(hash, name, checkValid); 3523 } 3524 3525 } 3526 3527 @Override 3528 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3529 switch (hash) { 3530 case -1422950858: // action 3531 this.getAction().add((SetupActionComponent) value); // SetupActionComponent 3532 return value; 3533 default: return super.setProperty(hash, name, value); 3534 } 3535 3536 } 3537 3538 @Override 3539 public Base setProperty(String name, Base value) throws FHIRException { 3540 if (name.equals("action")) { 3541 this.getAction().add((SetupActionComponent) value); 3542 } else 3543 return super.setProperty(name, value); 3544 return value; 3545 } 3546 3547 @Override 3548 public Base makeProperty(int hash, String name) throws FHIRException { 3549 switch (hash) { 3550 case -1422950858: return addAction(); 3551 default: return super.makeProperty(hash, name); 3552 } 3553 3554 } 3555 3556 @Override 3557 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3558 switch (hash) { 3559 case -1422950858: /*action*/ return new String[] {}; 3560 default: return super.getTypesForProperty(hash, name); 3561 } 3562 3563 } 3564 3565 @Override 3566 public Base addChild(String name) throws FHIRException { 3567 if (name.equals("action")) { 3568 return addAction(); 3569 } 3570 else 3571 return super.addChild(name); 3572 } 3573 3574 public TestScriptSetupComponent copy() { 3575 TestScriptSetupComponent dst = new TestScriptSetupComponent(); 3576 copyValues(dst); 3577 return dst; 3578 } 3579 3580 public void copyValues(TestScriptSetupComponent dst) { 3581 super.copyValues(dst); 3582 if (action != null) { 3583 dst.action = new ArrayList<SetupActionComponent>(); 3584 for (SetupActionComponent i : action) 3585 dst.action.add(i.copy()); 3586 }; 3587 } 3588 3589 @Override 3590 public boolean equalsDeep(Base other_) { 3591 if (!super.equalsDeep(other_)) 3592 return false; 3593 if (!(other_ instanceof TestScriptSetupComponent)) 3594 return false; 3595 TestScriptSetupComponent o = (TestScriptSetupComponent) other_; 3596 return compareDeep(action, o.action, true); 3597 } 3598 3599 @Override 3600 public boolean equalsShallow(Base other_) { 3601 if (!super.equalsShallow(other_)) 3602 return false; 3603 if (!(other_ instanceof TestScriptSetupComponent)) 3604 return false; 3605 TestScriptSetupComponent o = (TestScriptSetupComponent) other_; 3606 return true; 3607 } 3608 3609 public boolean isEmpty() { 3610 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action); 3611 } 3612 3613 public String fhirType() { 3614 return "TestScript.setup"; 3615 3616 } 3617 3618 } 3619 3620 @Block() 3621 public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement { 3622 /** 3623 * The operation to perform. 3624 */ 3625 @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false) 3626 @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." ) 3627 protected SetupActionOperationComponent operation; 3628 3629 /** 3630 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 3631 */ 3632 @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false) 3633 @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 3634 protected SetupActionAssertComponent assert_; 3635 3636 private static final long serialVersionUID = -252088305L; 3637 3638 /** 3639 * Constructor 3640 */ 3641 public SetupActionComponent() { 3642 super(); 3643 } 3644 3645 /** 3646 * @return {@link #operation} (The operation to perform.) 3647 */ 3648 public SetupActionOperationComponent getOperation() { 3649 if (this.operation == null) 3650 if (Configuration.errorOnAutoCreate()) 3651 throw new Error("Attempt to auto-create SetupActionComponent.operation"); 3652 else if (Configuration.doAutoCreate()) 3653 this.operation = new SetupActionOperationComponent(); // cc 3654 return this.operation; 3655 } 3656 3657 public boolean hasOperation() { 3658 return this.operation != null && !this.operation.isEmpty(); 3659 } 3660 3661 /** 3662 * @param value {@link #operation} (The operation to perform.) 3663 */ 3664 public SetupActionComponent setOperation(SetupActionOperationComponent value) { 3665 this.operation = value; 3666 return this; 3667 } 3668 3669 /** 3670 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 3671 */ 3672 public SetupActionAssertComponent getAssert() { 3673 if (this.assert_ == null) 3674 if (Configuration.errorOnAutoCreate()) 3675 throw new Error("Attempt to auto-create SetupActionComponent.assert_"); 3676 else if (Configuration.doAutoCreate()) 3677 this.assert_ = new SetupActionAssertComponent(); // cc 3678 return this.assert_; 3679 } 3680 3681 public boolean hasAssert() { 3682 return this.assert_ != null && !this.assert_.isEmpty(); 3683 } 3684 3685 /** 3686 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 3687 */ 3688 public SetupActionComponent setAssert(SetupActionAssertComponent value) { 3689 this.assert_ = value; 3690 return this; 3691 } 3692 3693 protected void listChildren(List<Property> children) { 3694 super.listChildren(children); 3695 children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation)); 3696 children.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_)); 3697 } 3698 3699 @Override 3700 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3701 switch (_hash) { 3702 case 1662702951: /*operation*/ return new Property("operation", "", "The operation to perform.", 0, 1, operation); 3703 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_); 3704 default: return super.getNamedProperty(_hash, _name, _checkValid); 3705 } 3706 3707 } 3708 3709 @Override 3710 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3711 switch (hash) { 3712 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 3713 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 3714 default: return super.getProperty(hash, name, checkValid); 3715 } 3716 3717 } 3718 3719 @Override 3720 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3721 switch (hash) { 3722 case 1662702951: // operation 3723 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 3724 return value; 3725 case -1408208058: // assert 3726 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 3727 return value; 3728 default: return super.setProperty(hash, name, value); 3729 } 3730 3731 } 3732 3733 @Override 3734 public Base setProperty(String name, Base value) throws FHIRException { 3735 if (name.equals("operation")) { 3736 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 3737 } else if (name.equals("assert")) { 3738 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 3739 } else 3740 return super.setProperty(name, value); 3741 return value; 3742 } 3743 3744 @Override 3745 public Base makeProperty(int hash, String name) throws FHIRException { 3746 switch (hash) { 3747 case 1662702951: return getOperation(); 3748 case -1408208058: return getAssert(); 3749 default: return super.makeProperty(hash, name); 3750 } 3751 3752 } 3753 3754 @Override 3755 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3756 switch (hash) { 3757 case 1662702951: /*operation*/ return new String[] {}; 3758 case -1408208058: /*assert*/ return new String[] {}; 3759 default: return super.getTypesForProperty(hash, name); 3760 } 3761 3762 } 3763 3764 @Override 3765 public Base addChild(String name) throws FHIRException { 3766 if (name.equals("operation")) { 3767 this.operation = new SetupActionOperationComponent(); 3768 return this.operation; 3769 } 3770 else if (name.equals("assert")) { 3771 this.assert_ = new SetupActionAssertComponent(); 3772 return this.assert_; 3773 } 3774 else 3775 return super.addChild(name); 3776 } 3777 3778 public SetupActionComponent copy() { 3779 SetupActionComponent dst = new SetupActionComponent(); 3780 copyValues(dst); 3781 return dst; 3782 } 3783 3784 public void copyValues(SetupActionComponent dst) { 3785 super.copyValues(dst); 3786 dst.operation = operation == null ? null : operation.copy(); 3787 dst.assert_ = assert_ == null ? null : assert_.copy(); 3788 } 3789 3790 @Override 3791 public boolean equalsDeep(Base other_) { 3792 if (!super.equalsDeep(other_)) 3793 return false; 3794 if (!(other_ instanceof SetupActionComponent)) 3795 return false; 3796 SetupActionComponent o = (SetupActionComponent) other_; 3797 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 3798 } 3799 3800 @Override 3801 public boolean equalsShallow(Base other_) { 3802 if (!super.equalsShallow(other_)) 3803 return false; 3804 if (!(other_ instanceof SetupActionComponent)) 3805 return false; 3806 SetupActionComponent o = (SetupActionComponent) other_; 3807 return true; 3808 } 3809 3810 public boolean isEmpty() { 3811 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_); 3812 } 3813 3814 public String fhirType() { 3815 return "TestScript.setup.action"; 3816 3817 } 3818 3819 } 3820 3821 @Block() 3822 public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement { 3823 /** 3824 * Server interaction or operation type. 3825 */ 3826 @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false) 3827 @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." ) 3828 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-operation-codes") 3829 protected Coding type; 3830 3831 /** 3832 * The type of the resource. See http://build.fhir.org/resourcelist.html. 3833 */ 3834 @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3835 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://build.fhir.org/resourcelist.html." ) 3836 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 3837 protected CodeType resource; 3838 3839 /** 3840 * The label would be used for tracking/logging purposes by test engines. 3841 */ 3842 @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 3843 @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 3844 protected StringType label; 3845 3846 /** 3847 * The description would be used by test engines for tracking and reporting purposes. 3848 */ 3849 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 3850 @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 3851 protected StringType description; 3852 3853 /** 3854 * The mime-type to use for RESTful operation in the 'Accept' header. 3855 */ 3856 @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 3857 @Description(shortDefinition="Mime type to accept in the payload of the response, with charset etc.", formalDefinition="The mime-type to use for RESTful operation in the 'Accept' header." ) 3858 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes") 3859 protected CodeType accept; 3860 3861 /** 3862 * The mime-type to use for RESTful operation in the 'Content-Type' header. 3863 */ 3864 @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 3865 @Description(shortDefinition="Mime type of the request payload contents, with charset etc.", formalDefinition="The mime-type to use for RESTful operation in the 'Content-Type' header." ) 3866 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes") 3867 protected CodeType contentType; 3868 3869 /** 3870 * The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 3871 */ 3872 @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false) 3873 @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." ) 3874 protected IntegerType destination; 3875 3876 /** 3877 * 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. 3878 */ 3879 @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=1, max=1, modifier=false, summary=false) 3880 @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." ) 3881 protected BooleanType encodeRequestUrl; 3882 3883 /** 3884 * The HTTP method the test engine MUST use for this operation regardless of any other operation details. 3885 */ 3886 @Child(name = "method", type = {CodeType.class}, order=9, min=0, max=1, modifier=false, summary=false) 3887 @Description(shortDefinition="delete | get | options | patch | post | put | head", formalDefinition="The HTTP method the test engine MUST use for this operation regardless of any other operation details." ) 3888 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations") 3889 protected Enumeration<TestScriptRequestMethodCode> method; 3890 3891 /** 3892 * The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 3893 */ 3894 @Child(name = "origin", type = {IntegerType.class}, order=10, min=0, max=1, modifier=false, summary=false) 3895 @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." ) 3896 protected IntegerType origin; 3897 3898 /** 3899 * Path plus parameters after [type]. Used to set parts of the request URL explicitly. 3900 */ 3901 @Child(name = "params", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 3902 @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type]. Used to set parts of the request URL explicitly." ) 3903 protected StringType params; 3904 3905 /** 3906 * Header elements would be used to set HTTP headers. 3907 */ 3908 @Child(name = "requestHeader", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3909 @Description(shortDefinition="Each operation can have one or more header elements", formalDefinition="Header elements would be used to set HTTP headers." ) 3910 protected List<SetupActionOperationRequestHeaderComponent> requestHeader; 3911 3912 /** 3913 * The fixture id (maybe new) to map to the request. 3914 */ 3915 @Child(name = "requestId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false) 3916 @Description(shortDefinition="Fixture Id of mapped request", formalDefinition="The fixture id (maybe new) to map to the request." ) 3917 protected IdType requestId; 3918 3919 /** 3920 * The fixture id (maybe new) to map to the response. 3921 */ 3922 @Child(name = "responseId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false) 3923 @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." ) 3924 protected IdType responseId; 3925 3926 /** 3927 * The id of the fixture used as the body of a PUT or POST request. 3928 */ 3929 @Child(name = "sourceId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false) 3930 @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." ) 3931 protected IdType sourceId; 3932 3933 /** 3934 * Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 3935 */ 3936 @Child(name = "targetId", type = {IdType.class}, order=16, min=0, max=1, modifier=false, summary=false) 3937 @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." ) 3938 protected IdType targetId; 3939 3940 /** 3941 * Complete request URL. 3942 */ 3943 @Child(name = "url", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) 3944 @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." ) 3945 protected StringType url; 3946 3947 private static final long serialVersionUID = 300050202L; 3948 3949 /** 3950 * Constructor 3951 */ 3952 public SetupActionOperationComponent() { 3953 super(); 3954 } 3955 3956 /** 3957 * Constructor 3958 */ 3959 public SetupActionOperationComponent(BooleanType encodeRequestUrl) { 3960 super(); 3961 this.encodeRequestUrl = encodeRequestUrl; 3962 } 3963 3964 /** 3965 * @return {@link #type} (Server interaction or operation type.) 3966 */ 3967 public Coding getType() { 3968 if (this.type == null) 3969 if (Configuration.errorOnAutoCreate()) 3970 throw new Error("Attempt to auto-create SetupActionOperationComponent.type"); 3971 else if (Configuration.doAutoCreate()) 3972 this.type = new Coding(); // cc 3973 return this.type; 3974 } 3975 3976 public boolean hasType() { 3977 return this.type != null && !this.type.isEmpty(); 3978 } 3979 3980 /** 3981 * @param value {@link #type} (Server interaction or operation type.) 3982 */ 3983 public SetupActionOperationComponent setType(Coding value) { 3984 this.type = value; 3985 return this; 3986 } 3987 3988 /** 3989 * @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 3990 */ 3991 public CodeType getResourceElement() { 3992 if (this.resource == null) 3993 if (Configuration.errorOnAutoCreate()) 3994 throw new Error("Attempt to auto-create SetupActionOperationComponent.resource"); 3995 else if (Configuration.doAutoCreate()) 3996 this.resource = new CodeType(); // bb 3997 return this.resource; 3998 } 3999 4000 public boolean hasResourceElement() { 4001 return this.resource != null && !this.resource.isEmpty(); 4002 } 4003 4004 public boolean hasResource() { 4005 return this.resource != null && !this.resource.isEmpty(); 4006 } 4007 4008 /** 4009 * @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 4010 */ 4011 public SetupActionOperationComponent setResourceElement(CodeType value) { 4012 this.resource = value; 4013 return this; 4014 } 4015 4016 /** 4017 * @return The type of the resource. See http://build.fhir.org/resourcelist.html. 4018 */ 4019 public String getResource() { 4020 return this.resource == null ? null : this.resource.getValue(); 4021 } 4022 4023 /** 4024 * @param value The type of the resource. See http://build.fhir.org/resourcelist.html. 4025 */ 4026 public SetupActionOperationComponent setResource(String value) { 4027 if (Utilities.noString(value)) 4028 this.resource = null; 4029 else { 4030 if (this.resource == null) 4031 this.resource = new CodeType(); 4032 this.resource.setValue(value); 4033 } 4034 return this; 4035 } 4036 4037 /** 4038 * @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 4039 */ 4040 public StringType getLabelElement() { 4041 if (this.label == null) 4042 if (Configuration.errorOnAutoCreate()) 4043 throw new Error("Attempt to auto-create SetupActionOperationComponent.label"); 4044 else if (Configuration.doAutoCreate()) 4045 this.label = new StringType(); // bb 4046 return this.label; 4047 } 4048 4049 public boolean hasLabelElement() { 4050 return this.label != null && !this.label.isEmpty(); 4051 } 4052 4053 public boolean hasLabel() { 4054 return this.label != null && !this.label.isEmpty(); 4055 } 4056 4057 /** 4058 * @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 4059 */ 4060 public SetupActionOperationComponent setLabelElement(StringType value) { 4061 this.label = value; 4062 return this; 4063 } 4064 4065 /** 4066 * @return The label would be used for tracking/logging purposes by test engines. 4067 */ 4068 public String getLabel() { 4069 return this.label == null ? null : this.label.getValue(); 4070 } 4071 4072 /** 4073 * @param value The label would be used for tracking/logging purposes by test engines. 4074 */ 4075 public SetupActionOperationComponent setLabel(String value) { 4076 if (Utilities.noString(value)) 4077 this.label = null; 4078 else { 4079 if (this.label == null) 4080 this.label = new StringType(); 4081 this.label.setValue(value); 4082 } 4083 return this; 4084 } 4085 4086 /** 4087 * @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 4088 */ 4089 public StringType getDescriptionElement() { 4090 if (this.description == null) 4091 if (Configuration.errorOnAutoCreate()) 4092 throw new Error("Attempt to auto-create SetupActionOperationComponent.description"); 4093 else if (Configuration.doAutoCreate()) 4094 this.description = new StringType(); // bb 4095 return this.description; 4096 } 4097 4098 public boolean hasDescriptionElement() { 4099 return this.description != null && !this.description.isEmpty(); 4100 } 4101 4102 public boolean hasDescription() { 4103 return this.description != null && !this.description.isEmpty(); 4104 } 4105 4106 /** 4107 * @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 4108 */ 4109 public SetupActionOperationComponent setDescriptionElement(StringType value) { 4110 this.description = value; 4111 return this; 4112 } 4113 4114 /** 4115 * @return The description would be used by test engines for tracking and reporting purposes. 4116 */ 4117 public String getDescription() { 4118 return this.description == null ? null : this.description.getValue(); 4119 } 4120 4121 /** 4122 * @param value The description would be used by test engines for tracking and reporting purposes. 4123 */ 4124 public SetupActionOperationComponent setDescription(String value) { 4125 if (Utilities.noString(value)) 4126 this.description = null; 4127 else { 4128 if (this.description == null) 4129 this.description = new StringType(); 4130 this.description.setValue(value); 4131 } 4132 return this; 4133 } 4134 4135 /** 4136 * @return {@link #accept} (The 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 4137 */ 4138 public CodeType getAcceptElement() { 4139 if (this.accept == null) 4140 if (Configuration.errorOnAutoCreate()) 4141 throw new Error("Attempt to auto-create SetupActionOperationComponent.accept"); 4142 else if (Configuration.doAutoCreate()) 4143 this.accept = new CodeType(); // bb 4144 return this.accept; 4145 } 4146 4147 public boolean hasAcceptElement() { 4148 return this.accept != null && !this.accept.isEmpty(); 4149 } 4150 4151 public boolean hasAccept() { 4152 return this.accept != null && !this.accept.isEmpty(); 4153 } 4154 4155 /** 4156 * @param value {@link #accept} (The 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 4157 */ 4158 public SetupActionOperationComponent setAcceptElement(CodeType value) { 4159 this.accept = value; 4160 return this; 4161 } 4162 4163 /** 4164 * @return The mime-type to use for RESTful operation in the 'Accept' header. 4165 */ 4166 public String getAccept() { 4167 return this.accept == null ? null : this.accept.getValue(); 4168 } 4169 4170 /** 4171 * @param value The mime-type to use for RESTful operation in the 'Accept' header. 4172 */ 4173 public SetupActionOperationComponent setAccept(String value) { 4174 if (Utilities.noString(value)) 4175 this.accept = null; 4176 else { 4177 if (this.accept == null) 4178 this.accept = new CodeType(); 4179 this.accept.setValue(value); 4180 } 4181 return this; 4182 } 4183 4184 /** 4185 * @return {@link #contentType} (The 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 4186 */ 4187 public CodeType getContentTypeElement() { 4188 if (this.contentType == null) 4189 if (Configuration.errorOnAutoCreate()) 4190 throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType"); 4191 else if (Configuration.doAutoCreate()) 4192 this.contentType = new CodeType(); // bb 4193 return this.contentType; 4194 } 4195 4196 public boolean hasContentTypeElement() { 4197 return this.contentType != null && !this.contentType.isEmpty(); 4198 } 4199 4200 public boolean hasContentType() { 4201 return this.contentType != null && !this.contentType.isEmpty(); 4202 } 4203 4204 /** 4205 * @param value {@link #contentType} (The 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 4206 */ 4207 public SetupActionOperationComponent setContentTypeElement(CodeType value) { 4208 this.contentType = value; 4209 return this; 4210 } 4211 4212 /** 4213 * @return The mime-type to use for RESTful operation in the 'Content-Type' header. 4214 */ 4215 public String getContentType() { 4216 return this.contentType == null ? null : this.contentType.getValue(); 4217 } 4218 4219 /** 4220 * @param value The mime-type to use for RESTful operation in the 'Content-Type' header. 4221 */ 4222 public SetupActionOperationComponent setContentType(String value) { 4223 if (Utilities.noString(value)) 4224 this.contentType = null; 4225 else { 4226 if (this.contentType == null) 4227 this.contentType = new CodeType(); 4228 this.contentType.setValue(value); 4229 } 4230 return this; 4231 } 4232 4233 /** 4234 * @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 4235 */ 4236 public IntegerType getDestinationElement() { 4237 if (this.destination == null) 4238 if (Configuration.errorOnAutoCreate()) 4239 throw new Error("Attempt to auto-create SetupActionOperationComponent.destination"); 4240 else if (Configuration.doAutoCreate()) 4241 this.destination = new IntegerType(); // bb 4242 return this.destination; 4243 } 4244 4245 public boolean hasDestinationElement() { 4246 return this.destination != null && !this.destination.isEmpty(); 4247 } 4248 4249 public boolean hasDestination() { 4250 return this.destination != null && !this.destination.isEmpty(); 4251 } 4252 4253 /** 4254 * @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 4255 */ 4256 public SetupActionOperationComponent setDestinationElement(IntegerType value) { 4257 this.destination = value; 4258 return this; 4259 } 4260 4261 /** 4262 * @return The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 4263 */ 4264 public int getDestination() { 4265 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 4266 } 4267 4268 /** 4269 * @param value The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 4270 */ 4271 public SetupActionOperationComponent setDestination(int value) { 4272 if (this.destination == null) 4273 this.destination = new IntegerType(); 4274 this.destination.setValue(value); 4275 return this; 4276 } 4277 4278 /** 4279 * @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 4280 */ 4281 public BooleanType getEncodeRequestUrlElement() { 4282 if (this.encodeRequestUrl == null) 4283 if (Configuration.errorOnAutoCreate()) 4284 throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl"); 4285 else if (Configuration.doAutoCreate()) 4286 this.encodeRequestUrl = new BooleanType(); // bb 4287 return this.encodeRequestUrl; 4288 } 4289 4290 public boolean hasEncodeRequestUrlElement() { 4291 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 4292 } 4293 4294 public boolean hasEncodeRequestUrl() { 4295 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 4296 } 4297 4298 /** 4299 * @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 4300 */ 4301 public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 4302 this.encodeRequestUrl = value; 4303 return this; 4304 } 4305 4306 /** 4307 * @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. 4308 */ 4309 public boolean getEncodeRequestUrl() { 4310 return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue(); 4311 } 4312 4313 /** 4314 * @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. 4315 */ 4316 public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 4317 if (this.encodeRequestUrl == null) 4318 this.encodeRequestUrl = new BooleanType(); 4319 this.encodeRequestUrl.setValue(value); 4320 return this; 4321 } 4322 4323 /** 4324 * @return {@link #method} (The HTTP method the test engine MUST use for this operation regardless of any other operation details.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value 4325 */ 4326 public Enumeration<TestScriptRequestMethodCode> getMethodElement() { 4327 if (this.method == null) 4328 if (Configuration.errorOnAutoCreate()) 4329 throw new Error("Attempt to auto-create SetupActionOperationComponent.method"); 4330 else if (Configuration.doAutoCreate()) 4331 this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb 4332 return this.method; 4333 } 4334 4335 public boolean hasMethodElement() { 4336 return this.method != null && !this.method.isEmpty(); 4337 } 4338 4339 public boolean hasMethod() { 4340 return this.method != null && !this.method.isEmpty(); 4341 } 4342 4343 /** 4344 * @param value {@link #method} (The HTTP method the test engine MUST use for this operation regardless of any other operation details.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value 4345 */ 4346 public SetupActionOperationComponent setMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 4347 this.method = value; 4348 return this; 4349 } 4350 4351 /** 4352 * @return The HTTP method the test engine MUST use for this operation regardless of any other operation details. 4353 */ 4354 public TestScriptRequestMethodCode getMethod() { 4355 return this.method == null ? null : this.method.getValue(); 4356 } 4357 4358 /** 4359 * @param value The HTTP method the test engine MUST use for this operation regardless of any other operation details. 4360 */ 4361 public SetupActionOperationComponent setMethod(TestScriptRequestMethodCode value) { 4362 if (value == null) 4363 this.method = null; 4364 else { 4365 if (this.method == null) 4366 this.method = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); 4367 this.method.setValue(value); 4368 } 4369 return this; 4370 } 4371 4372 /** 4373 * @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 4374 */ 4375 public IntegerType getOriginElement() { 4376 if (this.origin == null) 4377 if (Configuration.errorOnAutoCreate()) 4378 throw new Error("Attempt to auto-create SetupActionOperationComponent.origin"); 4379 else if (Configuration.doAutoCreate()) 4380 this.origin = new IntegerType(); // bb 4381 return this.origin; 4382 } 4383 4384 public boolean hasOriginElement() { 4385 return this.origin != null && !this.origin.isEmpty(); 4386 } 4387 4388 public boolean hasOrigin() { 4389 return this.origin != null && !this.origin.isEmpty(); 4390 } 4391 4392 /** 4393 * @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 4394 */ 4395 public SetupActionOperationComponent setOriginElement(IntegerType value) { 4396 this.origin = value; 4397 return this; 4398 } 4399 4400 /** 4401 * @return The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 4402 */ 4403 public int getOrigin() { 4404 return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue(); 4405 } 4406 4407 /** 4408 * @param value The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 4409 */ 4410 public SetupActionOperationComponent setOrigin(int value) { 4411 if (this.origin == null) 4412 this.origin = new IntegerType(); 4413 this.origin.setValue(value); 4414 return this; 4415 } 4416 4417 /** 4418 * @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 4419 */ 4420 public StringType getParamsElement() { 4421 if (this.params == null) 4422 if (Configuration.errorOnAutoCreate()) 4423 throw new Error("Attempt to auto-create SetupActionOperationComponent.params"); 4424 else if (Configuration.doAutoCreate()) 4425 this.params = new StringType(); // bb 4426 return this.params; 4427 } 4428 4429 public boolean hasParamsElement() { 4430 return this.params != null && !this.params.isEmpty(); 4431 } 4432 4433 public boolean hasParams() { 4434 return this.params != null && !this.params.isEmpty(); 4435 } 4436 4437 /** 4438 * @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 4439 */ 4440 public SetupActionOperationComponent setParamsElement(StringType value) { 4441 this.params = value; 4442 return this; 4443 } 4444 4445 /** 4446 * @return Path plus parameters after [type]. Used to set parts of the request URL explicitly. 4447 */ 4448 public String getParams() { 4449 return this.params == null ? null : this.params.getValue(); 4450 } 4451 4452 /** 4453 * @param value Path plus parameters after [type]. Used to set parts of the request URL explicitly. 4454 */ 4455 public SetupActionOperationComponent setParams(String value) { 4456 if (Utilities.noString(value)) 4457 this.params = null; 4458 else { 4459 if (this.params == null) 4460 this.params = new StringType(); 4461 this.params.setValue(value); 4462 } 4463 return this; 4464 } 4465 4466 /** 4467 * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) 4468 */ 4469 public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 4470 if (this.requestHeader == null) 4471 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 4472 return this.requestHeader; 4473 } 4474 4475 /** 4476 * @return Returns a reference to <code>this</code> for easy method chaining 4477 */ 4478 public SetupActionOperationComponent setRequestHeader(List<SetupActionOperationRequestHeaderComponent> theRequestHeader) { 4479 this.requestHeader = theRequestHeader; 4480 return this; 4481 } 4482 4483 public boolean hasRequestHeader() { 4484 if (this.requestHeader == null) 4485 return false; 4486 for (SetupActionOperationRequestHeaderComponent item : this.requestHeader) 4487 if (!item.isEmpty()) 4488 return true; 4489 return false; 4490 } 4491 4492 public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3 4493 SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent(); 4494 if (this.requestHeader == null) 4495 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 4496 this.requestHeader.add(t); 4497 return t; 4498 } 4499 4500 public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3 4501 if (t == null) 4502 return this; 4503 if (this.requestHeader == null) 4504 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 4505 this.requestHeader.add(t); 4506 return this; 4507 } 4508 4509 /** 4510 * @return The first repetition of repeating field {@link #requestHeader}, creating it if it does not already exist 4511 */ 4512 public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() { 4513 if (getRequestHeader().isEmpty()) { 4514 addRequestHeader(); 4515 } 4516 return getRequestHeader().get(0); 4517 } 4518 4519 /** 4520 * @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 4521 */ 4522 public IdType getRequestIdElement() { 4523 if (this.requestId == null) 4524 if (Configuration.errorOnAutoCreate()) 4525 throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId"); 4526 else if (Configuration.doAutoCreate()) 4527 this.requestId = new IdType(); // bb 4528 return this.requestId; 4529 } 4530 4531 public boolean hasRequestIdElement() { 4532 return this.requestId != null && !this.requestId.isEmpty(); 4533 } 4534 4535 public boolean hasRequestId() { 4536 return this.requestId != null && !this.requestId.isEmpty(); 4537 } 4538 4539 /** 4540 * @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 4541 */ 4542 public SetupActionOperationComponent setRequestIdElement(IdType value) { 4543 this.requestId = value; 4544 return this; 4545 } 4546 4547 /** 4548 * @return The fixture id (maybe new) to map to the request. 4549 */ 4550 public String getRequestId() { 4551 return this.requestId == null ? null : this.requestId.getValue(); 4552 } 4553 4554 /** 4555 * @param value The fixture id (maybe new) to map to the request. 4556 */ 4557 public SetupActionOperationComponent setRequestId(String value) { 4558 if (Utilities.noString(value)) 4559 this.requestId = null; 4560 else { 4561 if (this.requestId == null) 4562 this.requestId = new IdType(); 4563 this.requestId.setValue(value); 4564 } 4565 return this; 4566 } 4567 4568 /** 4569 * @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 4570 */ 4571 public IdType getResponseIdElement() { 4572 if (this.responseId == null) 4573 if (Configuration.errorOnAutoCreate()) 4574 throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId"); 4575 else if (Configuration.doAutoCreate()) 4576 this.responseId = new IdType(); // bb 4577 return this.responseId; 4578 } 4579 4580 public boolean hasResponseIdElement() { 4581 return this.responseId != null && !this.responseId.isEmpty(); 4582 } 4583 4584 public boolean hasResponseId() { 4585 return this.responseId != null && !this.responseId.isEmpty(); 4586 } 4587 4588 /** 4589 * @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 4590 */ 4591 public SetupActionOperationComponent setResponseIdElement(IdType value) { 4592 this.responseId = value; 4593 return this; 4594 } 4595 4596 /** 4597 * @return The fixture id (maybe new) to map to the response. 4598 */ 4599 public String getResponseId() { 4600 return this.responseId == null ? null : this.responseId.getValue(); 4601 } 4602 4603 /** 4604 * @param value The fixture id (maybe new) to map to the response. 4605 */ 4606 public SetupActionOperationComponent setResponseId(String value) { 4607 if (Utilities.noString(value)) 4608 this.responseId = null; 4609 else { 4610 if (this.responseId == null) 4611 this.responseId = new IdType(); 4612 this.responseId.setValue(value); 4613 } 4614 return this; 4615 } 4616 4617 /** 4618 * @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 4619 */ 4620 public IdType getSourceIdElement() { 4621 if (this.sourceId == null) 4622 if (Configuration.errorOnAutoCreate()) 4623 throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId"); 4624 else if (Configuration.doAutoCreate()) 4625 this.sourceId = new IdType(); // bb 4626 return this.sourceId; 4627 } 4628 4629 public boolean hasSourceIdElement() { 4630 return this.sourceId != null && !this.sourceId.isEmpty(); 4631 } 4632 4633 public boolean hasSourceId() { 4634 return this.sourceId != null && !this.sourceId.isEmpty(); 4635 } 4636 4637 /** 4638 * @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 4639 */ 4640 public SetupActionOperationComponent setSourceIdElement(IdType value) { 4641 this.sourceId = value; 4642 return this; 4643 } 4644 4645 /** 4646 * @return The id of the fixture used as the body of a PUT or POST request. 4647 */ 4648 public String getSourceId() { 4649 return this.sourceId == null ? null : this.sourceId.getValue(); 4650 } 4651 4652 /** 4653 * @param value The id of the fixture used as the body of a PUT or POST request. 4654 */ 4655 public SetupActionOperationComponent setSourceId(String value) { 4656 if (Utilities.noString(value)) 4657 this.sourceId = null; 4658 else { 4659 if (this.sourceId == null) 4660 this.sourceId = new IdType(); 4661 this.sourceId.setValue(value); 4662 } 4663 return this; 4664 } 4665 4666 /** 4667 * @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 4668 */ 4669 public IdType getTargetIdElement() { 4670 if (this.targetId == null) 4671 if (Configuration.errorOnAutoCreate()) 4672 throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId"); 4673 else if (Configuration.doAutoCreate()) 4674 this.targetId = new IdType(); // bb 4675 return this.targetId; 4676 } 4677 4678 public boolean hasTargetIdElement() { 4679 return this.targetId != null && !this.targetId.isEmpty(); 4680 } 4681 4682 public boolean hasTargetId() { 4683 return this.targetId != null && !this.targetId.isEmpty(); 4684 } 4685 4686 /** 4687 * @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 4688 */ 4689 public SetupActionOperationComponent setTargetIdElement(IdType value) { 4690 this.targetId = value; 4691 return this; 4692 } 4693 4694 /** 4695 * @return Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 4696 */ 4697 public String getTargetId() { 4698 return this.targetId == null ? null : this.targetId.getValue(); 4699 } 4700 4701 /** 4702 * @param value Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 4703 */ 4704 public SetupActionOperationComponent setTargetId(String value) { 4705 if (Utilities.noString(value)) 4706 this.targetId = null; 4707 else { 4708 if (this.targetId == null) 4709 this.targetId = new IdType(); 4710 this.targetId.setValue(value); 4711 } 4712 return this; 4713 } 4714 4715 /** 4716 * @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 4717 */ 4718 public StringType getUrlElement() { 4719 if (this.url == null) 4720 if (Configuration.errorOnAutoCreate()) 4721 throw new Error("Attempt to auto-create SetupActionOperationComponent.url"); 4722 else if (Configuration.doAutoCreate()) 4723 this.url = new StringType(); // bb 4724 return this.url; 4725 } 4726 4727 public boolean hasUrlElement() { 4728 return this.url != null && !this.url.isEmpty(); 4729 } 4730 4731 public boolean hasUrl() { 4732 return this.url != null && !this.url.isEmpty(); 4733 } 4734 4735 /** 4736 * @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 4737 */ 4738 public SetupActionOperationComponent setUrlElement(StringType value) { 4739 this.url = value; 4740 return this; 4741 } 4742 4743 /** 4744 * @return Complete request URL. 4745 */ 4746 public String getUrl() { 4747 return this.url == null ? null : this.url.getValue(); 4748 } 4749 4750 /** 4751 * @param value Complete request URL. 4752 */ 4753 public SetupActionOperationComponent setUrl(String value) { 4754 if (Utilities.noString(value)) 4755 this.url = null; 4756 else { 4757 if (this.url == null) 4758 this.url = new StringType(); 4759 this.url.setValue(value); 4760 } 4761 return this; 4762 } 4763 4764 protected void listChildren(List<Property> children) { 4765 super.listChildren(children); 4766 children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type)); 4767 children.add(new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource)); 4768 children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label)); 4769 children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description)); 4770 children.add(new Property("accept", "code", "The mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept)); 4771 children.add(new Property("contentType", "code", "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType)); 4772 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)); 4773 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)); 4774 children.add(new Property("method", "code", "The HTTP method the test engine MUST use for this operation regardless of any other operation details.", 0, 1, method)); 4775 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)); 4776 children.add(new Property("params", "string", "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", 0, 1, params)); 4777 children.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader)); 4778 children.add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId)); 4779 children.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId)); 4780 children.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId)); 4781 children.add(new Property("targetId", "id", "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", 0, 1, targetId)); 4782 children.add(new Property("url", "string", "Complete request URL.", 0, 1, url)); 4783 } 4784 4785 @Override 4786 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4787 switch (_hash) { 4788 case 3575610: /*type*/ return new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type); 4789 case -341064690: /*resource*/ return new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource); 4790 case 102727412: /*label*/ return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label); 4791 case -1724546052: /*description*/ return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description); 4792 case -1423461112: /*accept*/ return new Property("accept", "code", "The mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept); 4793 case -389131437: /*contentType*/ return new Property("contentType", "code", "The mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType); 4794 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); 4795 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); 4796 case -1077554975: /*method*/ return new Property("method", "code", "The HTTP method the test engine MUST use for this operation regardless of any other operation details.", 0, 1, method); 4797 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); 4798 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); 4799 case 1074158076: /*requestHeader*/ return new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader); 4800 case 693933066: /*requestId*/ return new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId); 4801 case -633138884: /*responseId*/ return new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId); 4802 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); 4803 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); 4804 case 116079: /*url*/ return new Property("url", "string", "Complete request URL.", 0, 1, url); 4805 default: return super.getNamedProperty(_hash, _name, _checkValid); 4806 } 4807 4808 } 4809 4810 @Override 4811 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4812 switch (hash) { 4813 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 4814 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 4815 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 4816 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 4817 case -1423461112: /*accept*/ return this.accept == null ? new Base[0] : new Base[] {this.accept}; // CodeType 4818 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType 4819 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 4820 case -1760554218: /*encodeRequestUrl*/ return this.encodeRequestUrl == null ? new Base[0] : new Base[] {this.encodeRequestUrl}; // BooleanType 4821 case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // Enumeration<TestScriptRequestMethodCode> 4822 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // IntegerType 4823 case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType 4824 case 1074158076: /*requestHeader*/ return this.requestHeader == null ? new Base[0] : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent 4825 case 693933066: /*requestId*/ return this.requestId == null ? new Base[0] : new Base[] {this.requestId}; // IdType 4826 case -633138884: /*responseId*/ return this.responseId == null ? new Base[0] : new Base[] {this.responseId}; // IdType 4827 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 4828 case -441951604: /*targetId*/ return this.targetId == null ? new Base[0] : new Base[] {this.targetId}; // IdType 4829 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // StringType 4830 default: return super.getProperty(hash, name, checkValid); 4831 } 4832 4833 } 4834 4835 @Override 4836 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4837 switch (hash) { 4838 case 3575610: // type 4839 this.type = castToCoding(value); // Coding 4840 return value; 4841 case -341064690: // resource 4842 this.resource = castToCode(value); // CodeType 4843 return value; 4844 case 102727412: // label 4845 this.label = castToString(value); // StringType 4846 return value; 4847 case -1724546052: // description 4848 this.description = castToString(value); // StringType 4849 return value; 4850 case -1423461112: // accept 4851 this.accept = castToCode(value); // CodeType 4852 return value; 4853 case -389131437: // contentType 4854 this.contentType = castToCode(value); // CodeType 4855 return value; 4856 case -1429847026: // destination 4857 this.destination = castToInteger(value); // IntegerType 4858 return value; 4859 case -1760554218: // encodeRequestUrl 4860 this.encodeRequestUrl = castToBoolean(value); // BooleanType 4861 return value; 4862 case -1077554975: // method 4863 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 4864 this.method = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 4865 return value; 4866 case -1008619738: // origin 4867 this.origin = castToInteger(value); // IntegerType 4868 return value; 4869 case -995427962: // params 4870 this.params = castToString(value); // StringType 4871 return value; 4872 case 1074158076: // requestHeader 4873 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent 4874 return value; 4875 case 693933066: // requestId 4876 this.requestId = castToId(value); // IdType 4877 return value; 4878 case -633138884: // responseId 4879 this.responseId = castToId(value); // IdType 4880 return value; 4881 case 1746327190: // sourceId 4882 this.sourceId = castToId(value); // IdType 4883 return value; 4884 case -441951604: // targetId 4885 this.targetId = castToId(value); // IdType 4886 return value; 4887 case 116079: // url 4888 this.url = castToString(value); // StringType 4889 return value; 4890 default: return super.setProperty(hash, name, value); 4891 } 4892 4893 } 4894 4895 @Override 4896 public Base setProperty(String name, Base value) throws FHIRException { 4897 if (name.equals("type")) { 4898 this.type = castToCoding(value); // Coding 4899 } else if (name.equals("resource")) { 4900 this.resource = castToCode(value); // CodeType 4901 } else if (name.equals("label")) { 4902 this.label = castToString(value); // StringType 4903 } else if (name.equals("description")) { 4904 this.description = castToString(value); // StringType 4905 } else if (name.equals("accept")) { 4906 this.accept = castToCode(value); // CodeType 4907 } else if (name.equals("contentType")) { 4908 this.contentType = castToCode(value); // CodeType 4909 } else if (name.equals("destination")) { 4910 this.destination = castToInteger(value); // IntegerType 4911 } else if (name.equals("encodeRequestUrl")) { 4912 this.encodeRequestUrl = castToBoolean(value); // BooleanType 4913 } else if (name.equals("method")) { 4914 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 4915 this.method = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 4916 } else if (name.equals("origin")) { 4917 this.origin = castToInteger(value); // IntegerType 4918 } else if (name.equals("params")) { 4919 this.params = castToString(value); // StringType 4920 } else if (name.equals("requestHeader")) { 4921 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); 4922 } else if (name.equals("requestId")) { 4923 this.requestId = castToId(value); // IdType 4924 } else if (name.equals("responseId")) { 4925 this.responseId = castToId(value); // IdType 4926 } else if (name.equals("sourceId")) { 4927 this.sourceId = castToId(value); // IdType 4928 } else if (name.equals("targetId")) { 4929 this.targetId = castToId(value); // IdType 4930 } else if (name.equals("url")) { 4931 this.url = castToString(value); // StringType 4932 } else 4933 return super.setProperty(name, value); 4934 return value; 4935 } 4936 4937 @Override 4938 public Base makeProperty(int hash, String name) throws FHIRException { 4939 switch (hash) { 4940 case 3575610: return getType(); 4941 case -341064690: return getResourceElement(); 4942 case 102727412: return getLabelElement(); 4943 case -1724546052: return getDescriptionElement(); 4944 case -1423461112: return getAcceptElement(); 4945 case -389131437: return getContentTypeElement(); 4946 case -1429847026: return getDestinationElement(); 4947 case -1760554218: return getEncodeRequestUrlElement(); 4948 case -1077554975: return getMethodElement(); 4949 case -1008619738: return getOriginElement(); 4950 case -995427962: return getParamsElement(); 4951 case 1074158076: return addRequestHeader(); 4952 case 693933066: return getRequestIdElement(); 4953 case -633138884: return getResponseIdElement(); 4954 case 1746327190: return getSourceIdElement(); 4955 case -441951604: return getTargetIdElement(); 4956 case 116079: return getUrlElement(); 4957 default: return super.makeProperty(hash, name); 4958 } 4959 4960 } 4961 4962 @Override 4963 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4964 switch (hash) { 4965 case 3575610: /*type*/ return new String[] {"Coding"}; 4966 case -341064690: /*resource*/ return new String[] {"code"}; 4967 case 102727412: /*label*/ return new String[] {"string"}; 4968 case -1724546052: /*description*/ return new String[] {"string"}; 4969 case -1423461112: /*accept*/ return new String[] {"code"}; 4970 case -389131437: /*contentType*/ return new String[] {"code"}; 4971 case -1429847026: /*destination*/ return new String[] {"integer"}; 4972 case -1760554218: /*encodeRequestUrl*/ return new String[] {"boolean"}; 4973 case -1077554975: /*method*/ return new String[] {"code"}; 4974 case -1008619738: /*origin*/ return new String[] {"integer"}; 4975 case -995427962: /*params*/ return new String[] {"string"}; 4976 case 1074158076: /*requestHeader*/ return new String[] {}; 4977 case 693933066: /*requestId*/ return new String[] {"id"}; 4978 case -633138884: /*responseId*/ return new String[] {"id"}; 4979 case 1746327190: /*sourceId*/ return new String[] {"id"}; 4980 case -441951604: /*targetId*/ return new String[] {"id"}; 4981 case 116079: /*url*/ return new String[] {"string"}; 4982 default: return super.getTypesForProperty(hash, name); 4983 } 4984 4985 } 4986 4987 @Override 4988 public Base addChild(String name) throws FHIRException { 4989 if (name.equals("type")) { 4990 this.type = new Coding(); 4991 return this.type; 4992 } 4993 else if (name.equals("resource")) { 4994 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 4995 } 4996 else if (name.equals("label")) { 4997 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 4998 } 4999 else if (name.equals("description")) { 5000 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 5001 } 5002 else if (name.equals("accept")) { 5003 throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept"); 5004 } 5005 else if (name.equals("contentType")) { 5006 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 5007 } 5008 else if (name.equals("destination")) { 5009 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 5010 } 5011 else if (name.equals("encodeRequestUrl")) { 5012 throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl"); 5013 } 5014 else if (name.equals("method")) { 5015 throw new FHIRException("Cannot call addChild on a primitive type TestScript.method"); 5016 } 5017 else if (name.equals("origin")) { 5018 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 5019 } 5020 else if (name.equals("params")) { 5021 throw new FHIRException("Cannot call addChild on a primitive type TestScript.params"); 5022 } 5023 else if (name.equals("requestHeader")) { 5024 return addRequestHeader(); 5025 } 5026 else if (name.equals("requestId")) { 5027 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestId"); 5028 } 5029 else if (name.equals("responseId")) { 5030 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId"); 5031 } 5032 else if (name.equals("sourceId")) { 5033 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 5034 } 5035 else if (name.equals("targetId")) { 5036 throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId"); 5037 } 5038 else if (name.equals("url")) { 5039 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 5040 } 5041 else 5042 return super.addChild(name); 5043 } 5044 5045 public SetupActionOperationComponent copy() { 5046 SetupActionOperationComponent dst = new SetupActionOperationComponent(); 5047 copyValues(dst); 5048 return dst; 5049 } 5050 5051 public void copyValues(SetupActionOperationComponent dst) { 5052 super.copyValues(dst); 5053 dst.type = type == null ? null : type.copy(); 5054 dst.resource = resource == null ? null : resource.copy(); 5055 dst.label = label == null ? null : label.copy(); 5056 dst.description = description == null ? null : description.copy(); 5057 dst.accept = accept == null ? null : accept.copy(); 5058 dst.contentType = contentType == null ? null : contentType.copy(); 5059 dst.destination = destination == null ? null : destination.copy(); 5060 dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy(); 5061 dst.method = method == null ? null : method.copy(); 5062 dst.origin = origin == null ? null : origin.copy(); 5063 dst.params = params == null ? null : params.copy(); 5064 if (requestHeader != null) { 5065 dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5066 for (SetupActionOperationRequestHeaderComponent i : requestHeader) 5067 dst.requestHeader.add(i.copy()); 5068 }; 5069 dst.requestId = requestId == null ? null : requestId.copy(); 5070 dst.responseId = responseId == null ? null : responseId.copy(); 5071 dst.sourceId = sourceId == null ? null : sourceId.copy(); 5072 dst.targetId = targetId == null ? null : targetId.copy(); 5073 dst.url = url == null ? null : url.copy(); 5074 } 5075 5076 @Override 5077 public boolean equalsDeep(Base other_) { 5078 if (!super.equalsDeep(other_)) 5079 return false; 5080 if (!(other_ instanceof SetupActionOperationComponent)) 5081 return false; 5082 SetupActionOperationComponent o = (SetupActionOperationComponent) other_; 5083 return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true) 5084 && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true) 5085 && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true) 5086 && compareDeep(method, o.method, true) && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true) 5087 && compareDeep(requestHeader, o.requestHeader, true) && compareDeep(requestId, o.requestId, true) 5088 && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true) && compareDeep(targetId, o.targetId, true) 5089 && compareDeep(url, o.url, true); 5090 } 5091 5092 @Override 5093 public boolean equalsShallow(Base other_) { 5094 if (!super.equalsShallow(other_)) 5095 return false; 5096 if (!(other_ instanceof SetupActionOperationComponent)) 5097 return false; 5098 SetupActionOperationComponent o = (SetupActionOperationComponent) other_; 5099 return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true) 5100 && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true) 5101 && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(method, o.method, true) 5102 && compareValues(origin, o.origin, true) && compareValues(params, o.params, true) && compareValues(requestId, o.requestId, true) 5103 && compareValues(responseId, o.responseId, true) && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true) 5104 && compareValues(url, o.url, true); 5105 } 5106 5107 public boolean isEmpty() { 5108 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description 5109 , accept, contentType, destination, encodeRequestUrl, method, origin, params, requestHeader 5110 , requestId, responseId, sourceId, targetId, url); 5111 } 5112 5113 public String fhirType() { 5114 return "TestScript.setup.action.operation"; 5115 5116 } 5117 5118 } 5119 5120 @Block() 5121 public static class SetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement { 5122 /** 5123 * The HTTP header field e.g. "Accept". 5124 */ 5125 @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 5126 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." ) 5127 protected StringType field; 5128 5129 /** 5130 * The value of the header e.g. "application/fhir+xml". 5131 */ 5132 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 5133 @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/fhir+xml\"." ) 5134 protected StringType value; 5135 5136 private static final long serialVersionUID = 274395337L; 5137 5138 /** 5139 * Constructor 5140 */ 5141 public SetupActionOperationRequestHeaderComponent() { 5142 super(); 5143 } 5144 5145 /** 5146 * Constructor 5147 */ 5148 public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) { 5149 super(); 5150 this.field = field; 5151 this.value = value; 5152 } 5153 5154 /** 5155 * @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 5156 */ 5157 public StringType getFieldElement() { 5158 if (this.field == null) 5159 if (Configuration.errorOnAutoCreate()) 5160 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field"); 5161 else if (Configuration.doAutoCreate()) 5162 this.field = new StringType(); // bb 5163 return this.field; 5164 } 5165 5166 public boolean hasFieldElement() { 5167 return this.field != null && !this.field.isEmpty(); 5168 } 5169 5170 public boolean hasField() { 5171 return this.field != null && !this.field.isEmpty(); 5172 } 5173 5174 /** 5175 * @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 5176 */ 5177 public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 5178 this.field = value; 5179 return this; 5180 } 5181 5182 /** 5183 * @return The HTTP header field e.g. "Accept". 5184 */ 5185 public String getField() { 5186 return this.field == null ? null : this.field.getValue(); 5187 } 5188 5189 /** 5190 * @param value The HTTP header field e.g. "Accept". 5191 */ 5192 public SetupActionOperationRequestHeaderComponent setField(String value) { 5193 if (this.field == null) 5194 this.field = new StringType(); 5195 this.field.setValue(value); 5196 return this; 5197 } 5198 5199 /** 5200 * @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 5201 */ 5202 public StringType getValueElement() { 5203 if (this.value == null) 5204 if (Configuration.errorOnAutoCreate()) 5205 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value"); 5206 else if (Configuration.doAutoCreate()) 5207 this.value = new StringType(); // bb 5208 return this.value; 5209 } 5210 5211 public boolean hasValueElement() { 5212 return this.value != null && !this.value.isEmpty(); 5213 } 5214 5215 public boolean hasValue() { 5216 return this.value != null && !this.value.isEmpty(); 5217 } 5218 5219 /** 5220 * @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 5221 */ 5222 public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 5223 this.value = value; 5224 return this; 5225 } 5226 5227 /** 5228 * @return The value of the header e.g. "application/fhir+xml". 5229 */ 5230 public String getValue() { 5231 return this.value == null ? null : this.value.getValue(); 5232 } 5233 5234 /** 5235 * @param value The value of the header e.g. "application/fhir+xml". 5236 */ 5237 public SetupActionOperationRequestHeaderComponent setValue(String value) { 5238 if (this.value == null) 5239 this.value = new StringType(); 5240 this.value.setValue(value); 5241 return this; 5242 } 5243 5244 protected void listChildren(List<Property> children) { 5245 super.listChildren(children); 5246 children.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field)); 5247 children.add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value)); 5248 } 5249 5250 @Override 5251 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5252 switch (_hash) { 5253 case 97427706: /*field*/ return new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field); 5254 case 111972721: /*value*/ return new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value); 5255 default: return super.getNamedProperty(_hash, _name, _checkValid); 5256 } 5257 5258 } 5259 5260 @Override 5261 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5262 switch (hash) { 5263 case 97427706: /*field*/ return this.field == null ? new Base[0] : new Base[] {this.field}; // StringType 5264 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 5265 default: return super.getProperty(hash, name, checkValid); 5266 } 5267 5268 } 5269 5270 @Override 5271 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5272 switch (hash) { 5273 case 97427706: // field 5274 this.field = castToString(value); // StringType 5275 return value; 5276 case 111972721: // value 5277 this.value = castToString(value); // StringType 5278 return value; 5279 default: return super.setProperty(hash, name, value); 5280 } 5281 5282 } 5283 5284 @Override 5285 public Base setProperty(String name, Base value) throws FHIRException { 5286 if (name.equals("field")) { 5287 this.field = castToString(value); // StringType 5288 } else if (name.equals("value")) { 5289 this.value = castToString(value); // StringType 5290 } else 5291 return super.setProperty(name, value); 5292 return value; 5293 } 5294 5295 @Override 5296 public Base makeProperty(int hash, String name) throws FHIRException { 5297 switch (hash) { 5298 case 97427706: return getFieldElement(); 5299 case 111972721: return getValueElement(); 5300 default: return super.makeProperty(hash, name); 5301 } 5302 5303 } 5304 5305 @Override 5306 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5307 switch (hash) { 5308 case 97427706: /*field*/ return new String[] {"string"}; 5309 case 111972721: /*value*/ return new String[] {"string"}; 5310 default: return super.getTypesForProperty(hash, name); 5311 } 5312 5313 } 5314 5315 @Override 5316 public Base addChild(String name) throws FHIRException { 5317 if (name.equals("field")) { 5318 throw new FHIRException("Cannot call addChild on a primitive type TestScript.field"); 5319 } 5320 else if (name.equals("value")) { 5321 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 5322 } 5323 else 5324 return super.addChild(name); 5325 } 5326 5327 public SetupActionOperationRequestHeaderComponent copy() { 5328 SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent(); 5329 copyValues(dst); 5330 return dst; 5331 } 5332 5333 public void copyValues(SetupActionOperationRequestHeaderComponent dst) { 5334 super.copyValues(dst); 5335 dst.field = field == null ? null : field.copy(); 5336 dst.value = value == null ? null : value.copy(); 5337 } 5338 5339 @Override 5340 public boolean equalsDeep(Base other_) { 5341 if (!super.equalsDeep(other_)) 5342 return false; 5343 if (!(other_ instanceof SetupActionOperationRequestHeaderComponent)) 5344 return false; 5345 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_; 5346 return compareDeep(field, o.field, true) && compareDeep(value, o.value, true); 5347 } 5348 5349 @Override 5350 public boolean equalsShallow(Base other_) { 5351 if (!super.equalsShallow(other_)) 5352 return false; 5353 if (!(other_ instanceof SetupActionOperationRequestHeaderComponent)) 5354 return false; 5355 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_; 5356 return compareValues(field, o.field, true) && compareValues(value, o.value, true); 5357 } 5358 5359 public boolean isEmpty() { 5360 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value); 5361 } 5362 5363 public String fhirType() { 5364 return "TestScript.setup.action.operation.requestHeader"; 5365 5366 } 5367 5368 } 5369 5370 @Block() 5371 public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement { 5372 /** 5373 * The label would be used for tracking/logging purposes by test engines. 5374 */ 5375 @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 5376 @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 5377 protected StringType label; 5378 5379 /** 5380 * The description would be used by test engines for tracking and reporting purposes. 5381 */ 5382 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5383 @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 5384 protected StringType description; 5385 5386 /** 5387 * The direction to use for the assertion. 5388 */ 5389 @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5390 @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." ) 5391 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-direction-codes") 5392 protected Enumeration<AssertionDirectionType> direction; 5393 5394 /** 5395 * Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 5396 */ 5397 @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 5398 @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." ) 5399 protected StringType compareToSourceId; 5400 5401 /** 5402 * The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 5403 */ 5404 @Child(name = "compareToSourceExpression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 5405 @Description(shortDefinition="The FHIRPath expression to evaluate against the source fixture", formalDefinition="The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both." ) 5406 protected StringType compareToSourceExpression; 5407 5408 /** 5409 * XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 5410 */ 5411 @Child(name = "compareToSourcePath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 5412 @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." ) 5413 protected StringType compareToSourcePath; 5414 5415 /** 5416 * The mime-type contents to compare against the request or response message 'Content-Type' header. 5417 */ 5418 @Child(name = "contentType", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5419 @Description(shortDefinition="Mime type to compare against the 'Content-Type' header", formalDefinition="The mime-type contents to compare against the request or response message 'Content-Type' header." ) 5420 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes") 5421 protected CodeType contentType; 5422 5423 /** 5424 * The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload. 5425 */ 5426 @Child(name = "expression", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 5427 @Description(shortDefinition="The FHIRPath expression to be evaluated", formalDefinition="The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload." ) 5428 protected StringType expression; 5429 5430 /** 5431 * The HTTP header field name e.g. 'Location'. 5432 */ 5433 @Child(name = "headerField", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 5434 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." ) 5435 protected StringType headerField; 5436 5437 /** 5438 * The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 5439 */ 5440 @Child(name = "minimumId", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 5441 @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." ) 5442 protected StringType minimumId; 5443 5444 /** 5445 * Whether or not the test execution performs validation on the bundle navigation links. 5446 */ 5447 @Child(name = "navigationLinks", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false) 5448 @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." ) 5449 protected BooleanType navigationLinks; 5450 5451 /** 5452 * The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 5453 */ 5454 @Child(name = "operator", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) 5455 @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." ) 5456 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-operator-codes") 5457 protected Enumeration<AssertionOperatorType> operator; 5458 5459 /** 5460 * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 5461 */ 5462 @Child(name = "path", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) 5463 @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." ) 5464 protected StringType path; 5465 5466 /** 5467 * The request method or HTTP operation code to compare against that used by the client system under test. 5468 */ 5469 @Child(name = "requestMethod", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false) 5470 @Description(shortDefinition="delete | get | options | patch | post | put | head", formalDefinition="The request method or HTTP operation code to compare against that used by the client system under test." ) 5471 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations") 5472 protected Enumeration<TestScriptRequestMethodCode> requestMethod; 5473 5474 /** 5475 * The value to use in a comparison against the request URL path string. 5476 */ 5477 @Child(name = "requestURL", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 5478 @Description(shortDefinition="Request URL comparison value", formalDefinition="The value to use in a comparison against the request URL path string." ) 5479 protected StringType requestURL; 5480 5481 /** 5482 * The type of the resource. See http://build.fhir.org/resourcelist.html. 5483 */ 5484 @Child(name = "resource", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false) 5485 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://build.fhir.org/resourcelist.html." ) 5486 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 5487 protected CodeType resource; 5488 5489 /** 5490 * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 5491 */ 5492 @Child(name = "response", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false) 5493 @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." ) 5494 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-response-code-types") 5495 protected Enumeration<AssertionResponseTypes> response; 5496 5497 /** 5498 * The value of the HTTP response code to be tested. 5499 */ 5500 @Child(name = "responseCode", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false) 5501 @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." ) 5502 protected StringType responseCode; 5503 5504 /** 5505 * Fixture to evaluate the XPath/JSONPath expression or the headerField against. 5506 */ 5507 @Child(name = "sourceId", type = {IdType.class}, order=19, min=0, max=1, modifier=false, summary=false) 5508 @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against." ) 5509 protected IdType sourceId; 5510 5511 /** 5512 * The ID of the Profile to validate against. 5513 */ 5514 @Child(name = "validateProfileId", type = {IdType.class}, order=20, min=0, max=1, modifier=false, summary=false) 5515 @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." ) 5516 protected IdType validateProfileId; 5517 5518 /** 5519 * The value to compare to. 5520 */ 5521 @Child(name = "value", type = {StringType.class}, order=21, min=0, max=1, modifier=false, summary=false) 5522 @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." ) 5523 protected StringType value; 5524 5525 /** 5526 * Whether or not the test execution will produce a warning only on error for this assert. 5527 */ 5528 @Child(name = "warningOnly", type = {BooleanType.class}, order=22, min=1, max=1, modifier=false, summary=false) 5529 @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." ) 5530 protected BooleanType warningOnly; 5531 5532 private static final long serialVersionUID = -1086518778L; 5533 5534 /** 5535 * Constructor 5536 */ 5537 public SetupActionAssertComponent() { 5538 super(); 5539 } 5540 5541 /** 5542 * Constructor 5543 */ 5544 public SetupActionAssertComponent(BooleanType warningOnly) { 5545 super(); 5546 this.warningOnly = warningOnly; 5547 } 5548 5549 /** 5550 * @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 5551 */ 5552 public StringType getLabelElement() { 5553 if (this.label == null) 5554 if (Configuration.errorOnAutoCreate()) 5555 throw new Error("Attempt to auto-create SetupActionAssertComponent.label"); 5556 else if (Configuration.doAutoCreate()) 5557 this.label = new StringType(); // bb 5558 return this.label; 5559 } 5560 5561 public boolean hasLabelElement() { 5562 return this.label != null && !this.label.isEmpty(); 5563 } 5564 5565 public boolean hasLabel() { 5566 return this.label != null && !this.label.isEmpty(); 5567 } 5568 5569 /** 5570 * @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 5571 */ 5572 public SetupActionAssertComponent setLabelElement(StringType value) { 5573 this.label = value; 5574 return this; 5575 } 5576 5577 /** 5578 * @return The label would be used for tracking/logging purposes by test engines. 5579 */ 5580 public String getLabel() { 5581 return this.label == null ? null : this.label.getValue(); 5582 } 5583 5584 /** 5585 * @param value The label would be used for tracking/logging purposes by test engines. 5586 */ 5587 public SetupActionAssertComponent setLabel(String value) { 5588 if (Utilities.noString(value)) 5589 this.label = null; 5590 else { 5591 if (this.label == null) 5592 this.label = new StringType(); 5593 this.label.setValue(value); 5594 } 5595 return this; 5596 } 5597 5598 /** 5599 * @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 5600 */ 5601 public StringType getDescriptionElement() { 5602 if (this.description == null) 5603 if (Configuration.errorOnAutoCreate()) 5604 throw new Error("Attempt to auto-create SetupActionAssertComponent.description"); 5605 else if (Configuration.doAutoCreate()) 5606 this.description = new StringType(); // bb 5607 return this.description; 5608 } 5609 5610 public boolean hasDescriptionElement() { 5611 return this.description != null && !this.description.isEmpty(); 5612 } 5613 5614 public boolean hasDescription() { 5615 return this.description != null && !this.description.isEmpty(); 5616 } 5617 5618 /** 5619 * @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 5620 */ 5621 public SetupActionAssertComponent setDescriptionElement(StringType value) { 5622 this.description = value; 5623 return this; 5624 } 5625 5626 /** 5627 * @return The description would be used by test engines for tracking and reporting purposes. 5628 */ 5629 public String getDescription() { 5630 return this.description == null ? null : this.description.getValue(); 5631 } 5632 5633 /** 5634 * @param value The description would be used by test engines for tracking and reporting purposes. 5635 */ 5636 public SetupActionAssertComponent setDescription(String value) { 5637 if (Utilities.noString(value)) 5638 this.description = null; 5639 else { 5640 if (this.description == null) 5641 this.description = new StringType(); 5642 this.description.setValue(value); 5643 } 5644 return this; 5645 } 5646 5647 /** 5648 * @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 5649 */ 5650 public Enumeration<AssertionDirectionType> getDirectionElement() { 5651 if (this.direction == null) 5652 if (Configuration.errorOnAutoCreate()) 5653 throw new Error("Attempt to auto-create SetupActionAssertComponent.direction"); 5654 else if (Configuration.doAutoCreate()) 5655 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb 5656 return this.direction; 5657 } 5658 5659 public boolean hasDirectionElement() { 5660 return this.direction != null && !this.direction.isEmpty(); 5661 } 5662 5663 public boolean hasDirection() { 5664 return this.direction != null && !this.direction.isEmpty(); 5665 } 5666 5667 /** 5668 * @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 5669 */ 5670 public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 5671 this.direction = value; 5672 return this; 5673 } 5674 5675 /** 5676 * @return The direction to use for the assertion. 5677 */ 5678 public AssertionDirectionType getDirection() { 5679 return this.direction == null ? null : this.direction.getValue(); 5680 } 5681 5682 /** 5683 * @param value The direction to use for the assertion. 5684 */ 5685 public SetupActionAssertComponent setDirection(AssertionDirectionType value) { 5686 if (value == null) 5687 this.direction = null; 5688 else { 5689 if (this.direction == null) 5690 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); 5691 this.direction.setValue(value); 5692 } 5693 return this; 5694 } 5695 5696 /** 5697 * @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 5698 */ 5699 public StringType getCompareToSourceIdElement() { 5700 if (this.compareToSourceId == null) 5701 if (Configuration.errorOnAutoCreate()) 5702 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId"); 5703 else if (Configuration.doAutoCreate()) 5704 this.compareToSourceId = new StringType(); // bb 5705 return this.compareToSourceId; 5706 } 5707 5708 public boolean hasCompareToSourceIdElement() { 5709 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 5710 } 5711 5712 public boolean hasCompareToSourceId() { 5713 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 5714 } 5715 5716 /** 5717 * @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 5718 */ 5719 public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 5720 this.compareToSourceId = value; 5721 return this; 5722 } 5723 5724 /** 5725 * @return Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 5726 */ 5727 public String getCompareToSourceId() { 5728 return this.compareToSourceId == null ? null : this.compareToSourceId.getValue(); 5729 } 5730 5731 /** 5732 * @param value Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 5733 */ 5734 public SetupActionAssertComponent setCompareToSourceId(String value) { 5735 if (Utilities.noString(value)) 5736 this.compareToSourceId = null; 5737 else { 5738 if (this.compareToSourceId == null) 5739 this.compareToSourceId = new StringType(); 5740 this.compareToSourceId.setValue(value); 5741 } 5742 return this; 5743 } 5744 5745 /** 5746 * @return {@link #compareToSourceExpression} (The FHIRPath 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 5747 */ 5748 public StringType getCompareToSourceExpressionElement() { 5749 if (this.compareToSourceExpression == null) 5750 if (Configuration.errorOnAutoCreate()) 5751 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression"); 5752 else if (Configuration.doAutoCreate()) 5753 this.compareToSourceExpression = new StringType(); // bb 5754 return this.compareToSourceExpression; 5755 } 5756 5757 public boolean hasCompareToSourceExpressionElement() { 5758 return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty(); 5759 } 5760 5761 public boolean hasCompareToSourceExpression() { 5762 return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty(); 5763 } 5764 5765 /** 5766 * @param value {@link #compareToSourceExpression} (The FHIRPath 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 5767 */ 5768 public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) { 5769 this.compareToSourceExpression = value; 5770 return this; 5771 } 5772 5773 /** 5774 * @return The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 5775 */ 5776 public String getCompareToSourceExpression() { 5777 return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue(); 5778 } 5779 5780 /** 5781 * @param value The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 5782 */ 5783 public SetupActionAssertComponent setCompareToSourceExpression(String value) { 5784 if (Utilities.noString(value)) 5785 this.compareToSourceExpression = null; 5786 else { 5787 if (this.compareToSourceExpression == null) 5788 this.compareToSourceExpression = new StringType(); 5789 this.compareToSourceExpression.setValue(value); 5790 } 5791 return this; 5792 } 5793 5794 /** 5795 * @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 5796 */ 5797 public StringType getCompareToSourcePathElement() { 5798 if (this.compareToSourcePath == null) 5799 if (Configuration.errorOnAutoCreate()) 5800 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath"); 5801 else if (Configuration.doAutoCreate()) 5802 this.compareToSourcePath = new StringType(); // bb 5803 return this.compareToSourcePath; 5804 } 5805 5806 public boolean hasCompareToSourcePathElement() { 5807 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 5808 } 5809 5810 public boolean hasCompareToSourcePath() { 5811 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 5812 } 5813 5814 /** 5815 * @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 5816 */ 5817 public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 5818 this.compareToSourcePath = value; 5819 return this; 5820 } 5821 5822 /** 5823 * @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. 5824 */ 5825 public String getCompareToSourcePath() { 5826 return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue(); 5827 } 5828 5829 /** 5830 * @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. 5831 */ 5832 public SetupActionAssertComponent setCompareToSourcePath(String value) { 5833 if (Utilities.noString(value)) 5834 this.compareToSourcePath = null; 5835 else { 5836 if (this.compareToSourcePath == null) 5837 this.compareToSourcePath = new StringType(); 5838 this.compareToSourcePath.setValue(value); 5839 } 5840 return this; 5841 } 5842 5843 /** 5844 * @return {@link #contentType} (The mime-type contents to compare against the request or response message 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 5845 */ 5846 public CodeType getContentTypeElement() { 5847 if (this.contentType == null) 5848 if (Configuration.errorOnAutoCreate()) 5849 throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType"); 5850 else if (Configuration.doAutoCreate()) 5851 this.contentType = new CodeType(); // bb 5852 return this.contentType; 5853 } 5854 5855 public boolean hasContentTypeElement() { 5856 return this.contentType != null && !this.contentType.isEmpty(); 5857 } 5858 5859 public boolean hasContentType() { 5860 return this.contentType != null && !this.contentType.isEmpty(); 5861 } 5862 5863 /** 5864 * @param value {@link #contentType} (The mime-type contents to compare against the request or response message 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 5865 */ 5866 public SetupActionAssertComponent setContentTypeElement(CodeType value) { 5867 this.contentType = value; 5868 return this; 5869 } 5870 5871 /** 5872 * @return The mime-type contents to compare against the request or response message 'Content-Type' header. 5873 */ 5874 public String getContentType() { 5875 return this.contentType == null ? null : this.contentType.getValue(); 5876 } 5877 5878 /** 5879 * @param value The mime-type contents to compare against the request or response message 'Content-Type' header. 5880 */ 5881 public SetupActionAssertComponent setContentType(String value) { 5882 if (Utilities.noString(value)) 5883 this.contentType = null; 5884 else { 5885 if (this.contentType == null) 5886 this.contentType = new CodeType(); 5887 this.contentType.setValue(value); 5888 } 5889 return this; 5890 } 5891 5892 /** 5893 * @return {@link #expression} (The FHIRPath 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 5894 */ 5895 public StringType getExpressionElement() { 5896 if (this.expression == null) 5897 if (Configuration.errorOnAutoCreate()) 5898 throw new Error("Attempt to auto-create SetupActionAssertComponent.expression"); 5899 else if (Configuration.doAutoCreate()) 5900 this.expression = new StringType(); // bb 5901 return this.expression; 5902 } 5903 5904 public boolean hasExpressionElement() { 5905 return this.expression != null && !this.expression.isEmpty(); 5906 } 5907 5908 public boolean hasExpression() { 5909 return this.expression != null && !this.expression.isEmpty(); 5910 } 5911 5912 /** 5913 * @param value {@link #expression} (The FHIRPath 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 5914 */ 5915 public SetupActionAssertComponent setExpressionElement(StringType value) { 5916 this.expression = value; 5917 return this; 5918 } 5919 5920 /** 5921 * @return The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload. 5922 */ 5923 public String getExpression() { 5924 return this.expression == null ? null : this.expression.getValue(); 5925 } 5926 5927 /** 5928 * @param value The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload. 5929 */ 5930 public SetupActionAssertComponent setExpression(String value) { 5931 if (Utilities.noString(value)) 5932 this.expression = null; 5933 else { 5934 if (this.expression == null) 5935 this.expression = new StringType(); 5936 this.expression.setValue(value); 5937 } 5938 return this; 5939 } 5940 5941 /** 5942 * @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 5943 */ 5944 public StringType getHeaderFieldElement() { 5945 if (this.headerField == null) 5946 if (Configuration.errorOnAutoCreate()) 5947 throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField"); 5948 else if (Configuration.doAutoCreate()) 5949 this.headerField = new StringType(); // bb 5950 return this.headerField; 5951 } 5952 5953 public boolean hasHeaderFieldElement() { 5954 return this.headerField != null && !this.headerField.isEmpty(); 5955 } 5956 5957 public boolean hasHeaderField() { 5958 return this.headerField != null && !this.headerField.isEmpty(); 5959 } 5960 5961 /** 5962 * @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 5963 */ 5964 public SetupActionAssertComponent setHeaderFieldElement(StringType value) { 5965 this.headerField = value; 5966 return this; 5967 } 5968 5969 /** 5970 * @return The HTTP header field name e.g. 'Location'. 5971 */ 5972 public String getHeaderField() { 5973 return this.headerField == null ? null : this.headerField.getValue(); 5974 } 5975 5976 /** 5977 * @param value The HTTP header field name e.g. 'Location'. 5978 */ 5979 public SetupActionAssertComponent setHeaderField(String value) { 5980 if (Utilities.noString(value)) 5981 this.headerField = null; 5982 else { 5983 if (this.headerField == null) 5984 this.headerField = new StringType(); 5985 this.headerField.setValue(value); 5986 } 5987 return this; 5988 } 5989 5990 /** 5991 * @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 5992 */ 5993 public StringType getMinimumIdElement() { 5994 if (this.minimumId == null) 5995 if (Configuration.errorOnAutoCreate()) 5996 throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId"); 5997 else if (Configuration.doAutoCreate()) 5998 this.minimumId = new StringType(); // bb 5999 return this.minimumId; 6000 } 6001 6002 public boolean hasMinimumIdElement() { 6003 return this.minimumId != null && !this.minimumId.isEmpty(); 6004 } 6005 6006 public boolean hasMinimumId() { 6007 return this.minimumId != null && !this.minimumId.isEmpty(); 6008 } 6009 6010 /** 6011 * @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 6012 */ 6013 public SetupActionAssertComponent setMinimumIdElement(StringType value) { 6014 this.minimumId = value; 6015 return this; 6016 } 6017 6018 /** 6019 * @return The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 6020 */ 6021 public String getMinimumId() { 6022 return this.minimumId == null ? null : this.minimumId.getValue(); 6023 } 6024 6025 /** 6026 * @param value The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 6027 */ 6028 public SetupActionAssertComponent setMinimumId(String value) { 6029 if (Utilities.noString(value)) 6030 this.minimumId = null; 6031 else { 6032 if (this.minimumId == null) 6033 this.minimumId = new StringType(); 6034 this.minimumId.setValue(value); 6035 } 6036 return this; 6037 } 6038 6039 /** 6040 * @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 6041 */ 6042 public BooleanType getNavigationLinksElement() { 6043 if (this.navigationLinks == null) 6044 if (Configuration.errorOnAutoCreate()) 6045 throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks"); 6046 else if (Configuration.doAutoCreate()) 6047 this.navigationLinks = new BooleanType(); // bb 6048 return this.navigationLinks; 6049 } 6050 6051 public boolean hasNavigationLinksElement() { 6052 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 6053 } 6054 6055 public boolean hasNavigationLinks() { 6056 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 6057 } 6058 6059 /** 6060 * @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 6061 */ 6062 public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 6063 this.navigationLinks = value; 6064 return this; 6065 } 6066 6067 /** 6068 * @return Whether or not the test execution performs validation on the bundle navigation links. 6069 */ 6070 public boolean getNavigationLinks() { 6071 return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue(); 6072 } 6073 6074 /** 6075 * @param value Whether or not the test execution performs validation on the bundle navigation links. 6076 */ 6077 public SetupActionAssertComponent setNavigationLinks(boolean value) { 6078 if (this.navigationLinks == null) 6079 this.navigationLinks = new BooleanType(); 6080 this.navigationLinks.setValue(value); 6081 return this; 6082 } 6083 6084 /** 6085 * @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 6086 */ 6087 public Enumeration<AssertionOperatorType> getOperatorElement() { 6088 if (this.operator == null) 6089 if (Configuration.errorOnAutoCreate()) 6090 throw new Error("Attempt to auto-create SetupActionAssertComponent.operator"); 6091 else if (Configuration.doAutoCreate()) 6092 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb 6093 return this.operator; 6094 } 6095 6096 public boolean hasOperatorElement() { 6097 return this.operator != null && !this.operator.isEmpty(); 6098 } 6099 6100 public boolean hasOperator() { 6101 return this.operator != null && !this.operator.isEmpty(); 6102 } 6103 6104 /** 6105 * @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 6106 */ 6107 public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 6108 this.operator = value; 6109 return this; 6110 } 6111 6112 /** 6113 * @return The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 6114 */ 6115 public AssertionOperatorType getOperator() { 6116 return this.operator == null ? null : this.operator.getValue(); 6117 } 6118 6119 /** 6120 * @param value The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 6121 */ 6122 public SetupActionAssertComponent setOperator(AssertionOperatorType value) { 6123 if (value == null) 6124 this.operator = null; 6125 else { 6126 if (this.operator == null) 6127 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); 6128 this.operator.setValue(value); 6129 } 6130 return this; 6131 } 6132 6133 /** 6134 * @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 6135 */ 6136 public StringType getPathElement() { 6137 if (this.path == null) 6138 if (Configuration.errorOnAutoCreate()) 6139 throw new Error("Attempt to auto-create SetupActionAssertComponent.path"); 6140 else if (Configuration.doAutoCreate()) 6141 this.path = new StringType(); // bb 6142 return this.path; 6143 } 6144 6145 public boolean hasPathElement() { 6146 return this.path != null && !this.path.isEmpty(); 6147 } 6148 6149 public boolean hasPath() { 6150 return this.path != null && !this.path.isEmpty(); 6151 } 6152 6153 /** 6154 * @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 6155 */ 6156 public SetupActionAssertComponent setPathElement(StringType value) { 6157 this.path = value; 6158 return this; 6159 } 6160 6161 /** 6162 * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 6163 */ 6164 public String getPath() { 6165 return this.path == null ? null : this.path.getValue(); 6166 } 6167 6168 /** 6169 * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 6170 */ 6171 public SetupActionAssertComponent setPath(String value) { 6172 if (Utilities.noString(value)) 6173 this.path = null; 6174 else { 6175 if (this.path == null) 6176 this.path = new StringType(); 6177 this.path.setValue(value); 6178 } 6179 return this; 6180 } 6181 6182 /** 6183 * @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 6184 */ 6185 public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() { 6186 if (this.requestMethod == null) 6187 if (Configuration.errorOnAutoCreate()) 6188 throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod"); 6189 else if (Configuration.doAutoCreate()) 6190 this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb 6191 return this.requestMethod; 6192 } 6193 6194 public boolean hasRequestMethodElement() { 6195 return this.requestMethod != null && !this.requestMethod.isEmpty(); 6196 } 6197 6198 public boolean hasRequestMethod() { 6199 return this.requestMethod != null && !this.requestMethod.isEmpty(); 6200 } 6201 6202 /** 6203 * @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 6204 */ 6205 public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 6206 this.requestMethod = value; 6207 return this; 6208 } 6209 6210 /** 6211 * @return The request method or HTTP operation code to compare against that used by the client system under test. 6212 */ 6213 public TestScriptRequestMethodCode getRequestMethod() { 6214 return this.requestMethod == null ? null : this.requestMethod.getValue(); 6215 } 6216 6217 /** 6218 * @param value The request method or HTTP operation code to compare against that used by the client system under test. 6219 */ 6220 public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) { 6221 if (value == null) 6222 this.requestMethod = null; 6223 else { 6224 if (this.requestMethod == null) 6225 this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); 6226 this.requestMethod.setValue(value); 6227 } 6228 return this; 6229 } 6230 6231 /** 6232 * @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 6233 */ 6234 public StringType getRequestURLElement() { 6235 if (this.requestURL == null) 6236 if (Configuration.errorOnAutoCreate()) 6237 throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL"); 6238 else if (Configuration.doAutoCreate()) 6239 this.requestURL = new StringType(); // bb 6240 return this.requestURL; 6241 } 6242 6243 public boolean hasRequestURLElement() { 6244 return this.requestURL != null && !this.requestURL.isEmpty(); 6245 } 6246 6247 public boolean hasRequestURL() { 6248 return this.requestURL != null && !this.requestURL.isEmpty(); 6249 } 6250 6251 /** 6252 * @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 6253 */ 6254 public SetupActionAssertComponent setRequestURLElement(StringType value) { 6255 this.requestURL = value; 6256 return this; 6257 } 6258 6259 /** 6260 * @return The value to use in a comparison against the request URL path string. 6261 */ 6262 public String getRequestURL() { 6263 return this.requestURL == null ? null : this.requestURL.getValue(); 6264 } 6265 6266 /** 6267 * @param value The value to use in a comparison against the request URL path string. 6268 */ 6269 public SetupActionAssertComponent setRequestURL(String value) { 6270 if (Utilities.noString(value)) 6271 this.requestURL = null; 6272 else { 6273 if (this.requestURL == null) 6274 this.requestURL = new StringType(); 6275 this.requestURL.setValue(value); 6276 } 6277 return this; 6278 } 6279 6280 /** 6281 * @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 6282 */ 6283 public CodeType getResourceElement() { 6284 if (this.resource == null) 6285 if (Configuration.errorOnAutoCreate()) 6286 throw new Error("Attempt to auto-create SetupActionAssertComponent.resource"); 6287 else if (Configuration.doAutoCreate()) 6288 this.resource = new CodeType(); // bb 6289 return this.resource; 6290 } 6291 6292 public boolean hasResourceElement() { 6293 return this.resource != null && !this.resource.isEmpty(); 6294 } 6295 6296 public boolean hasResource() { 6297 return this.resource != null && !this.resource.isEmpty(); 6298 } 6299 6300 /** 6301 * @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 6302 */ 6303 public SetupActionAssertComponent setResourceElement(CodeType value) { 6304 this.resource = value; 6305 return this; 6306 } 6307 6308 /** 6309 * @return The type of the resource. See http://build.fhir.org/resourcelist.html. 6310 */ 6311 public String getResource() { 6312 return this.resource == null ? null : this.resource.getValue(); 6313 } 6314 6315 /** 6316 * @param value The type of the resource. See http://build.fhir.org/resourcelist.html. 6317 */ 6318 public SetupActionAssertComponent setResource(String value) { 6319 if (Utilities.noString(value)) 6320 this.resource = null; 6321 else { 6322 if (this.resource == null) 6323 this.resource = new CodeType(); 6324 this.resource.setValue(value); 6325 } 6326 return this; 6327 } 6328 6329 /** 6330 * @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 6331 */ 6332 public Enumeration<AssertionResponseTypes> getResponseElement() { 6333 if (this.response == null) 6334 if (Configuration.errorOnAutoCreate()) 6335 throw new Error("Attempt to auto-create SetupActionAssertComponent.response"); 6336 else if (Configuration.doAutoCreate()) 6337 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb 6338 return this.response; 6339 } 6340 6341 public boolean hasResponseElement() { 6342 return this.response != null && !this.response.isEmpty(); 6343 } 6344 6345 public boolean hasResponse() { 6346 return this.response != null && !this.response.isEmpty(); 6347 } 6348 6349 /** 6350 * @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 6351 */ 6352 public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 6353 this.response = value; 6354 return this; 6355 } 6356 6357 /** 6358 * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 6359 */ 6360 public AssertionResponseTypes getResponse() { 6361 return this.response == null ? null : this.response.getValue(); 6362 } 6363 6364 /** 6365 * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 6366 */ 6367 public SetupActionAssertComponent setResponse(AssertionResponseTypes value) { 6368 if (value == null) 6369 this.response = null; 6370 else { 6371 if (this.response == null) 6372 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); 6373 this.response.setValue(value); 6374 } 6375 return this; 6376 } 6377 6378 /** 6379 * @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 6380 */ 6381 public StringType getResponseCodeElement() { 6382 if (this.responseCode == null) 6383 if (Configuration.errorOnAutoCreate()) 6384 throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode"); 6385 else if (Configuration.doAutoCreate()) 6386 this.responseCode = new StringType(); // bb 6387 return this.responseCode; 6388 } 6389 6390 public boolean hasResponseCodeElement() { 6391 return this.responseCode != null && !this.responseCode.isEmpty(); 6392 } 6393 6394 public boolean hasResponseCode() { 6395 return this.responseCode != null && !this.responseCode.isEmpty(); 6396 } 6397 6398 /** 6399 * @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 6400 */ 6401 public SetupActionAssertComponent setResponseCodeElement(StringType value) { 6402 this.responseCode = value; 6403 return this; 6404 } 6405 6406 /** 6407 * @return The value of the HTTP response code to be tested. 6408 */ 6409 public String getResponseCode() { 6410 return this.responseCode == null ? null : this.responseCode.getValue(); 6411 } 6412 6413 /** 6414 * @param value The value of the HTTP response code to be tested. 6415 */ 6416 public SetupActionAssertComponent setResponseCode(String value) { 6417 if (Utilities.noString(value)) 6418 this.responseCode = null; 6419 else { 6420 if (this.responseCode == null) 6421 this.responseCode = new StringType(); 6422 this.responseCode.setValue(value); 6423 } 6424 return this; 6425 } 6426 6427 /** 6428 * @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 6429 */ 6430 public IdType getSourceIdElement() { 6431 if (this.sourceId == null) 6432 if (Configuration.errorOnAutoCreate()) 6433 throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId"); 6434 else if (Configuration.doAutoCreate()) 6435 this.sourceId = new IdType(); // bb 6436 return this.sourceId; 6437 } 6438 6439 public boolean hasSourceIdElement() { 6440 return this.sourceId != null && !this.sourceId.isEmpty(); 6441 } 6442 6443 public boolean hasSourceId() { 6444 return this.sourceId != null && !this.sourceId.isEmpty(); 6445 } 6446 6447 /** 6448 * @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 6449 */ 6450 public SetupActionAssertComponent setSourceIdElement(IdType value) { 6451 this.sourceId = value; 6452 return this; 6453 } 6454 6455 /** 6456 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against. 6457 */ 6458 public String getSourceId() { 6459 return this.sourceId == null ? null : this.sourceId.getValue(); 6460 } 6461 6462 /** 6463 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against. 6464 */ 6465 public SetupActionAssertComponent setSourceId(String value) { 6466 if (Utilities.noString(value)) 6467 this.sourceId = null; 6468 else { 6469 if (this.sourceId == null) 6470 this.sourceId = new IdType(); 6471 this.sourceId.setValue(value); 6472 } 6473 return this; 6474 } 6475 6476 /** 6477 * @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 6478 */ 6479 public IdType getValidateProfileIdElement() { 6480 if (this.validateProfileId == null) 6481 if (Configuration.errorOnAutoCreate()) 6482 throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId"); 6483 else if (Configuration.doAutoCreate()) 6484 this.validateProfileId = new IdType(); // bb 6485 return this.validateProfileId; 6486 } 6487 6488 public boolean hasValidateProfileIdElement() { 6489 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 6490 } 6491 6492 public boolean hasValidateProfileId() { 6493 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 6494 } 6495 6496 /** 6497 * @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 6498 */ 6499 public SetupActionAssertComponent setValidateProfileIdElement(IdType value) { 6500 this.validateProfileId = value; 6501 return this; 6502 } 6503 6504 /** 6505 * @return The ID of the Profile to validate against. 6506 */ 6507 public String getValidateProfileId() { 6508 return this.validateProfileId == null ? null : this.validateProfileId.getValue(); 6509 } 6510 6511 /** 6512 * @param value The ID of the Profile to validate against. 6513 */ 6514 public SetupActionAssertComponent setValidateProfileId(String value) { 6515 if (Utilities.noString(value)) 6516 this.validateProfileId = null; 6517 else { 6518 if (this.validateProfileId == null) 6519 this.validateProfileId = new IdType(); 6520 this.validateProfileId.setValue(value); 6521 } 6522 return this; 6523 } 6524 6525 /** 6526 * @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 6527 */ 6528 public StringType getValueElement() { 6529 if (this.value == null) 6530 if (Configuration.errorOnAutoCreate()) 6531 throw new Error("Attempt to auto-create SetupActionAssertComponent.value"); 6532 else if (Configuration.doAutoCreate()) 6533 this.value = new StringType(); // bb 6534 return this.value; 6535 } 6536 6537 public boolean hasValueElement() { 6538 return this.value != null && !this.value.isEmpty(); 6539 } 6540 6541 public boolean hasValue() { 6542 return this.value != null && !this.value.isEmpty(); 6543 } 6544 6545 /** 6546 * @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 6547 */ 6548 public SetupActionAssertComponent setValueElement(StringType value) { 6549 this.value = value; 6550 return this; 6551 } 6552 6553 /** 6554 * @return The value to compare to. 6555 */ 6556 public String getValue() { 6557 return this.value == null ? null : this.value.getValue(); 6558 } 6559 6560 /** 6561 * @param value The value to compare to. 6562 */ 6563 public SetupActionAssertComponent setValue(String value) { 6564 if (Utilities.noString(value)) 6565 this.value = null; 6566 else { 6567 if (this.value == null) 6568 this.value = new StringType(); 6569 this.value.setValue(value); 6570 } 6571 return this; 6572 } 6573 6574 /** 6575 * @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 6576 */ 6577 public BooleanType getWarningOnlyElement() { 6578 if (this.warningOnly == null) 6579 if (Configuration.errorOnAutoCreate()) 6580 throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly"); 6581 else if (Configuration.doAutoCreate()) 6582 this.warningOnly = new BooleanType(); // bb 6583 return this.warningOnly; 6584 } 6585 6586 public boolean hasWarningOnlyElement() { 6587 return this.warningOnly != null && !this.warningOnly.isEmpty(); 6588 } 6589 6590 public boolean hasWarningOnly() { 6591 return this.warningOnly != null && !this.warningOnly.isEmpty(); 6592 } 6593 6594 /** 6595 * @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 6596 */ 6597 public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 6598 this.warningOnly = value; 6599 return this; 6600 } 6601 6602 /** 6603 * @return Whether or not the test execution will produce a warning only on error for this assert. 6604 */ 6605 public boolean getWarningOnly() { 6606 return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue(); 6607 } 6608 6609 /** 6610 * @param value Whether or not the test execution will produce a warning only on error for this assert. 6611 */ 6612 public SetupActionAssertComponent setWarningOnly(boolean value) { 6613 if (this.warningOnly == null) 6614 this.warningOnly = new BooleanType(); 6615 this.warningOnly.setValue(value); 6616 return this; 6617 } 6618 6619 protected void listChildren(List<Property> children) { 6620 super.listChildren(children); 6621 children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label)); 6622 children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description)); 6623 children.add(new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction)); 6624 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)); 6625 children.add(new Property("compareToSourceExpression", "string", "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourceExpression)); 6626 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)); 6627 children.add(new Property("contentType", "code", "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1, contentType)); 6628 children.add(new Property("expression", "string", "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression)); 6629 children.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField)); 6630 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)); 6631 children.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks)); 6632 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)); 6633 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)); 6634 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)); 6635 children.add(new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL)); 6636 children.add(new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource)); 6637 children.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response)); 6638 children.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode)); 6639 children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, 1, sourceId)); 6640 children.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId)); 6641 children.add(new Property("value", "string", "The value to compare to.", 0, 1, value)); 6642 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)); 6643 } 6644 6645 @Override 6646 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6647 switch (_hash) { 6648 case 102727412: /*label*/ return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label); 6649 case -1724546052: /*description*/ return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description); 6650 case -962590849: /*direction*/ return new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction); 6651 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); 6652 case -1415702669: /*compareToSourceExpression*/ return new Property("compareToSourceExpression", "string", "The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourceExpression); 6653 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); 6654 case -389131437: /*contentType*/ return new Property("contentType", "code", "The mime-type contents to compare against the request or response message 'Content-Type' header.", 0, 1, contentType); 6655 case -1795452264: /*expression*/ return new Property("expression", "string", "The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression); 6656 case 1160732269: /*headerField*/ return new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField); 6657 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); 6658 case 1001488901: /*navigationLinks*/ return new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks); 6659 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); 6660 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); 6661 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); 6662 case 37099616: /*requestURL*/ return new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL); 6663 case -341064690: /*resource*/ return new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource); 6664 case -340323263: /*response*/ return new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response); 6665 case 1438723534: /*responseCode*/ return new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode); 6666 case 1746327190: /*sourceId*/ return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, 1, sourceId); 6667 case 1555541038: /*validateProfileId*/ return new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId); 6668 case 111972721: /*value*/ return new Property("value", "string", "The value to compare to.", 0, 1, value); 6669 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); 6670 default: return super.getNamedProperty(_hash, _name, _checkValid); 6671 } 6672 6673 } 6674 6675 @Override 6676 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6677 switch (hash) { 6678 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 6679 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 6680 case -962590849: /*direction*/ return this.direction == null ? new Base[0] : new Base[] {this.direction}; // Enumeration<AssertionDirectionType> 6681 case 2081856758: /*compareToSourceId*/ return this.compareToSourceId == null ? new Base[0] : new Base[] {this.compareToSourceId}; // StringType 6682 case -1415702669: /*compareToSourceExpression*/ return this.compareToSourceExpression == null ? new Base[0] : new Base[] {this.compareToSourceExpression}; // StringType 6683 case -790206144: /*compareToSourcePath*/ return this.compareToSourcePath == null ? new Base[0] : new Base[] {this.compareToSourcePath}; // StringType 6684 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType 6685 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 6686 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 6687 case 818925001: /*minimumId*/ return this.minimumId == null ? new Base[0] : new Base[] {this.minimumId}; // StringType 6688 case 1001488901: /*navigationLinks*/ return this.navigationLinks == null ? new Base[0] : new Base[] {this.navigationLinks}; // BooleanType 6689 case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Enumeration<AssertionOperatorType> 6690 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 6691 case 1217874000: /*requestMethod*/ return this.requestMethod == null ? new Base[0] : new Base[] {this.requestMethod}; // Enumeration<TestScriptRequestMethodCode> 6692 case 37099616: /*requestURL*/ return this.requestURL == null ? new Base[0] : new Base[] {this.requestURL}; // StringType 6693 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 6694 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Enumeration<AssertionResponseTypes> 6695 case 1438723534: /*responseCode*/ return this.responseCode == null ? new Base[0] : new Base[] {this.responseCode}; // StringType 6696 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 6697 case 1555541038: /*validateProfileId*/ return this.validateProfileId == null ? new Base[0] : new Base[] {this.validateProfileId}; // IdType 6698 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 6699 case -481159832: /*warningOnly*/ return this.warningOnly == null ? new Base[0] : new Base[] {this.warningOnly}; // BooleanType 6700 default: return super.getProperty(hash, name, checkValid); 6701 } 6702 6703 } 6704 6705 @Override 6706 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6707 switch (hash) { 6708 case 102727412: // label 6709 this.label = castToString(value); // StringType 6710 return value; 6711 case -1724546052: // description 6712 this.description = castToString(value); // StringType 6713 return value; 6714 case -962590849: // direction 6715 value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value)); 6716 this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType> 6717 return value; 6718 case 2081856758: // compareToSourceId 6719 this.compareToSourceId = castToString(value); // StringType 6720 return value; 6721 case -1415702669: // compareToSourceExpression 6722 this.compareToSourceExpression = castToString(value); // StringType 6723 return value; 6724 case -790206144: // compareToSourcePath 6725 this.compareToSourcePath = castToString(value); // StringType 6726 return value; 6727 case -389131437: // contentType 6728 this.contentType = castToCode(value); // CodeType 6729 return value; 6730 case -1795452264: // expression 6731 this.expression = castToString(value); // StringType 6732 return value; 6733 case 1160732269: // headerField 6734 this.headerField = castToString(value); // StringType 6735 return value; 6736 case 818925001: // minimumId 6737 this.minimumId = castToString(value); // StringType 6738 return value; 6739 case 1001488901: // navigationLinks 6740 this.navigationLinks = castToBoolean(value); // BooleanType 6741 return value; 6742 case -500553564: // operator 6743 value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value)); 6744 this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType> 6745 return value; 6746 case 3433509: // path 6747 this.path = castToString(value); // StringType 6748 return value; 6749 case 1217874000: // requestMethod 6750 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 6751 this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 6752 return value; 6753 case 37099616: // requestURL 6754 this.requestURL = castToString(value); // StringType 6755 return value; 6756 case -341064690: // resource 6757 this.resource = castToCode(value); // CodeType 6758 return value; 6759 case -340323263: // response 6760 value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value)); 6761 this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes> 6762 return value; 6763 case 1438723534: // responseCode 6764 this.responseCode = castToString(value); // StringType 6765 return value; 6766 case 1746327190: // sourceId 6767 this.sourceId = castToId(value); // IdType 6768 return value; 6769 case 1555541038: // validateProfileId 6770 this.validateProfileId = castToId(value); // IdType 6771 return value; 6772 case 111972721: // value 6773 this.value = castToString(value); // StringType 6774 return value; 6775 case -481159832: // warningOnly 6776 this.warningOnly = castToBoolean(value); // BooleanType 6777 return value; 6778 default: return super.setProperty(hash, name, value); 6779 } 6780 6781 } 6782 6783 @Override 6784 public Base setProperty(String name, Base value) throws FHIRException { 6785 if (name.equals("label")) { 6786 this.label = castToString(value); // StringType 6787 } else if (name.equals("description")) { 6788 this.description = castToString(value); // StringType 6789 } else if (name.equals("direction")) { 6790 value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value)); 6791 this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType> 6792 } else if (name.equals("compareToSourceId")) { 6793 this.compareToSourceId = castToString(value); // StringType 6794 } else if (name.equals("compareToSourceExpression")) { 6795 this.compareToSourceExpression = castToString(value); // StringType 6796 } else if (name.equals("compareToSourcePath")) { 6797 this.compareToSourcePath = castToString(value); // StringType 6798 } else if (name.equals("contentType")) { 6799 this.contentType = castToCode(value); // CodeType 6800 } else if (name.equals("expression")) { 6801 this.expression = castToString(value); // StringType 6802 } else if (name.equals("headerField")) { 6803 this.headerField = castToString(value); // StringType 6804 } else if (name.equals("minimumId")) { 6805 this.minimumId = castToString(value); // StringType 6806 } else if (name.equals("navigationLinks")) { 6807 this.navigationLinks = castToBoolean(value); // BooleanType 6808 } else if (name.equals("operator")) { 6809 value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value)); 6810 this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType> 6811 } else if (name.equals("path")) { 6812 this.path = castToString(value); // StringType 6813 } else if (name.equals("requestMethod")) { 6814 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 6815 this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 6816 } else if (name.equals("requestURL")) { 6817 this.requestURL = castToString(value); // StringType 6818 } else if (name.equals("resource")) { 6819 this.resource = castToCode(value); // CodeType 6820 } else if (name.equals("response")) { 6821 value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value)); 6822 this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes> 6823 } else if (name.equals("responseCode")) { 6824 this.responseCode = castToString(value); // StringType 6825 } else if (name.equals("sourceId")) { 6826 this.sourceId = castToId(value); // IdType 6827 } else if (name.equals("validateProfileId")) { 6828 this.validateProfileId = castToId(value); // IdType 6829 } else if (name.equals("value")) { 6830 this.value = castToString(value); // StringType 6831 } else if (name.equals("warningOnly")) { 6832 this.warningOnly = castToBoolean(value); // BooleanType 6833 } else 6834 return super.setProperty(name, value); 6835 return value; 6836 } 6837 6838 @Override 6839 public Base makeProperty(int hash, String name) throws FHIRException { 6840 switch (hash) { 6841 case 102727412: return getLabelElement(); 6842 case -1724546052: return getDescriptionElement(); 6843 case -962590849: return getDirectionElement(); 6844 case 2081856758: return getCompareToSourceIdElement(); 6845 case -1415702669: return getCompareToSourceExpressionElement(); 6846 case -790206144: return getCompareToSourcePathElement(); 6847 case -389131437: return getContentTypeElement(); 6848 case -1795452264: return getExpressionElement(); 6849 case 1160732269: return getHeaderFieldElement(); 6850 case 818925001: return getMinimumIdElement(); 6851 case 1001488901: return getNavigationLinksElement(); 6852 case -500553564: return getOperatorElement(); 6853 case 3433509: return getPathElement(); 6854 case 1217874000: return getRequestMethodElement(); 6855 case 37099616: return getRequestURLElement(); 6856 case -341064690: return getResourceElement(); 6857 case -340323263: return getResponseElement(); 6858 case 1438723534: return getResponseCodeElement(); 6859 case 1746327190: return getSourceIdElement(); 6860 case 1555541038: return getValidateProfileIdElement(); 6861 case 111972721: return getValueElement(); 6862 case -481159832: return getWarningOnlyElement(); 6863 default: return super.makeProperty(hash, name); 6864 } 6865 6866 } 6867 6868 @Override 6869 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6870 switch (hash) { 6871 case 102727412: /*label*/ return new String[] {"string"}; 6872 case -1724546052: /*description*/ return new String[] {"string"}; 6873 case -962590849: /*direction*/ return new String[] {"code"}; 6874 case 2081856758: /*compareToSourceId*/ return new String[] {"string"}; 6875 case -1415702669: /*compareToSourceExpression*/ return new String[] {"string"}; 6876 case -790206144: /*compareToSourcePath*/ return new String[] {"string"}; 6877 case -389131437: /*contentType*/ return new String[] {"code"}; 6878 case -1795452264: /*expression*/ return new String[] {"string"}; 6879 case 1160732269: /*headerField*/ return new String[] {"string"}; 6880 case 818925001: /*minimumId*/ return new String[] {"string"}; 6881 case 1001488901: /*navigationLinks*/ return new String[] {"boolean"}; 6882 case -500553564: /*operator*/ return new String[] {"code"}; 6883 case 3433509: /*path*/ return new String[] {"string"}; 6884 case 1217874000: /*requestMethod*/ return new String[] {"code"}; 6885 case 37099616: /*requestURL*/ return new String[] {"string"}; 6886 case -341064690: /*resource*/ return new String[] {"code"}; 6887 case -340323263: /*response*/ return new String[] {"code"}; 6888 case 1438723534: /*responseCode*/ return new String[] {"string"}; 6889 case 1746327190: /*sourceId*/ return new String[] {"id"}; 6890 case 1555541038: /*validateProfileId*/ return new String[] {"id"}; 6891 case 111972721: /*value*/ return new String[] {"string"}; 6892 case -481159832: /*warningOnly*/ return new String[] {"boolean"}; 6893 default: return super.getTypesForProperty(hash, name); 6894 } 6895 6896 } 6897 6898 @Override 6899 public Base addChild(String name) throws FHIRException { 6900 if (name.equals("label")) { 6901 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 6902 } 6903 else if (name.equals("description")) { 6904 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 6905 } 6906 else if (name.equals("direction")) { 6907 throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction"); 6908 } 6909 else if (name.equals("compareToSourceId")) { 6910 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId"); 6911 } 6912 else if (name.equals("compareToSourceExpression")) { 6913 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceExpression"); 6914 } 6915 else if (name.equals("compareToSourcePath")) { 6916 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath"); 6917 } 6918 else if (name.equals("contentType")) { 6919 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 6920 } 6921 else if (name.equals("expression")) { 6922 throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression"); 6923 } 6924 else if (name.equals("headerField")) { 6925 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 6926 } 6927 else if (name.equals("minimumId")) { 6928 throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId"); 6929 } 6930 else if (name.equals("navigationLinks")) { 6931 throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks"); 6932 } 6933 else if (name.equals("operator")) { 6934 throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator"); 6935 } 6936 else if (name.equals("path")) { 6937 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 6938 } 6939 else if (name.equals("requestMethod")) { 6940 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestMethod"); 6941 } 6942 else if (name.equals("requestURL")) { 6943 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestURL"); 6944 } 6945 else if (name.equals("resource")) { 6946 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 6947 } 6948 else if (name.equals("response")) { 6949 throw new FHIRException("Cannot call addChild on a primitive type TestScript.response"); 6950 } 6951 else if (name.equals("responseCode")) { 6952 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode"); 6953 } 6954 else if (name.equals("sourceId")) { 6955 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 6956 } 6957 else if (name.equals("validateProfileId")) { 6958 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId"); 6959 } 6960 else if (name.equals("value")) { 6961 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 6962 } 6963 else if (name.equals("warningOnly")) { 6964 throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly"); 6965 } 6966 else 6967 return super.addChild(name); 6968 } 6969 6970 public SetupActionAssertComponent copy() { 6971 SetupActionAssertComponent dst = new SetupActionAssertComponent(); 6972 copyValues(dst); 6973 return dst; 6974 } 6975 6976 public void copyValues(SetupActionAssertComponent dst) { 6977 super.copyValues(dst); 6978 dst.label = label == null ? null : label.copy(); 6979 dst.description = description == null ? null : description.copy(); 6980 dst.direction = direction == null ? null : direction.copy(); 6981 dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy(); 6982 dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy(); 6983 dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy(); 6984 dst.contentType = contentType == null ? null : contentType.copy(); 6985 dst.expression = expression == null ? null : expression.copy(); 6986 dst.headerField = headerField == null ? null : headerField.copy(); 6987 dst.minimumId = minimumId == null ? null : minimumId.copy(); 6988 dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy(); 6989 dst.operator = operator == null ? null : operator.copy(); 6990 dst.path = path == null ? null : path.copy(); 6991 dst.requestMethod = requestMethod == null ? null : requestMethod.copy(); 6992 dst.requestURL = requestURL == null ? null : requestURL.copy(); 6993 dst.resource = resource == null ? null : resource.copy(); 6994 dst.response = response == null ? null : response.copy(); 6995 dst.responseCode = responseCode == null ? null : responseCode.copy(); 6996 dst.sourceId = sourceId == null ? null : sourceId.copy(); 6997 dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy(); 6998 dst.value = value == null ? null : value.copy(); 6999 dst.warningOnly = warningOnly == null ? null : warningOnly.copy(); 7000 } 7001 7002 @Override 7003 public boolean equalsDeep(Base other_) { 7004 if (!super.equalsDeep(other_)) 7005 return false; 7006 if (!(other_ instanceof SetupActionAssertComponent)) 7007 return false; 7008 SetupActionAssertComponent o = (SetupActionAssertComponent) other_; 7009 return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true) 7010 && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true) 7011 && compareDeep(compareToSourcePath, o.compareToSourcePath, true) && compareDeep(contentType, o.contentType, true) 7012 && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true) 7013 && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true) 7014 && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true) 7015 && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true) && compareDeep(response, o.response, true) 7016 && compareDeep(responseCode, o.responseCode, true) && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true) 7017 && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true); 7018 } 7019 7020 @Override 7021 public boolean equalsShallow(Base other_) { 7022 if (!super.equalsShallow(other_)) 7023 return false; 7024 if (!(other_ instanceof SetupActionAssertComponent)) 7025 return false; 7026 SetupActionAssertComponent o = (SetupActionAssertComponent) other_; 7027 return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true) 7028 && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourceExpression, o.compareToSourceExpression, true) 7029 && compareValues(compareToSourcePath, o.compareToSourcePath, true) && compareValues(contentType, o.contentType, true) 7030 && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true) 7031 && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true) 7032 && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true) 7033 && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true) && compareValues(response, o.response, true) 7034 && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true) 7035 && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true); 7036 } 7037 7038 public boolean isEmpty() { 7039 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction 7040 , compareToSourceId, compareToSourceExpression, compareToSourcePath, contentType, expression 7041 , headerField, minimumId, navigationLinks, operator, path, requestMethod, requestURL 7042 , resource, response, responseCode, sourceId, validateProfileId, value, warningOnly 7043 ); 7044 } 7045 7046 public String fhirType() { 7047 return "TestScript.setup.action.assert"; 7048 7049 } 7050 7051 } 7052 7053 @Block() 7054 public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement { 7055 /** 7056 * The name of this test used for tracking/logging purposes by test engines. 7057 */ 7058 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 7059 @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." ) 7060 protected StringType name; 7061 7062 /** 7063 * A short description of the test used by test engines for tracking and reporting purposes. 7064 */ 7065 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 7066 @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." ) 7067 protected StringType description; 7068 7069 /** 7070 * Action would contain either an operation or an assertion. 7071 */ 7072 @Child(name = "action", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7073 @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 7074 protected List<TestActionComponent> action; 7075 7076 private static final long serialVersionUID = -865006110L; 7077 7078 /** 7079 * Constructor 7080 */ 7081 public TestScriptTestComponent() { 7082 super(); 7083 } 7084 7085 /** 7086 * @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 7087 */ 7088 public StringType getNameElement() { 7089 if (this.name == null) 7090 if (Configuration.errorOnAutoCreate()) 7091 throw new Error("Attempt to auto-create TestScriptTestComponent.name"); 7092 else if (Configuration.doAutoCreate()) 7093 this.name = new StringType(); // bb 7094 return this.name; 7095 } 7096 7097 public boolean hasNameElement() { 7098 return this.name != null && !this.name.isEmpty(); 7099 } 7100 7101 public boolean hasName() { 7102 return this.name != null && !this.name.isEmpty(); 7103 } 7104 7105 /** 7106 * @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 7107 */ 7108 public TestScriptTestComponent setNameElement(StringType value) { 7109 this.name = value; 7110 return this; 7111 } 7112 7113 /** 7114 * @return The name of this test used for tracking/logging purposes by test engines. 7115 */ 7116 public String getName() { 7117 return this.name == null ? null : this.name.getValue(); 7118 } 7119 7120 /** 7121 * @param value The name of this test used for tracking/logging purposes by test engines. 7122 */ 7123 public TestScriptTestComponent setName(String value) { 7124 if (Utilities.noString(value)) 7125 this.name = null; 7126 else { 7127 if (this.name == null) 7128 this.name = new StringType(); 7129 this.name.setValue(value); 7130 } 7131 return this; 7132 } 7133 7134 /** 7135 * @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 7136 */ 7137 public StringType getDescriptionElement() { 7138 if (this.description == null) 7139 if (Configuration.errorOnAutoCreate()) 7140 throw new Error("Attempt to auto-create TestScriptTestComponent.description"); 7141 else if (Configuration.doAutoCreate()) 7142 this.description = new StringType(); // bb 7143 return this.description; 7144 } 7145 7146 public boolean hasDescriptionElement() { 7147 return this.description != null && !this.description.isEmpty(); 7148 } 7149 7150 public boolean hasDescription() { 7151 return this.description != null && !this.description.isEmpty(); 7152 } 7153 7154 /** 7155 * @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 7156 */ 7157 public TestScriptTestComponent setDescriptionElement(StringType value) { 7158 this.description = value; 7159 return this; 7160 } 7161 7162 /** 7163 * @return A short description of the test used by test engines for tracking and reporting purposes. 7164 */ 7165 public String getDescription() { 7166 return this.description == null ? null : this.description.getValue(); 7167 } 7168 7169 /** 7170 * @param value A short description of the test used by test engines for tracking and reporting purposes. 7171 */ 7172 public TestScriptTestComponent setDescription(String value) { 7173 if (Utilities.noString(value)) 7174 this.description = null; 7175 else { 7176 if (this.description == null) 7177 this.description = new StringType(); 7178 this.description.setValue(value); 7179 } 7180 return this; 7181 } 7182 7183 /** 7184 * @return {@link #action} (Action would contain either an operation or an assertion.) 7185 */ 7186 public List<TestActionComponent> getAction() { 7187 if (this.action == null) 7188 this.action = new ArrayList<TestActionComponent>(); 7189 return this.action; 7190 } 7191 7192 /** 7193 * @return Returns a reference to <code>this</code> for easy method chaining 7194 */ 7195 public TestScriptTestComponent setAction(List<TestActionComponent> theAction) { 7196 this.action = theAction; 7197 return this; 7198 } 7199 7200 public boolean hasAction() { 7201 if (this.action == null) 7202 return false; 7203 for (TestActionComponent item : this.action) 7204 if (!item.isEmpty()) 7205 return true; 7206 return false; 7207 } 7208 7209 public TestActionComponent addAction() { //3 7210 TestActionComponent t = new TestActionComponent(); 7211 if (this.action == null) 7212 this.action = new ArrayList<TestActionComponent>(); 7213 this.action.add(t); 7214 return t; 7215 } 7216 7217 public TestScriptTestComponent addAction(TestActionComponent t) { //3 7218 if (t == null) 7219 return this; 7220 if (this.action == null) 7221 this.action = new ArrayList<TestActionComponent>(); 7222 this.action.add(t); 7223 return this; 7224 } 7225 7226 /** 7227 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 7228 */ 7229 public TestActionComponent getActionFirstRep() { 7230 if (getAction().isEmpty()) { 7231 addAction(); 7232 } 7233 return getAction().get(0); 7234 } 7235 7236 protected void listChildren(List<Property> children) { 7237 super.listChildren(children); 7238 children.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name)); 7239 children.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1, description)); 7240 children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 7241 } 7242 7243 @Override 7244 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7245 switch (_hash) { 7246 case 3373707: /*name*/ return new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name); 7247 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); 7248 case -1422950858: /*action*/ return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action); 7249 default: return super.getNamedProperty(_hash, _name, _checkValid); 7250 } 7251 7252 } 7253 7254 @Override 7255 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7256 switch (hash) { 7257 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 7258 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 7259 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent 7260 default: return super.getProperty(hash, name, checkValid); 7261 } 7262 7263 } 7264 7265 @Override 7266 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7267 switch (hash) { 7268 case 3373707: // name 7269 this.name = castToString(value); // StringType 7270 return value; 7271 case -1724546052: // description 7272 this.description = castToString(value); // StringType 7273 return value; 7274 case -1422950858: // action 7275 this.getAction().add((TestActionComponent) value); // TestActionComponent 7276 return value; 7277 default: return super.setProperty(hash, name, value); 7278 } 7279 7280 } 7281 7282 @Override 7283 public Base setProperty(String name, Base value) throws FHIRException { 7284 if (name.equals("name")) { 7285 this.name = castToString(value); // StringType 7286 } else if (name.equals("description")) { 7287 this.description = castToString(value); // StringType 7288 } else if (name.equals("action")) { 7289 this.getAction().add((TestActionComponent) value); 7290 } else 7291 return super.setProperty(name, value); 7292 return value; 7293 } 7294 7295 @Override 7296 public Base makeProperty(int hash, String name) throws FHIRException { 7297 switch (hash) { 7298 case 3373707: return getNameElement(); 7299 case -1724546052: return getDescriptionElement(); 7300 case -1422950858: return addAction(); 7301 default: return super.makeProperty(hash, name); 7302 } 7303 7304 } 7305 7306 @Override 7307 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7308 switch (hash) { 7309 case 3373707: /*name*/ return new String[] {"string"}; 7310 case -1724546052: /*description*/ return new String[] {"string"}; 7311 case -1422950858: /*action*/ return new String[] {}; 7312 default: return super.getTypesForProperty(hash, name); 7313 } 7314 7315 } 7316 7317 @Override 7318 public Base addChild(String name) throws FHIRException { 7319 if (name.equals("name")) { 7320 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 7321 } 7322 else if (name.equals("description")) { 7323 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 7324 } 7325 else if (name.equals("action")) { 7326 return addAction(); 7327 } 7328 else 7329 return super.addChild(name); 7330 } 7331 7332 public TestScriptTestComponent copy() { 7333 TestScriptTestComponent dst = new TestScriptTestComponent(); 7334 copyValues(dst); 7335 return dst; 7336 } 7337 7338 public void copyValues(TestScriptTestComponent dst) { 7339 super.copyValues(dst); 7340 dst.name = name == null ? null : name.copy(); 7341 dst.description = description == null ? null : description.copy(); 7342 if (action != null) { 7343 dst.action = new ArrayList<TestActionComponent>(); 7344 for (TestActionComponent i : action) 7345 dst.action.add(i.copy()); 7346 }; 7347 } 7348 7349 @Override 7350 public boolean equalsDeep(Base other_) { 7351 if (!super.equalsDeep(other_)) 7352 return false; 7353 if (!(other_ instanceof TestScriptTestComponent)) 7354 return false; 7355 TestScriptTestComponent o = (TestScriptTestComponent) other_; 7356 return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(action, o.action, true) 7357 ; 7358 } 7359 7360 @Override 7361 public boolean equalsShallow(Base other_) { 7362 if (!super.equalsShallow(other_)) 7363 return false; 7364 if (!(other_ instanceof TestScriptTestComponent)) 7365 return false; 7366 TestScriptTestComponent o = (TestScriptTestComponent) other_; 7367 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 7368 } 7369 7370 public boolean isEmpty() { 7371 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action 7372 ); 7373 } 7374 7375 public String fhirType() { 7376 return "TestScript.test"; 7377 7378 } 7379 7380 } 7381 7382 @Block() 7383 public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement { 7384 /** 7385 * An operation would involve a REST request to a server. 7386 */ 7387 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 7388 @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 7389 protected SetupActionOperationComponent operation; 7390 7391 /** 7392 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 7393 */ 7394 @Child(name = "assert", type = {SetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false) 7395 @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 7396 protected SetupActionAssertComponent assert_; 7397 7398 private static final long serialVersionUID = -252088305L; 7399 7400 /** 7401 * Constructor 7402 */ 7403 public TestActionComponent() { 7404 super(); 7405 } 7406 7407 /** 7408 * @return {@link #operation} (An operation would involve a REST request to a server.) 7409 */ 7410 public SetupActionOperationComponent getOperation() { 7411 if (this.operation == null) 7412 if (Configuration.errorOnAutoCreate()) 7413 throw new Error("Attempt to auto-create TestActionComponent.operation"); 7414 else if (Configuration.doAutoCreate()) 7415 this.operation = new SetupActionOperationComponent(); // cc 7416 return this.operation; 7417 } 7418 7419 public boolean hasOperation() { 7420 return this.operation != null && !this.operation.isEmpty(); 7421 } 7422 7423 /** 7424 * @param value {@link #operation} (An operation would involve a REST request to a server.) 7425 */ 7426 public TestActionComponent setOperation(SetupActionOperationComponent value) { 7427 this.operation = value; 7428 return this; 7429 } 7430 7431 /** 7432 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 7433 */ 7434 public SetupActionAssertComponent getAssert() { 7435 if (this.assert_ == null) 7436 if (Configuration.errorOnAutoCreate()) 7437 throw new Error("Attempt to auto-create TestActionComponent.assert_"); 7438 else if (Configuration.doAutoCreate()) 7439 this.assert_ = new SetupActionAssertComponent(); // cc 7440 return this.assert_; 7441 } 7442 7443 public boolean hasAssert() { 7444 return this.assert_ != null && !this.assert_.isEmpty(); 7445 } 7446 7447 /** 7448 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 7449 */ 7450 public TestActionComponent setAssert(SetupActionAssertComponent value) { 7451 this.assert_ = value; 7452 return this; 7453 } 7454 7455 protected void listChildren(List<Property> children) { 7456 super.listChildren(children); 7457 children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation)); 7458 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_)); 7459 } 7460 7461 @Override 7462 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7463 switch (_hash) { 7464 case 1662702951: /*operation*/ return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation); 7465 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_); 7466 default: return super.getNamedProperty(_hash, _name, _checkValid); 7467 } 7468 7469 } 7470 7471 @Override 7472 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7473 switch (hash) { 7474 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 7475 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 7476 default: return super.getProperty(hash, name, checkValid); 7477 } 7478 7479 } 7480 7481 @Override 7482 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7483 switch (hash) { 7484 case 1662702951: // operation 7485 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 7486 return value; 7487 case -1408208058: // assert 7488 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 7489 return value; 7490 default: return super.setProperty(hash, name, value); 7491 } 7492 7493 } 7494 7495 @Override 7496 public Base setProperty(String name, Base value) throws FHIRException { 7497 if (name.equals("operation")) { 7498 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 7499 } else if (name.equals("assert")) { 7500 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 7501 } else 7502 return super.setProperty(name, value); 7503 return value; 7504 } 7505 7506 @Override 7507 public Base makeProperty(int hash, String name) throws FHIRException { 7508 switch (hash) { 7509 case 1662702951: return getOperation(); 7510 case -1408208058: return getAssert(); 7511 default: return super.makeProperty(hash, name); 7512 } 7513 7514 } 7515 7516 @Override 7517 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7518 switch (hash) { 7519 case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"}; 7520 case -1408208058: /*assert*/ return new String[] {"@TestScript.setup.action.assert"}; 7521 default: return super.getTypesForProperty(hash, name); 7522 } 7523 7524 } 7525 7526 @Override 7527 public Base addChild(String name) throws FHIRException { 7528 if (name.equals("operation")) { 7529 this.operation = new SetupActionOperationComponent(); 7530 return this.operation; 7531 } 7532 else if (name.equals("assert")) { 7533 this.assert_ = new SetupActionAssertComponent(); 7534 return this.assert_; 7535 } 7536 else 7537 return super.addChild(name); 7538 } 7539 7540 public TestActionComponent copy() { 7541 TestActionComponent dst = new TestActionComponent(); 7542 copyValues(dst); 7543 return dst; 7544 } 7545 7546 public void copyValues(TestActionComponent dst) { 7547 super.copyValues(dst); 7548 dst.operation = operation == null ? null : operation.copy(); 7549 dst.assert_ = assert_ == null ? null : assert_.copy(); 7550 } 7551 7552 @Override 7553 public boolean equalsDeep(Base other_) { 7554 if (!super.equalsDeep(other_)) 7555 return false; 7556 if (!(other_ instanceof TestActionComponent)) 7557 return false; 7558 TestActionComponent o = (TestActionComponent) other_; 7559 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 7560 } 7561 7562 @Override 7563 public boolean equalsShallow(Base other_) { 7564 if (!super.equalsShallow(other_)) 7565 return false; 7566 if (!(other_ instanceof TestActionComponent)) 7567 return false; 7568 TestActionComponent o = (TestActionComponent) other_; 7569 return true; 7570 } 7571 7572 public boolean isEmpty() { 7573 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_); 7574 } 7575 7576 public String fhirType() { 7577 return "TestScript.test.action"; 7578 7579 } 7580 7581 } 7582 7583 @Block() 7584 public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement { 7585 /** 7586 * The teardown action will only contain an operation. 7587 */ 7588 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7589 @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." ) 7590 protected List<TeardownActionComponent> action; 7591 7592 private static final long serialVersionUID = 1168638089L; 7593 7594 /** 7595 * Constructor 7596 */ 7597 public TestScriptTeardownComponent() { 7598 super(); 7599 } 7600 7601 /** 7602 * @return {@link #action} (The teardown action will only contain an operation.) 7603 */ 7604 public List<TeardownActionComponent> getAction() { 7605 if (this.action == null) 7606 this.action = new ArrayList<TeardownActionComponent>(); 7607 return this.action; 7608 } 7609 7610 /** 7611 * @return Returns a reference to <code>this</code> for easy method chaining 7612 */ 7613 public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) { 7614 this.action = theAction; 7615 return this; 7616 } 7617 7618 public boolean hasAction() { 7619 if (this.action == null) 7620 return false; 7621 for (TeardownActionComponent item : this.action) 7622 if (!item.isEmpty()) 7623 return true; 7624 return false; 7625 } 7626 7627 public TeardownActionComponent addAction() { //3 7628 TeardownActionComponent t = new TeardownActionComponent(); 7629 if (this.action == null) 7630 this.action = new ArrayList<TeardownActionComponent>(); 7631 this.action.add(t); 7632 return t; 7633 } 7634 7635 public TestScriptTeardownComponent addAction(TeardownActionComponent t) { //3 7636 if (t == null) 7637 return this; 7638 if (this.action == null) 7639 this.action = new ArrayList<TeardownActionComponent>(); 7640 this.action.add(t); 7641 return this; 7642 } 7643 7644 /** 7645 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 7646 */ 7647 public TeardownActionComponent getActionFirstRep() { 7648 if (getAction().isEmpty()) { 7649 addAction(); 7650 } 7651 return getAction().get(0); 7652 } 7653 7654 protected void listChildren(List<Property> children) { 7655 super.listChildren(children); 7656 children.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action)); 7657 } 7658 7659 @Override 7660 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7661 switch (_hash) { 7662 case -1422950858: /*action*/ return new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action); 7663 default: return super.getNamedProperty(_hash, _name, _checkValid); 7664 } 7665 7666 } 7667 7668 @Override 7669 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7670 switch (hash) { 7671 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent 7672 default: return super.getProperty(hash, name, checkValid); 7673 } 7674 7675 } 7676 7677 @Override 7678 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7679 switch (hash) { 7680 case -1422950858: // action 7681 this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent 7682 return value; 7683 default: return super.setProperty(hash, name, value); 7684 } 7685 7686 } 7687 7688 @Override 7689 public Base setProperty(String name, Base value) throws FHIRException { 7690 if (name.equals("action")) { 7691 this.getAction().add((TeardownActionComponent) value); 7692 } else 7693 return super.setProperty(name, value); 7694 return value; 7695 } 7696 7697 @Override 7698 public Base makeProperty(int hash, String name) throws FHIRException { 7699 switch (hash) { 7700 case -1422950858: return addAction(); 7701 default: return super.makeProperty(hash, name); 7702 } 7703 7704 } 7705 7706 @Override 7707 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7708 switch (hash) { 7709 case -1422950858: /*action*/ return new String[] {}; 7710 default: return super.getTypesForProperty(hash, name); 7711 } 7712 7713 } 7714 7715 @Override 7716 public Base addChild(String name) throws FHIRException { 7717 if (name.equals("action")) { 7718 return addAction(); 7719 } 7720 else 7721 return super.addChild(name); 7722 } 7723 7724 public TestScriptTeardownComponent copy() { 7725 TestScriptTeardownComponent dst = new TestScriptTeardownComponent(); 7726 copyValues(dst); 7727 return dst; 7728 } 7729 7730 public void copyValues(TestScriptTeardownComponent dst) { 7731 super.copyValues(dst); 7732 if (action != null) { 7733 dst.action = new ArrayList<TeardownActionComponent>(); 7734 for (TeardownActionComponent i : action) 7735 dst.action.add(i.copy()); 7736 }; 7737 } 7738 7739 @Override 7740 public boolean equalsDeep(Base other_) { 7741 if (!super.equalsDeep(other_)) 7742 return false; 7743 if (!(other_ instanceof TestScriptTeardownComponent)) 7744 return false; 7745 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_; 7746 return compareDeep(action, o.action, true); 7747 } 7748 7749 @Override 7750 public boolean equalsShallow(Base other_) { 7751 if (!super.equalsShallow(other_)) 7752 return false; 7753 if (!(other_ instanceof TestScriptTeardownComponent)) 7754 return false; 7755 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_; 7756 return true; 7757 } 7758 7759 public boolean isEmpty() { 7760 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action); 7761 } 7762 7763 public String fhirType() { 7764 return "TestScript.teardown"; 7765 7766 } 7767 7768 } 7769 7770 @Block() 7771 public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement { 7772 /** 7773 * An operation would involve a REST request to a server. 7774 */ 7775 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=1, max=1, modifier=false, summary=false) 7776 @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 7777 protected SetupActionOperationComponent operation; 7778 7779 private static final long serialVersionUID = -1099598054L; 7780 7781 /** 7782 * Constructor 7783 */ 7784 public TeardownActionComponent() { 7785 super(); 7786 } 7787 7788 /** 7789 * Constructor 7790 */ 7791 public TeardownActionComponent(SetupActionOperationComponent operation) { 7792 super(); 7793 this.operation = operation; 7794 } 7795 7796 /** 7797 * @return {@link #operation} (An operation would involve a REST request to a server.) 7798 */ 7799 public SetupActionOperationComponent getOperation() { 7800 if (this.operation == null) 7801 if (Configuration.errorOnAutoCreate()) 7802 throw new Error("Attempt to auto-create TeardownActionComponent.operation"); 7803 else if (Configuration.doAutoCreate()) 7804 this.operation = new SetupActionOperationComponent(); // cc 7805 return this.operation; 7806 } 7807 7808 public boolean hasOperation() { 7809 return this.operation != null && !this.operation.isEmpty(); 7810 } 7811 7812 /** 7813 * @param value {@link #operation} (An operation would involve a REST request to a server.) 7814 */ 7815 public TeardownActionComponent setOperation(SetupActionOperationComponent value) { 7816 this.operation = value; 7817 return this; 7818 } 7819 7820 protected void listChildren(List<Property> children) { 7821 super.listChildren(children); 7822 children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation)); 7823 } 7824 7825 @Override 7826 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7827 switch (_hash) { 7828 case 1662702951: /*operation*/ return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation); 7829 default: return super.getNamedProperty(_hash, _name, _checkValid); 7830 } 7831 7832 } 7833 7834 @Override 7835 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7836 switch (hash) { 7837 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 7838 default: return super.getProperty(hash, name, checkValid); 7839 } 7840 7841 } 7842 7843 @Override 7844 public Base setProperty(int hash, String name, Base value) throws FHIRException { 7845 switch (hash) { 7846 case 1662702951: // operation 7847 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 7848 return value; 7849 default: return super.setProperty(hash, name, value); 7850 } 7851 7852 } 7853 7854 @Override 7855 public Base setProperty(String name, Base value) throws FHIRException { 7856 if (name.equals("operation")) { 7857 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 7858 } else 7859 return super.setProperty(name, value); 7860 return value; 7861 } 7862 7863 @Override 7864 public Base makeProperty(int hash, String name) throws FHIRException { 7865 switch (hash) { 7866 case 1662702951: return getOperation(); 7867 default: return super.makeProperty(hash, name); 7868 } 7869 7870 } 7871 7872 @Override 7873 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 7874 switch (hash) { 7875 case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"}; 7876 default: return super.getTypesForProperty(hash, name); 7877 } 7878 7879 } 7880 7881 @Override 7882 public Base addChild(String name) throws FHIRException { 7883 if (name.equals("operation")) { 7884 this.operation = new SetupActionOperationComponent(); 7885 return this.operation; 7886 } 7887 else 7888 return super.addChild(name); 7889 } 7890 7891 public TeardownActionComponent copy() { 7892 TeardownActionComponent dst = new TeardownActionComponent(); 7893 copyValues(dst); 7894 return dst; 7895 } 7896 7897 public void copyValues(TeardownActionComponent dst) { 7898 super.copyValues(dst); 7899 dst.operation = operation == null ? null : operation.copy(); 7900 } 7901 7902 @Override 7903 public boolean equalsDeep(Base other_) { 7904 if (!super.equalsDeep(other_)) 7905 return false; 7906 if (!(other_ instanceof TeardownActionComponent)) 7907 return false; 7908 TeardownActionComponent o = (TeardownActionComponent) other_; 7909 return compareDeep(operation, o.operation, true); 7910 } 7911 7912 @Override 7913 public boolean equalsShallow(Base other_) { 7914 if (!super.equalsShallow(other_)) 7915 return false; 7916 if (!(other_ instanceof TeardownActionComponent)) 7917 return false; 7918 TeardownActionComponent o = (TeardownActionComponent) other_; 7919 return true; 7920 } 7921 7922 public boolean isEmpty() { 7923 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation); 7924 } 7925 7926 public String fhirType() { 7927 return "TestScript.teardown.action"; 7928 7929 } 7930 7931 } 7932 7933 /** 7934 * 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. 7935 */ 7936 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 7937 @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." ) 7938 protected Identifier identifier; 7939 7940 /** 7941 * Explanation of why this test script is needed and why it has been designed as it has. 7942 */ 7943 @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false) 7944 @Description(shortDefinition="Why this test script is defined", formalDefinition="Explanation of why this test script is needed and why it has been designed as it has." ) 7945 protected MarkdownType purpose; 7946 7947 /** 7948 * 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. 7949 */ 7950 @Child(name = "copyright", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 7951 @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." ) 7952 protected MarkdownType copyright; 7953 7954 /** 7955 * An abstract server used in operations within this test script in the origin element. 7956 */ 7957 @Child(name = "origin", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7958 @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." ) 7959 protected List<TestScriptOriginComponent> origin; 7960 7961 /** 7962 * An abstract server used in operations within this test script in the destination element. 7963 */ 7964 @Child(name = "destination", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7965 @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." ) 7966 protected List<TestScriptDestinationComponent> destination; 7967 7968 /** 7969 * The required capability must exist and are assumed to function correctly on the FHIR server being tested. 7970 */ 7971 @Child(name = "metadata", type = {}, order=5, min=0, max=1, modifier=false, summary=false) 7972 @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." ) 7973 protected TestScriptMetadataComponent metadata; 7974 7975 /** 7976 * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute. 7977 */ 7978 @Child(name = "fixture", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7979 @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." ) 7980 protected List<TestScriptFixtureComponent> fixture; 7981 7982 /** 7983 * Reference to the profile to be used for validation. 7984 */ 7985 @Child(name = "profile", type = {Reference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7986 @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." ) 7987 protected List<Reference> profile; 7988 /** 7989 * The actual objects that are the target of the reference (Reference to the profile to be used for validation.) 7990 */ 7991 protected List<Resource> profileTarget; 7992 7993 7994 /** 7995 * Variable is set based either on element value in response body or on header field value in the response headers. 7996 */ 7997 @Child(name = "variable", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7998 @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." ) 7999 protected List<TestScriptVariableComponent> variable; 8000 8001 /** 8002 * A series of required setup operations before tests are executed. 8003 */ 8004 @Child(name = "setup", type = {}, order=9, min=0, max=1, modifier=false, summary=false) 8005 @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." ) 8006 protected TestScriptSetupComponent setup; 8007 8008 /** 8009 * A test in this script. 8010 */ 8011 @Child(name = "test", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8012 @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." ) 8013 protected List<TestScriptTestComponent> test; 8014 8015 /** 8016 * A series of operations required to clean up after all the tests are executed (successfully or otherwise). 8017 */ 8018 @Child(name = "teardown", type = {}, order=11, min=0, max=1, modifier=false, summary=false) 8019 @Description(shortDefinition="A series of required clean up steps", formalDefinition="A series of operations required to clean up after all the tests are executed (successfully or otherwise)." ) 8020 protected TestScriptTeardownComponent teardown; 8021 8022 private static final long serialVersionUID = -1433230137L; 8023 8024 /** 8025 * Constructor 8026 */ 8027 public TestScript() { 8028 super(); 8029 } 8030 8031 /** 8032 * Constructor 8033 */ 8034 public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) { 8035 super(); 8036 this.url = url; 8037 this.name = name; 8038 this.status = status; 8039 } 8040 8041 /** 8042 * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 8043 */ 8044 public UriType getUrlElement() { 8045 if (this.url == null) 8046 if (Configuration.errorOnAutoCreate()) 8047 throw new Error("Attempt to auto-create TestScript.url"); 8048 else if (Configuration.doAutoCreate()) 8049 this.url = new UriType(); // bb 8050 return this.url; 8051 } 8052 8053 public boolean hasUrlElement() { 8054 return this.url != null && !this.url.isEmpty(); 8055 } 8056 8057 public boolean hasUrl() { 8058 return this.url != null && !this.url.isEmpty(); 8059 } 8060 8061 /** 8062 * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 8063 */ 8064 public TestScript setUrlElement(UriType value) { 8065 this.url = value; 8066 return this; 8067 } 8068 8069 /** 8070 * @return An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers. 8071 */ 8072 public String getUrl() { 8073 return this.url == null ? null : this.url.getValue(); 8074 } 8075 8076 /** 8077 * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers. 8078 */ 8079 public TestScript setUrl(String value) { 8080 if (this.url == null) 8081 this.url = new UriType(); 8082 this.url.setValue(value); 8083 return this; 8084 } 8085 8086 /** 8087 * @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.) 8088 */ 8089 public Identifier getIdentifier() { 8090 if (this.identifier == null) 8091 if (Configuration.errorOnAutoCreate()) 8092 throw new Error("Attempt to auto-create TestScript.identifier"); 8093 else if (Configuration.doAutoCreate()) 8094 this.identifier = new Identifier(); // cc 8095 return this.identifier; 8096 } 8097 8098 public boolean hasIdentifier() { 8099 return this.identifier != null && !this.identifier.isEmpty(); 8100 } 8101 8102 /** 8103 * @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.) 8104 */ 8105 public TestScript setIdentifier(Identifier value) { 8106 this.identifier = value; 8107 return this; 8108 } 8109 8110 /** 8111 * @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 8112 */ 8113 public StringType getVersionElement() { 8114 if (this.version == null) 8115 if (Configuration.errorOnAutoCreate()) 8116 throw new Error("Attempt to auto-create TestScript.version"); 8117 else if (Configuration.doAutoCreate()) 8118 this.version = new StringType(); // bb 8119 return this.version; 8120 } 8121 8122 public boolean hasVersionElement() { 8123 return this.version != null && !this.version.isEmpty(); 8124 } 8125 8126 public boolean hasVersion() { 8127 return this.version != null && !this.version.isEmpty(); 8128 } 8129 8130 /** 8131 * @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 8132 */ 8133 public TestScript setVersionElement(StringType value) { 8134 this.version = value; 8135 return this; 8136 } 8137 8138 /** 8139 * @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. 8140 */ 8141 public String getVersion() { 8142 return this.version == null ? null : this.version.getValue(); 8143 } 8144 8145 /** 8146 * @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. 8147 */ 8148 public TestScript setVersion(String value) { 8149 if (Utilities.noString(value)) 8150 this.version = null; 8151 else { 8152 if (this.version == null) 8153 this.version = new StringType(); 8154 this.version.setValue(value); 8155 } 8156 return this; 8157 } 8158 8159 /** 8160 * @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 8161 */ 8162 public StringType getNameElement() { 8163 if (this.name == null) 8164 if (Configuration.errorOnAutoCreate()) 8165 throw new Error("Attempt to auto-create TestScript.name"); 8166 else if (Configuration.doAutoCreate()) 8167 this.name = new StringType(); // bb 8168 return this.name; 8169 } 8170 8171 public boolean hasNameElement() { 8172 return this.name != null && !this.name.isEmpty(); 8173 } 8174 8175 public boolean hasName() { 8176 return this.name != null && !this.name.isEmpty(); 8177 } 8178 8179 /** 8180 * @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 8181 */ 8182 public TestScript setNameElement(StringType value) { 8183 this.name = value; 8184 return this; 8185 } 8186 8187 /** 8188 * @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. 8189 */ 8190 public String getName() { 8191 return this.name == null ? null : this.name.getValue(); 8192 } 8193 8194 /** 8195 * @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. 8196 */ 8197 public TestScript setName(String value) { 8198 if (this.name == null) 8199 this.name = new StringType(); 8200 this.name.setValue(value); 8201 return this; 8202 } 8203 8204 /** 8205 * @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 8206 */ 8207 public StringType getTitleElement() { 8208 if (this.title == null) 8209 if (Configuration.errorOnAutoCreate()) 8210 throw new Error("Attempt to auto-create TestScript.title"); 8211 else if (Configuration.doAutoCreate()) 8212 this.title = new StringType(); // bb 8213 return this.title; 8214 } 8215 8216 public boolean hasTitleElement() { 8217 return this.title != null && !this.title.isEmpty(); 8218 } 8219 8220 public boolean hasTitle() { 8221 return this.title != null && !this.title.isEmpty(); 8222 } 8223 8224 /** 8225 * @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 8226 */ 8227 public TestScript setTitleElement(StringType value) { 8228 this.title = value; 8229 return this; 8230 } 8231 8232 /** 8233 * @return A short, descriptive, user-friendly title for the test script. 8234 */ 8235 public String getTitle() { 8236 return this.title == null ? null : this.title.getValue(); 8237 } 8238 8239 /** 8240 * @param value A short, descriptive, user-friendly title for the test script. 8241 */ 8242 public TestScript setTitle(String value) { 8243 if (Utilities.noString(value)) 8244 this.title = null; 8245 else { 8246 if (this.title == null) 8247 this.title = new StringType(); 8248 this.title.setValue(value); 8249 } 8250 return this; 8251 } 8252 8253 /** 8254 * @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 8255 */ 8256 public Enumeration<PublicationStatus> getStatusElement() { 8257 if (this.status == null) 8258 if (Configuration.errorOnAutoCreate()) 8259 throw new Error("Attempt to auto-create TestScript.status"); 8260 else if (Configuration.doAutoCreate()) 8261 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 8262 return this.status; 8263 } 8264 8265 public boolean hasStatusElement() { 8266 return this.status != null && !this.status.isEmpty(); 8267 } 8268 8269 public boolean hasStatus() { 8270 return this.status != null && !this.status.isEmpty(); 8271 } 8272 8273 /** 8274 * @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 8275 */ 8276 public TestScript setStatusElement(Enumeration<PublicationStatus> value) { 8277 this.status = value; 8278 return this; 8279 } 8280 8281 /** 8282 * @return The status of this test script. Enables tracking the life-cycle of the content. 8283 */ 8284 public PublicationStatus getStatus() { 8285 return this.status == null ? null : this.status.getValue(); 8286 } 8287 8288 /** 8289 * @param value The status of this test script. Enables tracking the life-cycle of the content. 8290 */ 8291 public TestScript setStatus(PublicationStatus value) { 8292 if (this.status == null) 8293 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 8294 this.status.setValue(value); 8295 return this; 8296 } 8297 8298 /** 8299 * @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 8300 */ 8301 public BooleanType getExperimentalElement() { 8302 if (this.experimental == null) 8303 if (Configuration.errorOnAutoCreate()) 8304 throw new Error("Attempt to auto-create TestScript.experimental"); 8305 else if (Configuration.doAutoCreate()) 8306 this.experimental = new BooleanType(); // bb 8307 return this.experimental; 8308 } 8309 8310 public boolean hasExperimentalElement() { 8311 return this.experimental != null && !this.experimental.isEmpty(); 8312 } 8313 8314 public boolean hasExperimental() { 8315 return this.experimental != null && !this.experimental.isEmpty(); 8316 } 8317 8318 /** 8319 * @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 8320 */ 8321 public TestScript setExperimentalElement(BooleanType value) { 8322 this.experimental = value; 8323 return this; 8324 } 8325 8326 /** 8327 * @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. 8328 */ 8329 public boolean getExperimental() { 8330 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 8331 } 8332 8333 /** 8334 * @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. 8335 */ 8336 public TestScript setExperimental(boolean value) { 8337 if (this.experimental == null) 8338 this.experimental = new BooleanType(); 8339 this.experimental.setValue(value); 8340 return this; 8341 } 8342 8343 /** 8344 * @return {@link #date} (The date (and optionally time) when the test script was published. The date must change 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 8345 */ 8346 public DateTimeType getDateElement() { 8347 if (this.date == null) 8348 if (Configuration.errorOnAutoCreate()) 8349 throw new Error("Attempt to auto-create TestScript.date"); 8350 else if (Configuration.doAutoCreate()) 8351 this.date = new DateTimeType(); // bb 8352 return this.date; 8353 } 8354 8355 public boolean hasDateElement() { 8356 return this.date != null && !this.date.isEmpty(); 8357 } 8358 8359 public boolean hasDate() { 8360 return this.date != null && !this.date.isEmpty(); 8361 } 8362 8363 /** 8364 * @param value {@link #date} (The date (and optionally time) when the test script was published. The date must change 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 8365 */ 8366 public TestScript setDateElement(DateTimeType value) { 8367 this.date = value; 8368 return this; 8369 } 8370 8371 /** 8372 * @return The date (and optionally time) when the test script was published. The date must change 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. 8373 */ 8374 public Date getDate() { 8375 return this.date == null ? null : this.date.getValue(); 8376 } 8377 8378 /** 8379 * @param value The date (and optionally time) when the test script was published. The date must change 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. 8380 */ 8381 public TestScript setDate(Date value) { 8382 if (value == null) 8383 this.date = null; 8384 else { 8385 if (this.date == null) 8386 this.date = new DateTimeType(); 8387 this.date.setValue(value); 8388 } 8389 return this; 8390 } 8391 8392 /** 8393 * @return {@link #publisher} (The name of the organization or individual that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 8394 */ 8395 public StringType getPublisherElement() { 8396 if (this.publisher == null) 8397 if (Configuration.errorOnAutoCreate()) 8398 throw new Error("Attempt to auto-create TestScript.publisher"); 8399 else if (Configuration.doAutoCreate()) 8400 this.publisher = new StringType(); // bb 8401 return this.publisher; 8402 } 8403 8404 public boolean hasPublisherElement() { 8405 return this.publisher != null && !this.publisher.isEmpty(); 8406 } 8407 8408 public boolean hasPublisher() { 8409 return this.publisher != null && !this.publisher.isEmpty(); 8410 } 8411 8412 /** 8413 * @param value {@link #publisher} (The name of the organization or individual that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 8414 */ 8415 public TestScript setPublisherElement(StringType value) { 8416 this.publisher = value; 8417 return this; 8418 } 8419 8420 /** 8421 * @return The name of the organization or individual that published the test script. 8422 */ 8423 public String getPublisher() { 8424 return this.publisher == null ? null : this.publisher.getValue(); 8425 } 8426 8427 /** 8428 * @param value The name of the organization or individual that published the test script. 8429 */ 8430 public TestScript setPublisher(String value) { 8431 if (Utilities.noString(value)) 8432 this.publisher = null; 8433 else { 8434 if (this.publisher == null) 8435 this.publisher = new StringType(); 8436 this.publisher.setValue(value); 8437 } 8438 return this; 8439 } 8440 8441 /** 8442 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 8443 */ 8444 public List<ContactDetail> getContact() { 8445 if (this.contact == null) 8446 this.contact = new ArrayList<ContactDetail>(); 8447 return this.contact; 8448 } 8449 8450 /** 8451 * @return Returns a reference to <code>this</code> for easy method chaining 8452 */ 8453 public TestScript setContact(List<ContactDetail> theContact) { 8454 this.contact = theContact; 8455 return this; 8456 } 8457 8458 public boolean hasContact() { 8459 if (this.contact == null) 8460 return false; 8461 for (ContactDetail item : this.contact) 8462 if (!item.isEmpty()) 8463 return true; 8464 return false; 8465 } 8466 8467 public ContactDetail addContact() { //3 8468 ContactDetail t = new ContactDetail(); 8469 if (this.contact == null) 8470 this.contact = new ArrayList<ContactDetail>(); 8471 this.contact.add(t); 8472 return t; 8473 } 8474 8475 public TestScript addContact(ContactDetail t) { //3 8476 if (t == null) 8477 return this; 8478 if (this.contact == null) 8479 this.contact = new ArrayList<ContactDetail>(); 8480 this.contact.add(t); 8481 return this; 8482 } 8483 8484 /** 8485 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 8486 */ 8487 public ContactDetail getContactFirstRep() { 8488 if (getContact().isEmpty()) { 8489 addContact(); 8490 } 8491 return getContact().get(0); 8492 } 8493 8494 /** 8495 * @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 8496 */ 8497 public MarkdownType getDescriptionElement() { 8498 if (this.description == null) 8499 if (Configuration.errorOnAutoCreate()) 8500 throw new Error("Attempt to auto-create TestScript.description"); 8501 else if (Configuration.doAutoCreate()) 8502 this.description = new MarkdownType(); // bb 8503 return this.description; 8504 } 8505 8506 public boolean hasDescriptionElement() { 8507 return this.description != null && !this.description.isEmpty(); 8508 } 8509 8510 public boolean hasDescription() { 8511 return this.description != null && !this.description.isEmpty(); 8512 } 8513 8514 /** 8515 * @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 8516 */ 8517 public TestScript setDescriptionElement(MarkdownType value) { 8518 this.description = value; 8519 return this; 8520 } 8521 8522 /** 8523 * @return A free text natural language description of the test script from a consumer's perspective. 8524 */ 8525 public String getDescription() { 8526 return this.description == null ? null : this.description.getValue(); 8527 } 8528 8529 /** 8530 * @param value A free text natural language description of the test script from a consumer's perspective. 8531 */ 8532 public TestScript setDescription(String value) { 8533 if (value == null) 8534 this.description = null; 8535 else { 8536 if (this.description == null) 8537 this.description = new MarkdownType(); 8538 this.description.setValue(value); 8539 } 8540 return this; 8541 } 8542 8543 /** 8544 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.) 8545 */ 8546 public List<UsageContext> getUseContext() { 8547 if (this.useContext == null) 8548 this.useContext = new ArrayList<UsageContext>(); 8549 return this.useContext; 8550 } 8551 8552 /** 8553 * @return Returns a reference to <code>this</code> for easy method chaining 8554 */ 8555 public TestScript setUseContext(List<UsageContext> theUseContext) { 8556 this.useContext = theUseContext; 8557 return this; 8558 } 8559 8560 public boolean hasUseContext() { 8561 if (this.useContext == null) 8562 return false; 8563 for (UsageContext item : this.useContext) 8564 if (!item.isEmpty()) 8565 return true; 8566 return false; 8567 } 8568 8569 public UsageContext addUseContext() { //3 8570 UsageContext t = new UsageContext(); 8571 if (this.useContext == null) 8572 this.useContext = new ArrayList<UsageContext>(); 8573 this.useContext.add(t); 8574 return t; 8575 } 8576 8577 public TestScript addUseContext(UsageContext t) { //3 8578 if (t == null) 8579 return this; 8580 if (this.useContext == null) 8581 this.useContext = new ArrayList<UsageContext>(); 8582 this.useContext.add(t); 8583 return this; 8584 } 8585 8586 /** 8587 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 8588 */ 8589 public UsageContext getUseContextFirstRep() { 8590 if (getUseContext().isEmpty()) { 8591 addUseContext(); 8592 } 8593 return getUseContext().get(0); 8594 } 8595 8596 /** 8597 * @return {@link #jurisdiction} (A legal or geographic region in which the test script is intended to be used.) 8598 */ 8599 public List<CodeableConcept> getJurisdiction() { 8600 if (this.jurisdiction == null) 8601 this.jurisdiction = new ArrayList<CodeableConcept>(); 8602 return this.jurisdiction; 8603 } 8604 8605 /** 8606 * @return Returns a reference to <code>this</code> for easy method chaining 8607 */ 8608 public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) { 8609 this.jurisdiction = theJurisdiction; 8610 return this; 8611 } 8612 8613 public boolean hasJurisdiction() { 8614 if (this.jurisdiction == null) 8615 return false; 8616 for (CodeableConcept item : this.jurisdiction) 8617 if (!item.isEmpty()) 8618 return true; 8619 return false; 8620 } 8621 8622 public CodeableConcept addJurisdiction() { //3 8623 CodeableConcept t = new CodeableConcept(); 8624 if (this.jurisdiction == null) 8625 this.jurisdiction = new ArrayList<CodeableConcept>(); 8626 this.jurisdiction.add(t); 8627 return t; 8628 } 8629 8630 public TestScript addJurisdiction(CodeableConcept t) { //3 8631 if (t == null) 8632 return this; 8633 if (this.jurisdiction == null) 8634 this.jurisdiction = new ArrayList<CodeableConcept>(); 8635 this.jurisdiction.add(t); 8636 return this; 8637 } 8638 8639 /** 8640 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 8641 */ 8642 public CodeableConcept getJurisdictionFirstRep() { 8643 if (getJurisdiction().isEmpty()) { 8644 addJurisdiction(); 8645 } 8646 return getJurisdiction().get(0); 8647 } 8648 8649 /** 8650 * @return {@link #purpose} (Explanation 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 8651 */ 8652 public MarkdownType getPurposeElement() { 8653 if (this.purpose == null) 8654 if (Configuration.errorOnAutoCreate()) 8655 throw new Error("Attempt to auto-create TestScript.purpose"); 8656 else if (Configuration.doAutoCreate()) 8657 this.purpose = new MarkdownType(); // bb 8658 return this.purpose; 8659 } 8660 8661 public boolean hasPurposeElement() { 8662 return this.purpose != null && !this.purpose.isEmpty(); 8663 } 8664 8665 public boolean hasPurpose() { 8666 return this.purpose != null && !this.purpose.isEmpty(); 8667 } 8668 8669 /** 8670 * @param value {@link #purpose} (Explanation 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 8671 */ 8672 public TestScript setPurposeElement(MarkdownType value) { 8673 this.purpose = value; 8674 return this; 8675 } 8676 8677 /** 8678 * @return Explanation of why this test script is needed and why it has been designed as it has. 8679 */ 8680 public String getPurpose() { 8681 return this.purpose == null ? null : this.purpose.getValue(); 8682 } 8683 8684 /** 8685 * @param value Explanation of why this test script is needed and why it has been designed as it has. 8686 */ 8687 public TestScript setPurpose(String value) { 8688 if (value == null) 8689 this.purpose = null; 8690 else { 8691 if (this.purpose == null) 8692 this.purpose = new MarkdownType(); 8693 this.purpose.setValue(value); 8694 } 8695 return this; 8696 } 8697 8698 /** 8699 * @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 8700 */ 8701 public MarkdownType getCopyrightElement() { 8702 if (this.copyright == null) 8703 if (Configuration.errorOnAutoCreate()) 8704 throw new Error("Attempt to auto-create TestScript.copyright"); 8705 else if (Configuration.doAutoCreate()) 8706 this.copyright = new MarkdownType(); // bb 8707 return this.copyright; 8708 } 8709 8710 public boolean hasCopyrightElement() { 8711 return this.copyright != null && !this.copyright.isEmpty(); 8712 } 8713 8714 public boolean hasCopyright() { 8715 return this.copyright != null && !this.copyright.isEmpty(); 8716 } 8717 8718 /** 8719 * @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 8720 */ 8721 public TestScript setCopyrightElement(MarkdownType value) { 8722 this.copyright = value; 8723 return this; 8724 } 8725 8726 /** 8727 * @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. 8728 */ 8729 public String getCopyright() { 8730 return this.copyright == null ? null : this.copyright.getValue(); 8731 } 8732 8733 /** 8734 * @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. 8735 */ 8736 public TestScript setCopyright(String value) { 8737 if (value == null) 8738 this.copyright = null; 8739 else { 8740 if (this.copyright == null) 8741 this.copyright = new MarkdownType(); 8742 this.copyright.setValue(value); 8743 } 8744 return this; 8745 } 8746 8747 /** 8748 * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) 8749 */ 8750 public List<TestScriptOriginComponent> getOrigin() { 8751 if (this.origin == null) 8752 this.origin = new ArrayList<TestScriptOriginComponent>(); 8753 return this.origin; 8754 } 8755 8756 /** 8757 * @return Returns a reference to <code>this</code> for easy method chaining 8758 */ 8759 public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) { 8760 this.origin = theOrigin; 8761 return this; 8762 } 8763 8764 public boolean hasOrigin() { 8765 if (this.origin == null) 8766 return false; 8767 for (TestScriptOriginComponent item : this.origin) 8768 if (!item.isEmpty()) 8769 return true; 8770 return false; 8771 } 8772 8773 public TestScriptOriginComponent addOrigin() { //3 8774 TestScriptOriginComponent t = new TestScriptOriginComponent(); 8775 if (this.origin == null) 8776 this.origin = new ArrayList<TestScriptOriginComponent>(); 8777 this.origin.add(t); 8778 return t; 8779 } 8780 8781 public TestScript addOrigin(TestScriptOriginComponent t) { //3 8782 if (t == null) 8783 return this; 8784 if (this.origin == null) 8785 this.origin = new ArrayList<TestScriptOriginComponent>(); 8786 this.origin.add(t); 8787 return this; 8788 } 8789 8790 /** 8791 * @return The first repetition of repeating field {@link #origin}, creating it if it does not already exist 8792 */ 8793 public TestScriptOriginComponent getOriginFirstRep() { 8794 if (getOrigin().isEmpty()) { 8795 addOrigin(); 8796 } 8797 return getOrigin().get(0); 8798 } 8799 8800 /** 8801 * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.) 8802 */ 8803 public List<TestScriptDestinationComponent> getDestination() { 8804 if (this.destination == null) 8805 this.destination = new ArrayList<TestScriptDestinationComponent>(); 8806 return this.destination; 8807 } 8808 8809 /** 8810 * @return Returns a reference to <code>this</code> for easy method chaining 8811 */ 8812 public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) { 8813 this.destination = theDestination; 8814 return this; 8815 } 8816 8817 public boolean hasDestination() { 8818 if (this.destination == null) 8819 return false; 8820 for (TestScriptDestinationComponent item : this.destination) 8821 if (!item.isEmpty()) 8822 return true; 8823 return false; 8824 } 8825 8826 public TestScriptDestinationComponent addDestination() { //3 8827 TestScriptDestinationComponent t = new TestScriptDestinationComponent(); 8828 if (this.destination == null) 8829 this.destination = new ArrayList<TestScriptDestinationComponent>(); 8830 this.destination.add(t); 8831 return t; 8832 } 8833 8834 public TestScript addDestination(TestScriptDestinationComponent t) { //3 8835 if (t == null) 8836 return this; 8837 if (this.destination == null) 8838 this.destination = new ArrayList<TestScriptDestinationComponent>(); 8839 this.destination.add(t); 8840 return this; 8841 } 8842 8843 /** 8844 * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist 8845 */ 8846 public TestScriptDestinationComponent getDestinationFirstRep() { 8847 if (getDestination().isEmpty()) { 8848 addDestination(); 8849 } 8850 return getDestination().get(0); 8851 } 8852 8853 /** 8854 * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 8855 */ 8856 public TestScriptMetadataComponent getMetadata() { 8857 if (this.metadata == null) 8858 if (Configuration.errorOnAutoCreate()) 8859 throw new Error("Attempt to auto-create TestScript.metadata"); 8860 else if (Configuration.doAutoCreate()) 8861 this.metadata = new TestScriptMetadataComponent(); // cc 8862 return this.metadata; 8863 } 8864 8865 public boolean hasMetadata() { 8866 return this.metadata != null && !this.metadata.isEmpty(); 8867 } 8868 8869 /** 8870 * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 8871 */ 8872 public TestScript setMetadata(TestScriptMetadataComponent value) { 8873 this.metadata = value; 8874 return this; 8875 } 8876 8877 /** 8878 * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) 8879 */ 8880 public List<TestScriptFixtureComponent> getFixture() { 8881 if (this.fixture == null) 8882 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 8883 return this.fixture; 8884 } 8885 8886 /** 8887 * @return Returns a reference to <code>this</code> for easy method chaining 8888 */ 8889 public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) { 8890 this.fixture = theFixture; 8891 return this; 8892 } 8893 8894 public boolean hasFixture() { 8895 if (this.fixture == null) 8896 return false; 8897 for (TestScriptFixtureComponent item : this.fixture) 8898 if (!item.isEmpty()) 8899 return true; 8900 return false; 8901 } 8902 8903 public TestScriptFixtureComponent addFixture() { //3 8904 TestScriptFixtureComponent t = new TestScriptFixtureComponent(); 8905 if (this.fixture == null) 8906 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 8907 this.fixture.add(t); 8908 return t; 8909 } 8910 8911 public TestScript addFixture(TestScriptFixtureComponent t) { //3 8912 if (t == null) 8913 return this; 8914 if (this.fixture == null) 8915 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 8916 this.fixture.add(t); 8917 return this; 8918 } 8919 8920 /** 8921 * @return The first repetition of repeating field {@link #fixture}, creating it if it does not already exist 8922 */ 8923 public TestScriptFixtureComponent getFixtureFirstRep() { 8924 if (getFixture().isEmpty()) { 8925 addFixture(); 8926 } 8927 return getFixture().get(0); 8928 } 8929 8930 /** 8931 * @return {@link #profile} (Reference to the profile to be used for validation.) 8932 */ 8933 public List<Reference> getProfile() { 8934 if (this.profile == null) 8935 this.profile = new ArrayList<Reference>(); 8936 return this.profile; 8937 } 8938 8939 /** 8940 * @return Returns a reference to <code>this</code> for easy method chaining 8941 */ 8942 public TestScript setProfile(List<Reference> theProfile) { 8943 this.profile = theProfile; 8944 return this; 8945 } 8946 8947 public boolean hasProfile() { 8948 if (this.profile == null) 8949 return false; 8950 for (Reference item : this.profile) 8951 if (!item.isEmpty()) 8952 return true; 8953 return false; 8954 } 8955 8956 public Reference addProfile() { //3 8957 Reference t = new Reference(); 8958 if (this.profile == null) 8959 this.profile = new ArrayList<Reference>(); 8960 this.profile.add(t); 8961 return t; 8962 } 8963 8964 public TestScript addProfile(Reference t) { //3 8965 if (t == null) 8966 return this; 8967 if (this.profile == null) 8968 this.profile = new ArrayList<Reference>(); 8969 this.profile.add(t); 8970 return this; 8971 } 8972 8973 /** 8974 * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist 8975 */ 8976 public Reference getProfileFirstRep() { 8977 if (getProfile().isEmpty()) { 8978 addProfile(); 8979 } 8980 return getProfile().get(0); 8981 } 8982 8983 /** 8984 * @deprecated Use Reference#setResource(IBaseResource) instead 8985 */ 8986 @Deprecated 8987 public List<Resource> getProfileTarget() { 8988 if (this.profileTarget == null) 8989 this.profileTarget = new ArrayList<Resource>(); 8990 return this.profileTarget; 8991 } 8992 8993 /** 8994 * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) 8995 */ 8996 public List<TestScriptVariableComponent> getVariable() { 8997 if (this.variable == null) 8998 this.variable = new ArrayList<TestScriptVariableComponent>(); 8999 return this.variable; 9000 } 9001 9002 /** 9003 * @return Returns a reference to <code>this</code> for easy method chaining 9004 */ 9005 public TestScript setVariable(List<TestScriptVariableComponent> theVariable) { 9006 this.variable = theVariable; 9007 return this; 9008 } 9009 9010 public boolean hasVariable() { 9011 if (this.variable == null) 9012 return false; 9013 for (TestScriptVariableComponent item : this.variable) 9014 if (!item.isEmpty()) 9015 return true; 9016 return false; 9017 } 9018 9019 public TestScriptVariableComponent addVariable() { //3 9020 TestScriptVariableComponent t = new TestScriptVariableComponent(); 9021 if (this.variable == null) 9022 this.variable = new ArrayList<TestScriptVariableComponent>(); 9023 this.variable.add(t); 9024 return t; 9025 } 9026 9027 public TestScript addVariable(TestScriptVariableComponent t) { //3 9028 if (t == null) 9029 return this; 9030 if (this.variable == null) 9031 this.variable = new ArrayList<TestScriptVariableComponent>(); 9032 this.variable.add(t); 9033 return this; 9034 } 9035 9036 /** 9037 * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist 9038 */ 9039 public TestScriptVariableComponent getVariableFirstRep() { 9040 if (getVariable().isEmpty()) { 9041 addVariable(); 9042 } 9043 return getVariable().get(0); 9044 } 9045 9046 /** 9047 * @return {@link #setup} (A series of required setup operations before tests are executed.) 9048 */ 9049 public TestScriptSetupComponent getSetup() { 9050 if (this.setup == null) 9051 if (Configuration.errorOnAutoCreate()) 9052 throw new Error("Attempt to auto-create TestScript.setup"); 9053 else if (Configuration.doAutoCreate()) 9054 this.setup = new TestScriptSetupComponent(); // cc 9055 return this.setup; 9056 } 9057 9058 public boolean hasSetup() { 9059 return this.setup != null && !this.setup.isEmpty(); 9060 } 9061 9062 /** 9063 * @param value {@link #setup} (A series of required setup operations before tests are executed.) 9064 */ 9065 public TestScript setSetup(TestScriptSetupComponent value) { 9066 this.setup = value; 9067 return this; 9068 } 9069 9070 /** 9071 * @return {@link #test} (A test in this script.) 9072 */ 9073 public List<TestScriptTestComponent> getTest() { 9074 if (this.test == null) 9075 this.test = new ArrayList<TestScriptTestComponent>(); 9076 return this.test; 9077 } 9078 9079 /** 9080 * @return Returns a reference to <code>this</code> for easy method chaining 9081 */ 9082 public TestScript setTest(List<TestScriptTestComponent> theTest) { 9083 this.test = theTest; 9084 return this; 9085 } 9086 9087 public boolean hasTest() { 9088 if (this.test == null) 9089 return false; 9090 for (TestScriptTestComponent item : this.test) 9091 if (!item.isEmpty()) 9092 return true; 9093 return false; 9094 } 9095 9096 public TestScriptTestComponent addTest() { //3 9097 TestScriptTestComponent t = new TestScriptTestComponent(); 9098 if (this.test == null) 9099 this.test = new ArrayList<TestScriptTestComponent>(); 9100 this.test.add(t); 9101 return t; 9102 } 9103 9104 public TestScript addTest(TestScriptTestComponent t) { //3 9105 if (t == null) 9106 return this; 9107 if (this.test == null) 9108 this.test = new ArrayList<TestScriptTestComponent>(); 9109 this.test.add(t); 9110 return this; 9111 } 9112 9113 /** 9114 * @return The first repetition of repeating field {@link #test}, creating it if it does not already exist 9115 */ 9116 public TestScriptTestComponent getTestFirstRep() { 9117 if (getTest().isEmpty()) { 9118 addTest(); 9119 } 9120 return getTest().get(0); 9121 } 9122 9123 /** 9124 * @return {@link #teardown} (A series of operations required to clean up after all the tests are executed (successfully or otherwise).) 9125 */ 9126 public TestScriptTeardownComponent getTeardown() { 9127 if (this.teardown == null) 9128 if (Configuration.errorOnAutoCreate()) 9129 throw new Error("Attempt to auto-create TestScript.teardown"); 9130 else if (Configuration.doAutoCreate()) 9131 this.teardown = new TestScriptTeardownComponent(); // cc 9132 return this.teardown; 9133 } 9134 9135 public boolean hasTeardown() { 9136 return this.teardown != null && !this.teardown.isEmpty(); 9137 } 9138 9139 /** 9140 * @param value {@link #teardown} (A series of operations required to clean up after all the tests are executed (successfully or otherwise).) 9141 */ 9142 public TestScript setTeardown(TestScriptTeardownComponent value) { 9143 this.teardown = value; 9144 return this; 9145 } 9146 9147 protected void listChildren(List<Property> children) { 9148 super.listChildren(children); 9149 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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.", 0, 1, url)); 9150 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)); 9151 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)); 9152 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)); 9153 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title)); 9154 children.add(new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status)); 9155 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)); 9156 children.add(new Property("date", "dateTime", "The date (and optionally time) when the test script was published. The date must change 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)); 9157 children.add(new Property("publisher", "string", "The name of the organization or individual that published the test script.", 0, 1, publisher)); 9158 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)); 9159 children.add(new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description)); 9160 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 9161 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)); 9162 children.add(new Property("purpose", "markdown", "Explanation of why this test script is needed and why it has been designed as it has.", 0, 1, purpose)); 9163 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)); 9164 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)); 9165 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)); 9166 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)); 9167 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)); 9168 children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile)); 9169 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)); 9170 children.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup)); 9171 children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test)); 9172 children.add(new Property("teardown", "", "A series of operations required to clean up after all the tests are executed (successfully or otherwise).", 0, 1, teardown)); 9173 } 9174 9175 @Override 9176 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9177 switch (_hash) { 9178 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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers.", 0, 1, url); 9179 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); 9180 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); 9181 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); 9182 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title); 9183 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); 9184 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); 9185 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the test script was published. The date must change 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); 9186 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the organization or individual that published the test script.", 0, 1, publisher); 9187 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); 9188 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); 9189 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 contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate test script instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 9190 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); 9191 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explanation of why this test script is needed and why it has been designed as it has.", 0, 1, purpose); 9192 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); 9193 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); 9194 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); 9195 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); 9196 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); 9197 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); 9198 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); 9199 case 109329021: /*setup*/ return new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup); 9200 case 3556498: /*test*/ return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test); 9201 case -1663474172: /*teardown*/ return new Property("teardown", "", "A series of operations required to clean up after all the tests are executed (successfully or otherwise).", 0, 1, teardown); 9202 default: return super.getNamedProperty(_hash, _name, _checkValid); 9203 } 9204 9205 } 9206 9207 @Override 9208 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9209 switch (hash) { 9210 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 9211 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 9212 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 9213 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 9214 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 9215 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 9216 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 9217 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 9218 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 9219 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 9220 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 9221 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 9222 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 9223 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 9224 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 9225 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent 9226 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent 9227 case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent 9228 case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent 9229 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference 9230 case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent 9231 case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent 9232 case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent 9233 case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent 9234 default: return super.getProperty(hash, name, checkValid); 9235 } 9236 9237 } 9238 9239 @Override 9240 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9241 switch (hash) { 9242 case 116079: // url 9243 this.url = castToUri(value); // UriType 9244 return value; 9245 case -1618432855: // identifier 9246 this.identifier = castToIdentifier(value); // Identifier 9247 return value; 9248 case 351608024: // version 9249 this.version = castToString(value); // StringType 9250 return value; 9251 case 3373707: // name 9252 this.name = castToString(value); // StringType 9253 return value; 9254 case 110371416: // title 9255 this.title = castToString(value); // StringType 9256 return value; 9257 case -892481550: // status 9258 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 9259 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 9260 return value; 9261 case -404562712: // experimental 9262 this.experimental = castToBoolean(value); // BooleanType 9263 return value; 9264 case 3076014: // date 9265 this.date = castToDateTime(value); // DateTimeType 9266 return value; 9267 case 1447404028: // publisher 9268 this.publisher = castToString(value); // StringType 9269 return value; 9270 case 951526432: // contact 9271 this.getContact().add(castToContactDetail(value)); // ContactDetail 9272 return value; 9273 case -1724546052: // description 9274 this.description = castToMarkdown(value); // MarkdownType 9275 return value; 9276 case -669707736: // useContext 9277 this.getUseContext().add(castToUsageContext(value)); // UsageContext 9278 return value; 9279 case -507075711: // jurisdiction 9280 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 9281 return value; 9282 case -220463842: // purpose 9283 this.purpose = castToMarkdown(value); // MarkdownType 9284 return value; 9285 case 1522889671: // copyright 9286 this.copyright = castToMarkdown(value); // MarkdownType 9287 return value; 9288 case -1008619738: // origin 9289 this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent 9290 return value; 9291 case -1429847026: // destination 9292 this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent 9293 return value; 9294 case -450004177: // metadata 9295 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 9296 return value; 9297 case -843449847: // fixture 9298 this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent 9299 return value; 9300 case -309425751: // profile 9301 this.getProfile().add(castToReference(value)); // Reference 9302 return value; 9303 case -1249586564: // variable 9304 this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent 9305 return value; 9306 case 109329021: // setup 9307 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 9308 return value; 9309 case 3556498: // test 9310 this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent 9311 return value; 9312 case -1663474172: // teardown 9313 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 9314 return value; 9315 default: return super.setProperty(hash, name, value); 9316 } 9317 9318 } 9319 9320 @Override 9321 public Base setProperty(String name, Base value) throws FHIRException { 9322 if (name.equals("url")) { 9323 this.url = castToUri(value); // UriType 9324 } else if (name.equals("identifier")) { 9325 this.identifier = castToIdentifier(value); // Identifier 9326 } else if (name.equals("version")) { 9327 this.version = castToString(value); // StringType 9328 } else if (name.equals("name")) { 9329 this.name = castToString(value); // StringType 9330 } else if (name.equals("title")) { 9331 this.title = castToString(value); // StringType 9332 } else if (name.equals("status")) { 9333 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 9334 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 9335 } else if (name.equals("experimental")) { 9336 this.experimental = castToBoolean(value); // BooleanType 9337 } else if (name.equals("date")) { 9338 this.date = castToDateTime(value); // DateTimeType 9339 } else if (name.equals("publisher")) { 9340 this.publisher = castToString(value); // StringType 9341 } else if (name.equals("contact")) { 9342 this.getContact().add(castToContactDetail(value)); 9343 } else if (name.equals("description")) { 9344 this.description = castToMarkdown(value); // MarkdownType 9345 } else if (name.equals("useContext")) { 9346 this.getUseContext().add(castToUsageContext(value)); 9347 } else if (name.equals("jurisdiction")) { 9348 this.getJurisdiction().add(castToCodeableConcept(value)); 9349 } else if (name.equals("purpose")) { 9350 this.purpose = castToMarkdown(value); // MarkdownType 9351 } else if (name.equals("copyright")) { 9352 this.copyright = castToMarkdown(value); // MarkdownType 9353 } else if (name.equals("origin")) { 9354 this.getOrigin().add((TestScriptOriginComponent) value); 9355 } else if (name.equals("destination")) { 9356 this.getDestination().add((TestScriptDestinationComponent) value); 9357 } else if (name.equals("metadata")) { 9358 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 9359 } else if (name.equals("fixture")) { 9360 this.getFixture().add((TestScriptFixtureComponent) value); 9361 } else if (name.equals("profile")) { 9362 this.getProfile().add(castToReference(value)); 9363 } else if (name.equals("variable")) { 9364 this.getVariable().add((TestScriptVariableComponent) value); 9365 } else if (name.equals("setup")) { 9366 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 9367 } else if (name.equals("test")) { 9368 this.getTest().add((TestScriptTestComponent) value); 9369 } else if (name.equals("teardown")) { 9370 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 9371 } else 9372 return super.setProperty(name, value); 9373 return value; 9374 } 9375 9376 @Override 9377 public Base makeProperty(int hash, String name) throws FHIRException { 9378 switch (hash) { 9379 case 116079: return getUrlElement(); 9380 case -1618432855: return getIdentifier(); 9381 case 351608024: return getVersionElement(); 9382 case 3373707: return getNameElement(); 9383 case 110371416: return getTitleElement(); 9384 case -892481550: return getStatusElement(); 9385 case -404562712: return getExperimentalElement(); 9386 case 3076014: return getDateElement(); 9387 case 1447404028: return getPublisherElement(); 9388 case 951526432: return addContact(); 9389 case -1724546052: return getDescriptionElement(); 9390 case -669707736: return addUseContext(); 9391 case -507075711: return addJurisdiction(); 9392 case -220463842: return getPurposeElement(); 9393 case 1522889671: return getCopyrightElement(); 9394 case -1008619738: return addOrigin(); 9395 case -1429847026: return addDestination(); 9396 case -450004177: return getMetadata(); 9397 case -843449847: return addFixture(); 9398 case -309425751: return addProfile(); 9399 case -1249586564: return addVariable(); 9400 case 109329021: return getSetup(); 9401 case 3556498: return addTest(); 9402 case -1663474172: return getTeardown(); 9403 default: return super.makeProperty(hash, name); 9404 } 9405 9406 } 9407 9408 @Override 9409 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9410 switch (hash) { 9411 case 116079: /*url*/ return new String[] {"uri"}; 9412 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 9413 case 351608024: /*version*/ return new String[] {"string"}; 9414 case 3373707: /*name*/ return new String[] {"string"}; 9415 case 110371416: /*title*/ return new String[] {"string"}; 9416 case -892481550: /*status*/ return new String[] {"code"}; 9417 case -404562712: /*experimental*/ return new String[] {"boolean"}; 9418 case 3076014: /*date*/ return new String[] {"dateTime"}; 9419 case 1447404028: /*publisher*/ return new String[] {"string"}; 9420 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 9421 case -1724546052: /*description*/ return new String[] {"markdown"}; 9422 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 9423 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 9424 case -220463842: /*purpose*/ return new String[] {"markdown"}; 9425 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 9426 case -1008619738: /*origin*/ return new String[] {}; 9427 case -1429847026: /*destination*/ return new String[] {}; 9428 case -450004177: /*metadata*/ return new String[] {}; 9429 case -843449847: /*fixture*/ return new String[] {}; 9430 case -309425751: /*profile*/ return new String[] {"Reference"}; 9431 case -1249586564: /*variable*/ return new String[] {}; 9432 case 109329021: /*setup*/ return new String[] {}; 9433 case 3556498: /*test*/ return new String[] {}; 9434 case -1663474172: /*teardown*/ return new String[] {}; 9435 default: return super.getTypesForProperty(hash, name); 9436 } 9437 9438 } 9439 9440 @Override 9441 public Base addChild(String name) throws FHIRException { 9442 if (name.equals("url")) { 9443 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 9444 } 9445 else if (name.equals("identifier")) { 9446 this.identifier = new Identifier(); 9447 return this.identifier; 9448 } 9449 else if (name.equals("version")) { 9450 throw new FHIRException("Cannot call addChild on a primitive type TestScript.version"); 9451 } 9452 else if (name.equals("name")) { 9453 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 9454 } 9455 else if (name.equals("title")) { 9456 throw new FHIRException("Cannot call addChild on a primitive type TestScript.title"); 9457 } 9458 else if (name.equals("status")) { 9459 throw new FHIRException("Cannot call addChild on a primitive type TestScript.status"); 9460 } 9461 else if (name.equals("experimental")) { 9462 throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental"); 9463 } 9464 else if (name.equals("date")) { 9465 throw new FHIRException("Cannot call addChild on a primitive type TestScript.date"); 9466 } 9467 else if (name.equals("publisher")) { 9468 throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher"); 9469 } 9470 else if (name.equals("contact")) { 9471 return addContact(); 9472 } 9473 else if (name.equals("description")) { 9474 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 9475 } 9476 else if (name.equals("useContext")) { 9477 return addUseContext(); 9478 } 9479 else if (name.equals("jurisdiction")) { 9480 return addJurisdiction(); 9481 } 9482 else if (name.equals("purpose")) { 9483 throw new FHIRException("Cannot call addChild on a primitive type TestScript.purpose"); 9484 } 9485 else if (name.equals("copyright")) { 9486 throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright"); 9487 } 9488 else if (name.equals("origin")) { 9489 return addOrigin(); 9490 } 9491 else if (name.equals("destination")) { 9492 return addDestination(); 9493 } 9494 else if (name.equals("metadata")) { 9495 this.metadata = new TestScriptMetadataComponent(); 9496 return this.metadata; 9497 } 9498 else if (name.equals("fixture")) { 9499 return addFixture(); 9500 } 9501 else if (name.equals("profile")) { 9502 return addProfile(); 9503 } 9504 else if (name.equals("variable")) { 9505 return addVariable(); 9506 } 9507 else if (name.equals("setup")) { 9508 this.setup = new TestScriptSetupComponent(); 9509 return this.setup; 9510 } 9511 else if (name.equals("test")) { 9512 return addTest(); 9513 } 9514 else if (name.equals("teardown")) { 9515 this.teardown = new TestScriptTeardownComponent(); 9516 return this.teardown; 9517 } 9518 else 9519 return super.addChild(name); 9520 } 9521 9522 public String fhirType() { 9523 return "TestScript"; 9524 9525 } 9526 9527 public TestScript copy() { 9528 TestScript dst = new TestScript(); 9529 copyValues(dst); 9530 return dst; 9531 } 9532 9533 public void copyValues(TestScript dst) { 9534 super.copyValues(dst); 9535 dst.url = url == null ? null : url.copy(); 9536 dst.identifier = identifier == null ? null : identifier.copy(); 9537 dst.version = version == null ? null : version.copy(); 9538 dst.name = name == null ? null : name.copy(); 9539 dst.title = title == null ? null : title.copy(); 9540 dst.status = status == null ? null : status.copy(); 9541 dst.experimental = experimental == null ? null : experimental.copy(); 9542 dst.date = date == null ? null : date.copy(); 9543 dst.publisher = publisher == null ? null : publisher.copy(); 9544 if (contact != null) { 9545 dst.contact = new ArrayList<ContactDetail>(); 9546 for (ContactDetail i : contact) 9547 dst.contact.add(i.copy()); 9548 }; 9549 dst.description = description == null ? null : description.copy(); 9550 if (useContext != null) { 9551 dst.useContext = new ArrayList<UsageContext>(); 9552 for (UsageContext i : useContext) 9553 dst.useContext.add(i.copy()); 9554 }; 9555 if (jurisdiction != null) { 9556 dst.jurisdiction = new ArrayList<CodeableConcept>(); 9557 for (CodeableConcept i : jurisdiction) 9558 dst.jurisdiction.add(i.copy()); 9559 }; 9560 dst.purpose = purpose == null ? null : purpose.copy(); 9561 dst.copyright = copyright == null ? null : copyright.copy(); 9562 if (origin != null) { 9563 dst.origin = new ArrayList<TestScriptOriginComponent>(); 9564 for (TestScriptOriginComponent i : origin) 9565 dst.origin.add(i.copy()); 9566 }; 9567 if (destination != null) { 9568 dst.destination = new ArrayList<TestScriptDestinationComponent>(); 9569 for (TestScriptDestinationComponent i : destination) 9570 dst.destination.add(i.copy()); 9571 }; 9572 dst.metadata = metadata == null ? null : metadata.copy(); 9573 if (fixture != null) { 9574 dst.fixture = new ArrayList<TestScriptFixtureComponent>(); 9575 for (TestScriptFixtureComponent i : fixture) 9576 dst.fixture.add(i.copy()); 9577 }; 9578 if (profile != null) { 9579 dst.profile = new ArrayList<Reference>(); 9580 for (Reference i : profile) 9581 dst.profile.add(i.copy()); 9582 }; 9583 if (variable != null) { 9584 dst.variable = new ArrayList<TestScriptVariableComponent>(); 9585 for (TestScriptVariableComponent i : variable) 9586 dst.variable.add(i.copy()); 9587 }; 9588 dst.setup = setup == null ? null : setup.copy(); 9589 if (test != null) { 9590 dst.test = new ArrayList<TestScriptTestComponent>(); 9591 for (TestScriptTestComponent i : test) 9592 dst.test.add(i.copy()); 9593 }; 9594 dst.teardown = teardown == null ? null : teardown.copy(); 9595 } 9596 9597 protected TestScript typedCopy() { 9598 return copy(); 9599 } 9600 9601 @Override 9602 public boolean equalsDeep(Base other_) { 9603 if (!super.equalsDeep(other_)) 9604 return false; 9605 if (!(other_ instanceof TestScript)) 9606 return false; 9607 TestScript o = (TestScript) other_; 9608 return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true) 9609 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true) 9610 && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true) 9611 && compareDeep(setup, o.setup, true) && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true) 9612 ; 9613 } 9614 9615 @Override 9616 public boolean equalsShallow(Base other_) { 9617 if (!super.equalsShallow(other_)) 9618 return false; 9619 if (!(other_ instanceof TestScript)) 9620 return false; 9621 TestScript o = (TestScript) other_; 9622 return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true); 9623 } 9624 9625 public boolean isEmpty() { 9626 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright 9627 , origin, destination, metadata, fixture, profile, variable, setup, test, teardown 9628 ); 9629 } 9630 9631 @Override 9632 public ResourceType getResourceType() { 9633 return ResourceType.TestScript; 9634 } 9635 9636 /** 9637 * Search parameter: <b>date</b> 9638 * <p> 9639 * Description: <b>The test script publication date</b><br> 9640 * Type: <b>date</b><br> 9641 * Path: <b>TestScript.date</b><br> 9642 * </p> 9643 */ 9644 @SearchParamDefinition(name="date", path="TestScript.date", description="The test script publication date", type="date" ) 9645 public static final String SP_DATE = "date"; 9646 /** 9647 * <b>Fluent Client</b> search parameter constant for <b>date</b> 9648 * <p> 9649 * Description: <b>The test script publication date</b><br> 9650 * Type: <b>date</b><br> 9651 * Path: <b>TestScript.date</b><br> 9652 * </p> 9653 */ 9654 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 9655 9656 /** 9657 * Search parameter: <b>identifier</b> 9658 * <p> 9659 * Description: <b>External identifier for the test script</b><br> 9660 * Type: <b>token</b><br> 9661 * Path: <b>TestScript.identifier</b><br> 9662 * </p> 9663 */ 9664 @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier for the test script", type="token" ) 9665 public static final String SP_IDENTIFIER = "identifier"; 9666 /** 9667 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 9668 * <p> 9669 * Description: <b>External identifier for the test script</b><br> 9670 * Type: <b>token</b><br> 9671 * Path: <b>TestScript.identifier</b><br> 9672 * </p> 9673 */ 9674 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 9675 9676 /** 9677 * Search parameter: <b>context-type-value</b> 9678 * <p> 9679 * Description: <b>A use context type and value assigned to the test script</b><br> 9680 * Type: <b>composite</b><br> 9681 * Path: <b></b><br> 9682 * </p> 9683 */ 9684 @SearchParamDefinition(name="context-type-value", path="TestScript.useContext", description="A use context type and value assigned to the test script", type="composite", compositeOf={"context-type", "context"} ) 9685 public static final String SP_CONTEXT_TYPE_VALUE = "context-type-value"; 9686 /** 9687 * <b>Fluent Client</b> search parameter constant for <b>context-type-value</b> 9688 * <p> 9689 * Description: <b>A use context type and value assigned to the test script</b><br> 9690 * Type: <b>composite</b><br> 9691 * Path: <b></b><br> 9692 * </p> 9693 */ 9694 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam> CONTEXT_TYPE_VALUE = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.TokenClientParam>(SP_CONTEXT_TYPE_VALUE); 9695 9696 /** 9697 * Search parameter: <b>jurisdiction</b> 9698 * <p> 9699 * Description: <b>Intended jurisdiction for the test script</b><br> 9700 * Type: <b>token</b><br> 9701 * Path: <b>TestScript.jurisdiction</b><br> 9702 * </p> 9703 */ 9704 @SearchParamDefinition(name="jurisdiction", path="TestScript.jurisdiction", description="Intended jurisdiction for the test script", type="token" ) 9705 public static final String SP_JURISDICTION = "jurisdiction"; 9706 /** 9707 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 9708 * <p> 9709 * Description: <b>Intended jurisdiction for the test script</b><br> 9710 * Type: <b>token</b><br> 9711 * Path: <b>TestScript.jurisdiction</b><br> 9712 * </p> 9713 */ 9714 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 9715 9716 /** 9717 * Search parameter: <b>description</b> 9718 * <p> 9719 * Description: <b>The description of the test script</b><br> 9720 * Type: <b>string</b><br> 9721 * Path: <b>TestScript.description</b><br> 9722 * </p> 9723 */ 9724 @SearchParamDefinition(name="description", path="TestScript.description", description="The description of the test script", type="string" ) 9725 public static final String SP_DESCRIPTION = "description"; 9726 /** 9727 * <b>Fluent Client</b> search parameter constant for <b>description</b> 9728 * <p> 9729 * Description: <b>The description of the test script</b><br> 9730 * Type: <b>string</b><br> 9731 * Path: <b>TestScript.description</b><br> 9732 * </p> 9733 */ 9734 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 9735 9736 /** 9737 * Search parameter: <b>testscript-capability</b> 9738 * <p> 9739 * Description: <b>TestScript required and validated capability</b><br> 9740 * Type: <b>string</b><br> 9741 * Path: <b>TestScript.metadata.capability.description</b><br> 9742 * </p> 9743 */ 9744 @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" ) 9745 public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability"; 9746 /** 9747 * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b> 9748 * <p> 9749 * Description: <b>TestScript required and validated capability</b><br> 9750 * Type: <b>string</b><br> 9751 * Path: <b>TestScript.metadata.capability.description</b><br> 9752 * </p> 9753 */ 9754 public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY); 9755 9756 /** 9757 * Search parameter: <b>context-type</b> 9758 * <p> 9759 * Description: <b>A type of use context assigned to the test script</b><br> 9760 * Type: <b>token</b><br> 9761 * Path: <b>TestScript.useContext.code</b><br> 9762 * </p> 9763 */ 9764 @SearchParamDefinition(name="context-type", path="TestScript.useContext.code", description="A type of use context assigned to the test script", type="token" ) 9765 public static final String SP_CONTEXT_TYPE = "context-type"; 9766 /** 9767 * <b>Fluent Client</b> search parameter constant for <b>context-type</b> 9768 * <p> 9769 * Description: <b>A type of use context assigned to the test script</b><br> 9770 * Type: <b>token</b><br> 9771 * Path: <b>TestScript.useContext.code</b><br> 9772 * </p> 9773 */ 9774 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT_TYPE); 9775 9776 /** 9777 * Search parameter: <b>title</b> 9778 * <p> 9779 * Description: <b>The human-friendly name of the test script</b><br> 9780 * Type: <b>string</b><br> 9781 * Path: <b>TestScript.title</b><br> 9782 * </p> 9783 */ 9784 @SearchParamDefinition(name="title", path="TestScript.title", description="The human-friendly name of the test script", type="string" ) 9785 public static final String SP_TITLE = "title"; 9786 /** 9787 * <b>Fluent Client</b> search parameter constant for <b>title</b> 9788 * <p> 9789 * Description: <b>The human-friendly name of the test script</b><br> 9790 * Type: <b>string</b><br> 9791 * Path: <b>TestScript.title</b><br> 9792 * </p> 9793 */ 9794 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 9795 9796 /** 9797 * Search parameter: <b>version</b> 9798 * <p> 9799 * Description: <b>The business version of the test script</b><br> 9800 * Type: <b>token</b><br> 9801 * Path: <b>TestScript.version</b><br> 9802 * </p> 9803 */ 9804 @SearchParamDefinition(name="version", path="TestScript.version", description="The business version of the test script", type="token" ) 9805 public static final String SP_VERSION = "version"; 9806 /** 9807 * <b>Fluent Client</b> search parameter constant for <b>version</b> 9808 * <p> 9809 * Description: <b>The business version of the test script</b><br> 9810 * Type: <b>token</b><br> 9811 * Path: <b>TestScript.version</b><br> 9812 * </p> 9813 */ 9814 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 9815 9816 /** 9817 * Search parameter: <b>url</b> 9818 * <p> 9819 * Description: <b>The uri that identifies the test script</b><br> 9820 * Type: <b>uri</b><br> 9821 * Path: <b>TestScript.url</b><br> 9822 * </p> 9823 */ 9824 @SearchParamDefinition(name="url", path="TestScript.url", description="The uri that identifies the test script", type="uri" ) 9825 public static final String SP_URL = "url"; 9826 /** 9827 * <b>Fluent Client</b> search parameter constant for <b>url</b> 9828 * <p> 9829 * Description: <b>The uri that identifies the test script</b><br> 9830 * Type: <b>uri</b><br> 9831 * Path: <b>TestScript.url</b><br> 9832 * </p> 9833 */ 9834 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 9835 9836 /** 9837 * Search parameter: <b>context-quantity</b> 9838 * <p> 9839 * Description: <b>A quantity- or range-valued use context assigned to the test script</b><br> 9840 * Type: <b>quantity</b><br> 9841 * Path: <b>TestScript.useContext.valueQuantity, TestScript.useContext.valueRange</b><br> 9842 * </p> 9843 */ 9844 @SearchParamDefinition(name="context-quantity", path="(TestScript.useContext.value as Quantity) | (TestScript.useContext.value as Range)", description="A quantity- or range-valued use context assigned to the test script", type="quantity" ) 9845 public static final String SP_CONTEXT_QUANTITY = "context-quantity"; 9846 /** 9847 * <b>Fluent Client</b> search parameter constant for <b>context-quantity</b> 9848 * <p> 9849 * Description: <b>A quantity- or range-valued use context assigned to the test script</b><br> 9850 * Type: <b>quantity</b><br> 9851 * Path: <b>TestScript.useContext.valueQuantity, TestScript.useContext.valueRange</b><br> 9852 * </p> 9853 */ 9854 public static final ca.uhn.fhir.rest.gclient.QuantityClientParam CONTEXT_QUANTITY = new ca.uhn.fhir.rest.gclient.QuantityClientParam(SP_CONTEXT_QUANTITY); 9855 9856 /** 9857 * Search parameter: <b>name</b> 9858 * <p> 9859 * Description: <b>Computationally friendly name of the test script</b><br> 9860 * Type: <b>string</b><br> 9861 * Path: <b>TestScript.name</b><br> 9862 * </p> 9863 */ 9864 @SearchParamDefinition(name="name", path="TestScript.name", description="Computationally friendly name of the test script", type="string" ) 9865 public static final String SP_NAME = "name"; 9866 /** 9867 * <b>Fluent Client</b> search parameter constant for <b>name</b> 9868 * <p> 9869 * Description: <b>Computationally friendly name of the test script</b><br> 9870 * Type: <b>string</b><br> 9871 * Path: <b>TestScript.name</b><br> 9872 * </p> 9873 */ 9874 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 9875 9876 /** 9877 * Search parameter: <b>context</b> 9878 * <p> 9879 * Description: <b>A use context assigned to the test script</b><br> 9880 * Type: <b>token</b><br> 9881 * Path: <b>TestScript.useContext.valueCodeableConcept</b><br> 9882 * </p> 9883 */ 9884 @SearchParamDefinition(name="context", path="(TestScript.useContext.value as CodeableConcept)", description="A use context assigned to the test script", type="token" ) 9885 public static final String SP_CONTEXT = "context"; 9886 /** 9887 * <b>Fluent Client</b> search parameter constant for <b>context</b> 9888 * <p> 9889 * Description: <b>A use context assigned to the test script</b><br> 9890 * Type: <b>token</b><br> 9891 * Path: <b>TestScript.useContext.valueCodeableConcept</b><br> 9892 * </p> 9893 */ 9894 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 9895 9896 /** 9897 * Search parameter: <b>publisher</b> 9898 * <p> 9899 * Description: <b>Name of the publisher of the test script</b><br> 9900 * Type: <b>string</b><br> 9901 * Path: <b>TestScript.publisher</b><br> 9902 * </p> 9903 */ 9904 @SearchParamDefinition(name="publisher", path="TestScript.publisher", description="Name of the publisher of the test script", type="string" ) 9905 public static final String SP_PUBLISHER = "publisher"; 9906 /** 9907 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 9908 * <p> 9909 * Description: <b>Name of the publisher of the test script</b><br> 9910 * Type: <b>string</b><br> 9911 * Path: <b>TestScript.publisher</b><br> 9912 * </p> 9913 */ 9914 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 9915 9916 /** 9917 * Search parameter: <b>context-type-quantity</b> 9918 * <p> 9919 * Description: <b>A use context type and quantity- or range-based value assigned to the test script</b><br> 9920 * Type: <b>composite</b><br> 9921 * Path: <b></b><br> 9922 * </p> 9923 */ 9924 @SearchParamDefinition(name="context-type-quantity", path="TestScript.useContext", description="A use context type and quantity- or range-based value assigned to the test script", type="composite", compositeOf={"context-type", "context-quantity"} ) 9925 public static final String SP_CONTEXT_TYPE_QUANTITY = "context-type-quantity"; 9926 /** 9927 * <b>Fluent Client</b> search parameter constant for <b>context-type-quantity</b> 9928 * <p> 9929 * Description: <b>A use context type and quantity- or range-based value assigned to the test script</b><br> 9930 * Type: <b>composite</b><br> 9931 * Path: <b></b><br> 9932 * </p> 9933 */ 9934 public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam> CONTEXT_TYPE_QUANTITY = new ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.TokenClientParam, ca.uhn.fhir.rest.gclient.QuantityClientParam>(SP_CONTEXT_TYPE_QUANTITY); 9935 9936 /** 9937 * Search parameter: <b>status</b> 9938 * <p> 9939 * Description: <b>The current status of the test script</b><br> 9940 * Type: <b>token</b><br> 9941 * Path: <b>TestScript.status</b><br> 9942 * </p> 9943 */ 9944 @SearchParamDefinition(name="status", path="TestScript.status", description="The current status of the test script", type="token" ) 9945 public static final String SP_STATUS = "status"; 9946 /** 9947 * <b>Fluent Client</b> search parameter constant for <b>status</b> 9948 * <p> 9949 * Description: <b>The current status of the test script</b><br> 9950 * Type: <b>token</b><br> 9951 * Path: <b>TestScript.status</b><br> 9952 * </p> 9953 */ 9954 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 9955 9956 9957}