001package org.hl7.fhir.dstu3.model; 002 003/*- 004 * #%L 005 * org.hl7.fhir.dstu3 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023/* 024 Copyright (c) 2011+, HL7, Inc. 025 All rights reserved. 026 027 Redistribution and use in source and binary forms, with or without modification, 028 are permitted provided that the following conditions are met: 029 030 * Redistributions of source code must retain the above copyright notice, this 031 list of conditions and the following disclaimer. 032 * Redistributions in binary form must reproduce the above copyright notice, 033 this list of conditions and the following disclaimer in the documentation 034 and/or other materials provided with the distribution. 035 * Neither the name of HL7 nor the names of its contributors may be used to 036 endorse or promote products derived from this software without specific 037 prior written permission. 038 039 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 040 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 041 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 042 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 043 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 044 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 045 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 046 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 047 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 048 POSSIBILITY OF SUCH DAMAGE. 049 050*/ 051 052// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x 053import java.util.ArrayList; 054import java.util.Date; 055import java.util.List; 056 057import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus; 058import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory; 059import org.hl7.fhir.exceptions.FHIRException; 060import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 061import org.hl7.fhir.utilities.Utilities; 062 063import ca.uhn.fhir.model.api.annotation.Block; 064import ca.uhn.fhir.model.api.annotation.Child; 065import ca.uhn.fhir.model.api.annotation.ChildOrder; 066import ca.uhn.fhir.model.api.annotation.Description; 067import ca.uhn.fhir.model.api.annotation.ResourceDef; 068import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 069/** 070 * A structured set of tests against a FHIR server implementation to determine compliance against the FHIR specification. 071 */ 072@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/Profile/TestScript") 073@ChildOrder(names={"url", "identifier", "version", "name", "title", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "purpose", "copyright", "origin", "destination", "metadata", "fixture", "profile", "variable", "rule", "ruleset", "setup", "test", "teardown"}) 074public class TestScript extends MetadataResource { 075 076 public enum ContentType { 077 /** 078 * XML content-type corresponding to the application/fhir+xml mime-type. 079 */ 080 XML, 081 /** 082 * JSON content-type corresponding to the application/fhir+json mime-type. 083 */ 084 JSON, 085 /** 086 * RDF content-type corresponding to the text/turtle mime-type. 087 */ 088 TTL, 089 /** 090 * Prevent the use of the corresponding http header. 091 */ 092 NONE, 093 /** 094 * added to help the parsers with the generic types 095 */ 096 NULL; 097 public static ContentType fromCode(String codeString) throws FHIRException { 098 if (codeString == null || "".equals(codeString)) 099 return null; 100 if ("xml".equals(codeString)) 101 return XML; 102 if ("json".equals(codeString)) 103 return JSON; 104 if ("ttl".equals(codeString)) 105 return TTL; 106 if ("none".equals(codeString)) 107 return NONE; 108 if (Configuration.isAcceptInvalidEnums()) 109 return null; 110 else 111 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 112 } 113 public String toCode() { 114 switch (this) { 115 case XML: return "xml"; 116 case JSON: return "json"; 117 case TTL: return "ttl"; 118 case NONE: return "none"; 119 default: return "?"; 120 } 121 } 122 public String getSystem() { 123 switch (this) { 124 case XML: return "http://hl7.org/fhir/content-type"; 125 case JSON: return "http://hl7.org/fhir/content-type"; 126 case TTL: return "http://hl7.org/fhir/content-type"; 127 case NONE: return "http://hl7.org/fhir/content-type"; 128 default: return "?"; 129 } 130 } 131 public String getDefinition() { 132 switch (this) { 133 case XML: return "XML content-type corresponding to the application/fhir+xml mime-type."; 134 case JSON: return "JSON content-type corresponding to the application/fhir+json mime-type."; 135 case TTL: return "RDF content-type corresponding to the text/turtle mime-type."; 136 case NONE: return "Prevent the use of the corresponding http header."; 137 default: return "?"; 138 } 139 } 140 public String getDisplay() { 141 switch (this) { 142 case XML: return "xml"; 143 case JSON: return "json"; 144 case TTL: return "ttl"; 145 case NONE: return "none"; 146 default: return "?"; 147 } 148 } 149 } 150 151 public static class ContentTypeEnumFactory implements EnumFactory<ContentType> { 152 public ContentType fromCode(String codeString) throws IllegalArgumentException { 153 if (codeString == null || "".equals(codeString)) 154 if (codeString == null || "".equals(codeString)) 155 return null; 156 if ("xml".equals(codeString)) 157 return ContentType.XML; 158 if ("json".equals(codeString)) 159 return ContentType.JSON; 160 if ("ttl".equals(codeString)) 161 return ContentType.TTL; 162 if ("none".equals(codeString)) 163 return ContentType.NONE; 164 throw new IllegalArgumentException("Unknown ContentType code '"+codeString+"'"); 165 } 166 public Enumeration<ContentType> fromType(Base code) throws FHIRException { 167 if (code == null) 168 return null; 169 if (code.isEmpty()) 170 return new Enumeration<ContentType>(this); 171 String codeString = ((PrimitiveType) code).asStringValue(); 172 if (codeString == null || "".equals(codeString)) 173 return null; 174 if ("xml".equals(codeString)) 175 return new Enumeration<ContentType>(this, ContentType.XML); 176 if ("json".equals(codeString)) 177 return new Enumeration<ContentType>(this, ContentType.JSON); 178 if ("ttl".equals(codeString)) 179 return new Enumeration<ContentType>(this, ContentType.TTL); 180 if ("none".equals(codeString)) 181 return new Enumeration<ContentType>(this, ContentType.NONE); 182 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 183 } 184 public String toCode(ContentType code) { 185 if (code == ContentType.XML) 186 return "xml"; 187 if (code == ContentType.JSON) 188 return "json"; 189 if (code == ContentType.TTL) 190 return "ttl"; 191 if (code == ContentType.NONE) 192 return "none"; 193 return "?"; 194 } 195 public String toSystem(ContentType code) { 196 return code.getSystem(); 197 } 198 } 199 200 public enum AssertionDirectionType { 201 /** 202 * The assertion is evaluated on the response. This is the default value. 203 */ 204 RESPONSE, 205 /** 206 * The assertion is evaluated on the request. 207 */ 208 REQUEST, 209 /** 210 * added to help the parsers with the generic types 211 */ 212 NULL; 213 public static AssertionDirectionType fromCode(String codeString) throws FHIRException { 214 if (codeString == null || "".equals(codeString)) 215 return null; 216 if ("response".equals(codeString)) 217 return RESPONSE; 218 if ("request".equals(codeString)) 219 return REQUEST; 220 if (Configuration.isAcceptInvalidEnums()) 221 return null; 222 else 223 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 224 } 225 public String toCode() { 226 switch (this) { 227 case RESPONSE: return "response"; 228 case REQUEST: return "request"; 229 default: return "?"; 230 } 231 } 232 public String getSystem() { 233 switch (this) { 234 case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes"; 235 case REQUEST: return "http://hl7.org/fhir/assert-direction-codes"; 236 default: return "?"; 237 } 238 } 239 public String getDefinition() { 240 switch (this) { 241 case RESPONSE: return "The assertion is evaluated on the response. This is the default value."; 242 case REQUEST: return "The assertion is evaluated on the request."; 243 default: return "?"; 244 } 245 } 246 public String getDisplay() { 247 switch (this) { 248 case RESPONSE: return "response"; 249 case REQUEST: return "request"; 250 default: return "?"; 251 } 252 } 253 } 254 255 public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> { 256 public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException { 257 if (codeString == null || "".equals(codeString)) 258 if (codeString == null || "".equals(codeString)) 259 return null; 260 if ("response".equals(codeString)) 261 return AssertionDirectionType.RESPONSE; 262 if ("request".equals(codeString)) 263 return AssertionDirectionType.REQUEST; 264 throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'"); 265 } 266 public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException { 267 if (code == null) 268 return null; 269 if (code.isEmpty()) 270 return new Enumeration<AssertionDirectionType>(this); 271 String codeString = ((PrimitiveType) code).asStringValue(); 272 if (codeString == null || "".equals(codeString)) 273 return null; 274 if ("response".equals(codeString)) 275 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE); 276 if ("request".equals(codeString)) 277 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST); 278 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 279 } 280 public String toCode(AssertionDirectionType code) { 281 if (code == AssertionDirectionType.RESPONSE) 282 return "response"; 283 if (code == AssertionDirectionType.REQUEST) 284 return "request"; 285 return "?"; 286 } 287 public String toSystem(AssertionDirectionType code) { 288 return code.getSystem(); 289 } 290 } 291 292 public enum AssertionOperatorType { 293 /** 294 * Default value. Equals comparison. 295 */ 296 EQUALS, 297 /** 298 * Not equals comparison. 299 */ 300 NOTEQUALS, 301 /** 302 * Compare value within a known set of values. 303 */ 304 IN, 305 /** 306 * Compare value not within a known set of values. 307 */ 308 NOTIN, 309 /** 310 * Compare value to be greater than a known value. 311 */ 312 GREATERTHAN, 313 /** 314 * Compare value to be less than a known value. 315 */ 316 LESSTHAN, 317 /** 318 * Compare value is empty. 319 */ 320 EMPTY, 321 /** 322 * Compare value is not empty. 323 */ 324 NOTEMPTY, 325 /** 326 * Compare value string contains a known value. 327 */ 328 CONTAINS, 329 /** 330 * Compare value string does not contain a known value. 331 */ 332 NOTCONTAINS, 333 /** 334 * Evaluate the fluentpath expression as a boolean condition. 335 */ 336 EVAL, 337 /** 338 * added to help the parsers with the generic types 339 */ 340 NULL; 341 public static AssertionOperatorType fromCode(String codeString) throws FHIRException { 342 if (codeString == null || "".equals(codeString)) 343 return null; 344 if ("equals".equals(codeString)) 345 return EQUALS; 346 if ("notEquals".equals(codeString)) 347 return NOTEQUALS; 348 if ("in".equals(codeString)) 349 return IN; 350 if ("notIn".equals(codeString)) 351 return NOTIN; 352 if ("greaterThan".equals(codeString)) 353 return GREATERTHAN; 354 if ("lessThan".equals(codeString)) 355 return LESSTHAN; 356 if ("empty".equals(codeString)) 357 return EMPTY; 358 if ("notEmpty".equals(codeString)) 359 return NOTEMPTY; 360 if ("contains".equals(codeString)) 361 return CONTAINS; 362 if ("notContains".equals(codeString)) 363 return NOTCONTAINS; 364 if ("eval".equals(codeString)) 365 return EVAL; 366 if (Configuration.isAcceptInvalidEnums()) 367 return null; 368 else 369 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 370 } 371 public String toCode() { 372 switch (this) { 373 case EQUALS: return "equals"; 374 case NOTEQUALS: return "notEquals"; 375 case IN: return "in"; 376 case NOTIN: return "notIn"; 377 case GREATERTHAN: return "greaterThan"; 378 case LESSTHAN: return "lessThan"; 379 case EMPTY: return "empty"; 380 case NOTEMPTY: return "notEmpty"; 381 case CONTAINS: return "contains"; 382 case NOTCONTAINS: return "notContains"; 383 case EVAL: return "eval"; 384 default: return "?"; 385 } 386 } 387 public String getSystem() { 388 switch (this) { 389 case EQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 390 case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 391 case IN: return "http://hl7.org/fhir/assert-operator-codes"; 392 case NOTIN: return "http://hl7.org/fhir/assert-operator-codes"; 393 case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 394 case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 395 case EMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 396 case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 397 case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 398 case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 399 case EVAL: return "http://hl7.org/fhir/assert-operator-codes"; 400 default: return "?"; 401 } 402 } 403 public String getDefinition() { 404 switch (this) { 405 case EQUALS: return "Default value. Equals comparison."; 406 case NOTEQUALS: return "Not equals comparison."; 407 case IN: return "Compare value within a known set of values."; 408 case NOTIN: return "Compare value not within a known set of values."; 409 case GREATERTHAN: return "Compare value to be greater than a known value."; 410 case LESSTHAN: return "Compare value to be less than a known value."; 411 case EMPTY: return "Compare value is empty."; 412 case NOTEMPTY: return "Compare value is not empty."; 413 case CONTAINS: return "Compare value string contains a known value."; 414 case NOTCONTAINS: return "Compare value string does not contain a known value."; 415 case EVAL: return "Evaluate the fluentpath expression as a boolean condition."; 416 default: return "?"; 417 } 418 } 419 public String getDisplay() { 420 switch (this) { 421 case EQUALS: return "equals"; 422 case NOTEQUALS: return "notEquals"; 423 case IN: return "in"; 424 case NOTIN: return "notIn"; 425 case GREATERTHAN: return "greaterThan"; 426 case LESSTHAN: return "lessThan"; 427 case EMPTY: return "empty"; 428 case NOTEMPTY: return "notEmpty"; 429 case CONTAINS: return "contains"; 430 case NOTCONTAINS: return "notContains"; 431 case EVAL: return "evaluate"; 432 default: return "?"; 433 } 434 } 435 } 436 437 public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> { 438 public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException { 439 if (codeString == null || "".equals(codeString)) 440 if (codeString == null || "".equals(codeString)) 441 return null; 442 if ("equals".equals(codeString)) 443 return AssertionOperatorType.EQUALS; 444 if ("notEquals".equals(codeString)) 445 return AssertionOperatorType.NOTEQUALS; 446 if ("in".equals(codeString)) 447 return AssertionOperatorType.IN; 448 if ("notIn".equals(codeString)) 449 return AssertionOperatorType.NOTIN; 450 if ("greaterThan".equals(codeString)) 451 return AssertionOperatorType.GREATERTHAN; 452 if ("lessThan".equals(codeString)) 453 return AssertionOperatorType.LESSTHAN; 454 if ("empty".equals(codeString)) 455 return AssertionOperatorType.EMPTY; 456 if ("notEmpty".equals(codeString)) 457 return AssertionOperatorType.NOTEMPTY; 458 if ("contains".equals(codeString)) 459 return AssertionOperatorType.CONTAINS; 460 if ("notContains".equals(codeString)) 461 return AssertionOperatorType.NOTCONTAINS; 462 if ("eval".equals(codeString)) 463 return AssertionOperatorType.EVAL; 464 throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'"); 465 } 466 public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException { 467 if (code == null) 468 return null; 469 if (code.isEmpty()) 470 return new Enumeration<AssertionOperatorType>(this); 471 String codeString = ((PrimitiveType) code).asStringValue(); 472 if (codeString == null || "".equals(codeString)) 473 return null; 474 if ("equals".equals(codeString)) 475 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS); 476 if ("notEquals".equals(codeString)) 477 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS); 478 if ("in".equals(codeString)) 479 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN); 480 if ("notIn".equals(codeString)) 481 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN); 482 if ("greaterThan".equals(codeString)) 483 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN); 484 if ("lessThan".equals(codeString)) 485 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN); 486 if ("empty".equals(codeString)) 487 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY); 488 if ("notEmpty".equals(codeString)) 489 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY); 490 if ("contains".equals(codeString)) 491 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS); 492 if ("notContains".equals(codeString)) 493 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS); 494 if ("eval".equals(codeString)) 495 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EVAL); 496 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 497 } 498 public String toCode(AssertionOperatorType code) { 499 if (code == AssertionOperatorType.EQUALS) 500 return "equals"; 501 if (code == AssertionOperatorType.NOTEQUALS) 502 return "notEquals"; 503 if (code == AssertionOperatorType.IN) 504 return "in"; 505 if (code == AssertionOperatorType.NOTIN) 506 return "notIn"; 507 if (code == AssertionOperatorType.GREATERTHAN) 508 return "greaterThan"; 509 if (code == AssertionOperatorType.LESSTHAN) 510 return "lessThan"; 511 if (code == AssertionOperatorType.EMPTY) 512 return "empty"; 513 if (code == AssertionOperatorType.NOTEMPTY) 514 return "notEmpty"; 515 if (code == AssertionOperatorType.CONTAINS) 516 return "contains"; 517 if (code == AssertionOperatorType.NOTCONTAINS) 518 return "notContains"; 519 if (code == AssertionOperatorType.EVAL) 520 return "eval"; 521 return "?"; 522 } 523 public String toSystem(AssertionOperatorType code) { 524 return code.getSystem(); 525 } 526 } 527 528 public enum TestScriptRequestMethodCode { 529 /** 530 * HTTP DELETE operation 531 */ 532 DELETE, 533 /** 534 * HTTP GET operation 535 */ 536 GET, 537 /** 538 * HTTP OPTIONS operation 539 */ 540 OPTIONS, 541 /** 542 * HTTP PATCH operation 543 */ 544 PATCH, 545 /** 546 * HTTP POST operation 547 */ 548 POST, 549 /** 550 * HTTP PUT operation 551 */ 552 PUT, 553 /** 554 * added to help the parsers with the generic types 555 */ 556 NULL; 557 public static TestScriptRequestMethodCode fromCode(String codeString) throws FHIRException { 558 if (codeString == null || "".equals(codeString)) 559 return null; 560 if ("delete".equals(codeString)) 561 return DELETE; 562 if ("get".equals(codeString)) 563 return GET; 564 if ("options".equals(codeString)) 565 return OPTIONS; 566 if ("patch".equals(codeString)) 567 return PATCH; 568 if ("post".equals(codeString)) 569 return POST; 570 if ("put".equals(codeString)) 571 return PUT; 572 if (Configuration.isAcceptInvalidEnums()) 573 return null; 574 else 575 throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 576 } 577 public String toCode() { 578 switch (this) { 579 case DELETE: return "delete"; 580 case GET: return "get"; 581 case OPTIONS: return "options"; 582 case PATCH: return "patch"; 583 case POST: return "post"; 584 case PUT: return "put"; 585 default: return "?"; 586 } 587 } 588 public String getSystem() { 589 switch (this) { 590 case DELETE: return "http://hl7.org/fhir/http-operations"; 591 case GET: return "http://hl7.org/fhir/http-operations"; 592 case OPTIONS: return "http://hl7.org/fhir/http-operations"; 593 case PATCH: return "http://hl7.org/fhir/http-operations"; 594 case POST: return "http://hl7.org/fhir/http-operations"; 595 case PUT: return "http://hl7.org/fhir/http-operations"; 596 default: return "?"; 597 } 598 } 599 public String getDefinition() { 600 switch (this) { 601 case DELETE: return "HTTP DELETE operation"; 602 case GET: return "HTTP GET operation"; 603 case OPTIONS: return "HTTP OPTIONS operation"; 604 case PATCH: return "HTTP PATCH operation"; 605 case POST: return "HTTP POST operation"; 606 case PUT: return "HTTP PUT operation"; 607 default: return "?"; 608 } 609 } 610 public String getDisplay() { 611 switch (this) { 612 case DELETE: return "DELETE"; 613 case GET: return "GET"; 614 case OPTIONS: return "OPTIONS"; 615 case PATCH: return "PATCH"; 616 case POST: return "POST"; 617 case PUT: return "PUT"; 618 default: return "?"; 619 } 620 } 621 } 622 623 public static class TestScriptRequestMethodCodeEnumFactory implements EnumFactory<TestScriptRequestMethodCode> { 624 public TestScriptRequestMethodCode fromCode(String codeString) throws IllegalArgumentException { 625 if (codeString == null || "".equals(codeString)) 626 if (codeString == null || "".equals(codeString)) 627 return null; 628 if ("delete".equals(codeString)) 629 return TestScriptRequestMethodCode.DELETE; 630 if ("get".equals(codeString)) 631 return TestScriptRequestMethodCode.GET; 632 if ("options".equals(codeString)) 633 return TestScriptRequestMethodCode.OPTIONS; 634 if ("patch".equals(codeString)) 635 return TestScriptRequestMethodCode.PATCH; 636 if ("post".equals(codeString)) 637 return TestScriptRequestMethodCode.POST; 638 if ("put".equals(codeString)) 639 return TestScriptRequestMethodCode.PUT; 640 throw new IllegalArgumentException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 641 } 642 public Enumeration<TestScriptRequestMethodCode> fromType(Base code) throws FHIRException { 643 if (code == null) 644 return null; 645 if (code.isEmpty()) 646 return new Enumeration<TestScriptRequestMethodCode>(this); 647 String codeString = ((PrimitiveType) code).asStringValue(); 648 if (codeString == null || "".equals(codeString)) 649 return null; 650 if ("delete".equals(codeString)) 651 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.DELETE); 652 if ("get".equals(codeString)) 653 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.GET); 654 if ("options".equals(codeString)) 655 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.OPTIONS); 656 if ("patch".equals(codeString)) 657 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PATCH); 658 if ("post".equals(codeString)) 659 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.POST); 660 if ("put".equals(codeString)) 661 return new Enumeration<TestScriptRequestMethodCode>(this, TestScriptRequestMethodCode.PUT); 662 throw new FHIRException("Unknown TestScriptRequestMethodCode code '"+codeString+"'"); 663 } 664 public String toCode(TestScriptRequestMethodCode code) { 665 if (code == TestScriptRequestMethodCode.DELETE) 666 return "delete"; 667 if (code == TestScriptRequestMethodCode.GET) 668 return "get"; 669 if (code == TestScriptRequestMethodCode.OPTIONS) 670 return "options"; 671 if (code == TestScriptRequestMethodCode.PATCH) 672 return "patch"; 673 if (code == TestScriptRequestMethodCode.POST) 674 return "post"; 675 if (code == TestScriptRequestMethodCode.PUT) 676 return "put"; 677 return "?"; 678 } 679 public String toSystem(TestScriptRequestMethodCode code) { 680 return code.getSystem(); 681 } 682 } 683 684 public enum AssertionResponseTypes { 685 /** 686 * Response code is 200. 687 */ 688 OKAY, 689 /** 690 * Response code is 201. 691 */ 692 CREATED, 693 /** 694 * Response code is 204. 695 */ 696 NOCONTENT, 697 /** 698 * Response code is 304. 699 */ 700 NOTMODIFIED, 701 /** 702 * Response code is 400. 703 */ 704 BAD, 705 /** 706 * Response code is 403. 707 */ 708 FORBIDDEN, 709 /** 710 * Response code is 404. 711 */ 712 NOTFOUND, 713 /** 714 * Response code is 405. 715 */ 716 METHODNOTALLOWED, 717 /** 718 * Response code is 409. 719 */ 720 CONFLICT, 721 /** 722 * Response code is 410. 723 */ 724 GONE, 725 /** 726 * Response code is 412. 727 */ 728 PRECONDITIONFAILED, 729 /** 730 * Response code is 422. 731 */ 732 UNPROCESSABLE, 733 /** 734 * added to help the parsers with the generic types 735 */ 736 NULL; 737 public static AssertionResponseTypes fromCode(String codeString) throws FHIRException { 738 if (codeString == null || "".equals(codeString)) 739 return null; 740 if ("okay".equals(codeString)) 741 return OKAY; 742 if ("created".equals(codeString)) 743 return CREATED; 744 if ("noContent".equals(codeString)) 745 return NOCONTENT; 746 if ("notModified".equals(codeString)) 747 return NOTMODIFIED; 748 if ("bad".equals(codeString)) 749 return BAD; 750 if ("forbidden".equals(codeString)) 751 return FORBIDDEN; 752 if ("notFound".equals(codeString)) 753 return NOTFOUND; 754 if ("methodNotAllowed".equals(codeString)) 755 return METHODNOTALLOWED; 756 if ("conflict".equals(codeString)) 757 return CONFLICT; 758 if ("gone".equals(codeString)) 759 return GONE; 760 if ("preconditionFailed".equals(codeString)) 761 return PRECONDITIONFAILED; 762 if ("unprocessable".equals(codeString)) 763 return UNPROCESSABLE; 764 if (Configuration.isAcceptInvalidEnums()) 765 return null; 766 else 767 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 768 } 769 public String toCode() { 770 switch (this) { 771 case OKAY: return "okay"; 772 case CREATED: return "created"; 773 case NOCONTENT: return "noContent"; 774 case NOTMODIFIED: return "notModified"; 775 case BAD: return "bad"; 776 case FORBIDDEN: return "forbidden"; 777 case NOTFOUND: return "notFound"; 778 case METHODNOTALLOWED: return "methodNotAllowed"; 779 case CONFLICT: return "conflict"; 780 case GONE: return "gone"; 781 case PRECONDITIONFAILED: return "preconditionFailed"; 782 case UNPROCESSABLE: return "unprocessable"; 783 default: return "?"; 784 } 785 } 786 public String getSystem() { 787 switch (this) { 788 case OKAY: return "http://hl7.org/fhir/assert-response-code-types"; 789 case CREATED: return "http://hl7.org/fhir/assert-response-code-types"; 790 case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types"; 791 case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types"; 792 case BAD: return "http://hl7.org/fhir/assert-response-code-types"; 793 case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types"; 794 case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types"; 795 case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types"; 796 case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types"; 797 case GONE: return "http://hl7.org/fhir/assert-response-code-types"; 798 case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types"; 799 case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types"; 800 default: return "?"; 801 } 802 } 803 public String getDefinition() { 804 switch (this) { 805 case OKAY: return "Response code is 200."; 806 case CREATED: return "Response code is 201."; 807 case NOCONTENT: return "Response code is 204."; 808 case NOTMODIFIED: return "Response code is 304."; 809 case BAD: return "Response code is 400."; 810 case FORBIDDEN: return "Response code is 403."; 811 case NOTFOUND: return "Response code is 404."; 812 case METHODNOTALLOWED: return "Response code is 405."; 813 case CONFLICT: return "Response code is 409."; 814 case GONE: return "Response code is 410."; 815 case PRECONDITIONFAILED: return "Response code is 412."; 816 case UNPROCESSABLE: return "Response code is 422."; 817 default: return "?"; 818 } 819 } 820 public String getDisplay() { 821 switch (this) { 822 case OKAY: return "okay"; 823 case CREATED: return "created"; 824 case NOCONTENT: return "noContent"; 825 case NOTMODIFIED: return "notModified"; 826 case BAD: return "bad"; 827 case FORBIDDEN: return "forbidden"; 828 case NOTFOUND: return "notFound"; 829 case METHODNOTALLOWED: return "methodNotAllowed"; 830 case CONFLICT: return "conflict"; 831 case GONE: return "gone"; 832 case PRECONDITIONFAILED: return "preconditionFailed"; 833 case UNPROCESSABLE: return "unprocessable"; 834 default: return "?"; 835 } 836 } 837 } 838 839 public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> { 840 public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException { 841 if (codeString == null || "".equals(codeString)) 842 if (codeString == null || "".equals(codeString)) 843 return null; 844 if ("okay".equals(codeString)) 845 return AssertionResponseTypes.OKAY; 846 if ("created".equals(codeString)) 847 return AssertionResponseTypes.CREATED; 848 if ("noContent".equals(codeString)) 849 return AssertionResponseTypes.NOCONTENT; 850 if ("notModified".equals(codeString)) 851 return AssertionResponseTypes.NOTMODIFIED; 852 if ("bad".equals(codeString)) 853 return AssertionResponseTypes.BAD; 854 if ("forbidden".equals(codeString)) 855 return AssertionResponseTypes.FORBIDDEN; 856 if ("notFound".equals(codeString)) 857 return AssertionResponseTypes.NOTFOUND; 858 if ("methodNotAllowed".equals(codeString)) 859 return AssertionResponseTypes.METHODNOTALLOWED; 860 if ("conflict".equals(codeString)) 861 return AssertionResponseTypes.CONFLICT; 862 if ("gone".equals(codeString)) 863 return AssertionResponseTypes.GONE; 864 if ("preconditionFailed".equals(codeString)) 865 return AssertionResponseTypes.PRECONDITIONFAILED; 866 if ("unprocessable".equals(codeString)) 867 return AssertionResponseTypes.UNPROCESSABLE; 868 throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'"); 869 } 870 public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException { 871 if (code == null) 872 return null; 873 if (code.isEmpty()) 874 return new Enumeration<AssertionResponseTypes>(this); 875 String codeString = ((PrimitiveType) code).asStringValue(); 876 if (codeString == null || "".equals(codeString)) 877 return null; 878 if ("okay".equals(codeString)) 879 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY); 880 if ("created".equals(codeString)) 881 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED); 882 if ("noContent".equals(codeString)) 883 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT); 884 if ("notModified".equals(codeString)) 885 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED); 886 if ("bad".equals(codeString)) 887 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD); 888 if ("forbidden".equals(codeString)) 889 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN); 890 if ("notFound".equals(codeString)) 891 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND); 892 if ("methodNotAllowed".equals(codeString)) 893 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED); 894 if ("conflict".equals(codeString)) 895 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT); 896 if ("gone".equals(codeString)) 897 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE); 898 if ("preconditionFailed".equals(codeString)) 899 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED); 900 if ("unprocessable".equals(codeString)) 901 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE); 902 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 903 } 904 public String toCode(AssertionResponseTypes code) { 905 if (code == AssertionResponseTypes.OKAY) 906 return "okay"; 907 if (code == AssertionResponseTypes.CREATED) 908 return "created"; 909 if (code == AssertionResponseTypes.NOCONTENT) 910 return "noContent"; 911 if (code == AssertionResponseTypes.NOTMODIFIED) 912 return "notModified"; 913 if (code == AssertionResponseTypes.BAD) 914 return "bad"; 915 if (code == AssertionResponseTypes.FORBIDDEN) 916 return "forbidden"; 917 if (code == AssertionResponseTypes.NOTFOUND) 918 return "notFound"; 919 if (code == AssertionResponseTypes.METHODNOTALLOWED) 920 return "methodNotAllowed"; 921 if (code == AssertionResponseTypes.CONFLICT) 922 return "conflict"; 923 if (code == AssertionResponseTypes.GONE) 924 return "gone"; 925 if (code == AssertionResponseTypes.PRECONDITIONFAILED) 926 return "preconditionFailed"; 927 if (code == AssertionResponseTypes.UNPROCESSABLE) 928 return "unprocessable"; 929 return "?"; 930 } 931 public String toSystem(AssertionResponseTypes code) { 932 return code.getSystem(); 933 } 934 } 935 936 @Block() 937 public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement { 938 /** 939 * Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 940 */ 941 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 942 @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." ) 943 protected IntegerType index; 944 945 /** 946 * The type of origin profile the test system supports. 947 */ 948 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 949 @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." ) 950 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-origin-types") 951 protected Coding profile; 952 953 private static final long serialVersionUID = -1239935149L; 954 955 /** 956 * Constructor 957 */ 958 public TestScriptOriginComponent() { 959 super(); 960 } 961 962 /** 963 * Constructor 964 */ 965 public TestScriptOriginComponent(IntegerType index, Coding profile) { 966 super(); 967 this.index = index; 968 this.profile = profile; 969 } 970 971 /** 972 * @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 973 */ 974 public IntegerType getIndexElement() { 975 if (this.index == null) 976 if (Configuration.errorOnAutoCreate()) 977 throw new Error("Attempt to auto-create TestScriptOriginComponent.index"); 978 else if (Configuration.doAutoCreate()) 979 this.index = new IntegerType(); // bb 980 return this.index; 981 } 982 983 public boolean hasIndexElement() { 984 return this.index != null && !this.index.isEmpty(); 985 } 986 987 public boolean hasIndex() { 988 return this.index != null && !this.index.isEmpty(); 989 } 990 991 /** 992 * @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 993 */ 994 public TestScriptOriginComponent setIndexElement(IntegerType value) { 995 this.index = value; 996 return this; 997 } 998 999 /** 1000 * @return Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 1001 */ 1002 public int getIndex() { 1003 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 1004 } 1005 1006 /** 1007 * @param value Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 1008 */ 1009 public TestScriptOriginComponent setIndex(int value) { 1010 if (this.index == null) 1011 this.index = new IntegerType(); 1012 this.index.setValue(value); 1013 return this; 1014 } 1015 1016 /** 1017 * @return {@link #profile} (The type of origin profile the test system supports.) 1018 */ 1019 public Coding getProfile() { 1020 if (this.profile == null) 1021 if (Configuration.errorOnAutoCreate()) 1022 throw new Error("Attempt to auto-create TestScriptOriginComponent.profile"); 1023 else if (Configuration.doAutoCreate()) 1024 this.profile = new Coding(); // cc 1025 return this.profile; 1026 } 1027 1028 public boolean hasProfile() { 1029 return this.profile != null && !this.profile.isEmpty(); 1030 } 1031 1032 /** 1033 * @param value {@link #profile} (The type of origin profile the test system supports.) 1034 */ 1035 public TestScriptOriginComponent setProfile(Coding value) { 1036 this.profile = value; 1037 return this; 1038 } 1039 1040 protected void listChildren(List<Property> children) { 1041 super.listChildren(children); 1042 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)); 1043 children.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile)); 1044 } 1045 1046 @Override 1047 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1048 switch (_hash) { 1049 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); 1050 case -309425751: /*profile*/ return new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, 1, profile); 1051 default: return super.getNamedProperty(_hash, _name, _checkValid); 1052 } 1053 1054 } 1055 1056 @Override 1057 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1058 switch (hash) { 1059 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1060 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1061 default: return super.getProperty(hash, name, checkValid); 1062 } 1063 1064 } 1065 1066 @Override 1067 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1068 switch (hash) { 1069 case 100346066: // index 1070 this.index = castToInteger(value); // IntegerType 1071 return value; 1072 case -309425751: // profile 1073 this.profile = castToCoding(value); // Coding 1074 return value; 1075 default: return super.setProperty(hash, name, value); 1076 } 1077 1078 } 1079 1080 @Override 1081 public Base setProperty(String name, Base value) throws FHIRException { 1082 if (name.equals("index")) { 1083 this.index = castToInteger(value); // IntegerType 1084 } else if (name.equals("profile")) { 1085 this.profile = castToCoding(value); // Coding 1086 } else 1087 return super.setProperty(name, value); 1088 return value; 1089 } 1090 1091 @Override 1092 public Base makeProperty(int hash, String name) throws FHIRException { 1093 switch (hash) { 1094 case 100346066: return getIndexElement(); 1095 case -309425751: return getProfile(); 1096 default: return super.makeProperty(hash, name); 1097 } 1098 1099 } 1100 1101 @Override 1102 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1103 switch (hash) { 1104 case 100346066: /*index*/ return new String[] {"integer"}; 1105 case -309425751: /*profile*/ return new String[] {"Coding"}; 1106 default: return super.getTypesForProperty(hash, name); 1107 } 1108 1109 } 1110 1111 @Override 1112 public Base addChild(String name) throws FHIRException { 1113 if (name.equals("index")) { 1114 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1115 } 1116 else if (name.equals("profile")) { 1117 this.profile = new Coding(); 1118 return this.profile; 1119 } 1120 else 1121 return super.addChild(name); 1122 } 1123 1124 public TestScriptOriginComponent copy() { 1125 TestScriptOriginComponent dst = new TestScriptOriginComponent(); 1126 copyValues(dst); 1127 dst.index = index == null ? null : index.copy(); 1128 dst.profile = profile == null ? null : profile.copy(); 1129 return dst; 1130 } 1131 1132 @Override 1133 public boolean equalsDeep(Base other_) { 1134 if (!super.equalsDeep(other_)) 1135 return false; 1136 if (!(other_ instanceof TestScriptOriginComponent)) 1137 return false; 1138 TestScriptOriginComponent o = (TestScriptOriginComponent) other_; 1139 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1140 } 1141 1142 @Override 1143 public boolean equalsShallow(Base other_) { 1144 if (!super.equalsShallow(other_)) 1145 return false; 1146 if (!(other_ instanceof TestScriptOriginComponent)) 1147 return false; 1148 TestScriptOriginComponent o = (TestScriptOriginComponent) other_; 1149 return compareValues(index, o.index, true); 1150 } 1151 1152 public boolean isEmpty() { 1153 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile); 1154 } 1155 1156 public String fhirType() { 1157 return "TestScript.origin"; 1158 1159 } 1160 1161 } 1162 1163 @Block() 1164 public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement { 1165 /** 1166 * Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1167 */ 1168 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1169 @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." ) 1170 protected IntegerType index; 1171 1172 /** 1173 * The type of destination profile the test system supports. 1174 */ 1175 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 1176 @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." ) 1177 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-profile-destination-types") 1178 protected Coding profile; 1179 1180 private static final long serialVersionUID = -1239935149L; 1181 1182 /** 1183 * Constructor 1184 */ 1185 public TestScriptDestinationComponent() { 1186 super(); 1187 } 1188 1189 /** 1190 * Constructor 1191 */ 1192 public TestScriptDestinationComponent(IntegerType index, Coding profile) { 1193 super(); 1194 this.index = index; 1195 this.profile = profile; 1196 } 1197 1198 /** 1199 * @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 1200 */ 1201 public IntegerType getIndexElement() { 1202 if (this.index == null) 1203 if (Configuration.errorOnAutoCreate()) 1204 throw new Error("Attempt to auto-create TestScriptDestinationComponent.index"); 1205 else if (Configuration.doAutoCreate()) 1206 this.index = new IntegerType(); // bb 1207 return this.index; 1208 } 1209 1210 public boolean hasIndexElement() { 1211 return this.index != null && !this.index.isEmpty(); 1212 } 1213 1214 public boolean hasIndex() { 1215 return this.index != null && !this.index.isEmpty(); 1216 } 1217 1218 /** 1219 * @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 1220 */ 1221 public TestScriptDestinationComponent setIndexElement(IntegerType value) { 1222 this.index = value; 1223 return this; 1224 } 1225 1226 /** 1227 * @return Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1228 */ 1229 public int getIndex() { 1230 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 1231 } 1232 1233 /** 1234 * @param value Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1235 */ 1236 public TestScriptDestinationComponent setIndex(int value) { 1237 if (this.index == null) 1238 this.index = new IntegerType(); 1239 this.index.setValue(value); 1240 return this; 1241 } 1242 1243 /** 1244 * @return {@link #profile} (The type of destination profile the test system supports.) 1245 */ 1246 public Coding getProfile() { 1247 if (this.profile == null) 1248 if (Configuration.errorOnAutoCreate()) 1249 throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile"); 1250 else if (Configuration.doAutoCreate()) 1251 this.profile = new Coding(); // cc 1252 return this.profile; 1253 } 1254 1255 public boolean hasProfile() { 1256 return this.profile != null && !this.profile.isEmpty(); 1257 } 1258 1259 /** 1260 * @param value {@link #profile} (The type of destination profile the test system supports.) 1261 */ 1262 public TestScriptDestinationComponent setProfile(Coding value) { 1263 this.profile = value; 1264 return this; 1265 } 1266 1267 protected void listChildren(List<Property> children) { 1268 super.listChildren(children); 1269 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)); 1270 children.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile)); 1271 } 1272 1273 @Override 1274 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1275 switch (_hash) { 1276 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); 1277 case -309425751: /*profile*/ return new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, 1, profile); 1278 default: return super.getNamedProperty(_hash, _name, _checkValid); 1279 } 1280 1281 } 1282 1283 @Override 1284 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1285 switch (hash) { 1286 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1287 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1288 default: return super.getProperty(hash, name, checkValid); 1289 } 1290 1291 } 1292 1293 @Override 1294 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1295 switch (hash) { 1296 case 100346066: // index 1297 this.index = castToInteger(value); // IntegerType 1298 return value; 1299 case -309425751: // profile 1300 this.profile = castToCoding(value); // Coding 1301 return value; 1302 default: return super.setProperty(hash, name, value); 1303 } 1304 1305 } 1306 1307 @Override 1308 public Base setProperty(String name, Base value) throws FHIRException { 1309 if (name.equals("index")) { 1310 this.index = castToInteger(value); // IntegerType 1311 } else if (name.equals("profile")) { 1312 this.profile = castToCoding(value); // Coding 1313 } else 1314 return super.setProperty(name, value); 1315 return value; 1316 } 1317 1318 @Override 1319 public Base makeProperty(int hash, String name) throws FHIRException { 1320 switch (hash) { 1321 case 100346066: return getIndexElement(); 1322 case -309425751: return getProfile(); 1323 default: return super.makeProperty(hash, name); 1324 } 1325 1326 } 1327 1328 @Override 1329 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1330 switch (hash) { 1331 case 100346066: /*index*/ return new String[] {"integer"}; 1332 case -309425751: /*profile*/ return new String[] {"Coding"}; 1333 default: return super.getTypesForProperty(hash, name); 1334 } 1335 1336 } 1337 1338 @Override 1339 public Base addChild(String name) throws FHIRException { 1340 if (name.equals("index")) { 1341 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1342 } 1343 else if (name.equals("profile")) { 1344 this.profile = new Coding(); 1345 return this.profile; 1346 } 1347 else 1348 return super.addChild(name); 1349 } 1350 1351 public TestScriptDestinationComponent copy() { 1352 TestScriptDestinationComponent dst = new TestScriptDestinationComponent(); 1353 copyValues(dst); 1354 dst.index = index == null ? null : index.copy(); 1355 dst.profile = profile == null ? null : profile.copy(); 1356 return dst; 1357 } 1358 1359 @Override 1360 public boolean equalsDeep(Base other_) { 1361 if (!super.equalsDeep(other_)) 1362 return false; 1363 if (!(other_ instanceof TestScriptDestinationComponent)) 1364 return false; 1365 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_; 1366 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1367 } 1368 1369 @Override 1370 public boolean equalsShallow(Base other_) { 1371 if (!super.equalsShallow(other_)) 1372 return false; 1373 if (!(other_ instanceof TestScriptDestinationComponent)) 1374 return false; 1375 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other_; 1376 return compareValues(index, o.index, true); 1377 } 1378 1379 public boolean isEmpty() { 1380 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(index, profile); 1381 } 1382 1383 public String fhirType() { 1384 return "TestScript.destination"; 1385 1386 } 1387 1388 } 1389 1390 @Block() 1391 public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement { 1392 /** 1393 * A link to the FHIR specification that this test is covering. 1394 */ 1395 @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1396 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." ) 1397 protected List<TestScriptMetadataLinkComponent> link; 1398 1399 /** 1400 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 1401 */ 1402 @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1403 @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." ) 1404 protected List<TestScriptMetadataCapabilityComponent> capability; 1405 1406 private static final long serialVersionUID = 745183328L; 1407 1408 /** 1409 * Constructor 1410 */ 1411 public TestScriptMetadataComponent() { 1412 super(); 1413 } 1414 1415 /** 1416 * @return {@link #link} (A link to the FHIR specification that this test is covering.) 1417 */ 1418 public List<TestScriptMetadataLinkComponent> getLink() { 1419 if (this.link == null) 1420 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1421 return this.link; 1422 } 1423 1424 /** 1425 * @return Returns a reference to <code>this</code> for easy method chaining 1426 */ 1427 public TestScriptMetadataComponent setLink(List<TestScriptMetadataLinkComponent> theLink) { 1428 this.link = theLink; 1429 return this; 1430 } 1431 1432 public boolean hasLink() { 1433 if (this.link == null) 1434 return false; 1435 for (TestScriptMetadataLinkComponent item : this.link) 1436 if (!item.isEmpty()) 1437 return true; 1438 return false; 1439 } 1440 1441 public TestScriptMetadataLinkComponent addLink() { //3 1442 TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent(); 1443 if (this.link == null) 1444 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1445 this.link.add(t); 1446 return t; 1447 } 1448 1449 public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3 1450 if (t == null) 1451 return this; 1452 if (this.link == null) 1453 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1454 this.link.add(t); 1455 return this; 1456 } 1457 1458 /** 1459 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist 1460 */ 1461 public TestScriptMetadataLinkComponent getLinkFirstRep() { 1462 if (getLink().isEmpty()) { 1463 addLink(); 1464 } 1465 return getLink().get(0); 1466 } 1467 1468 /** 1469 * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 1470 */ 1471 public List<TestScriptMetadataCapabilityComponent> getCapability() { 1472 if (this.capability == null) 1473 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1474 return this.capability; 1475 } 1476 1477 /** 1478 * @return Returns a reference to <code>this</code> for easy method chaining 1479 */ 1480 public TestScriptMetadataComponent setCapability(List<TestScriptMetadataCapabilityComponent> theCapability) { 1481 this.capability = theCapability; 1482 return this; 1483 } 1484 1485 public boolean hasCapability() { 1486 if (this.capability == null) 1487 return false; 1488 for (TestScriptMetadataCapabilityComponent item : this.capability) 1489 if (!item.isEmpty()) 1490 return true; 1491 return false; 1492 } 1493 1494 public TestScriptMetadataCapabilityComponent addCapability() { //3 1495 TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent(); 1496 if (this.capability == null) 1497 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1498 this.capability.add(t); 1499 return t; 1500 } 1501 1502 public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3 1503 if (t == null) 1504 return this; 1505 if (this.capability == null) 1506 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1507 this.capability.add(t); 1508 return this; 1509 } 1510 1511 /** 1512 * @return The first repetition of repeating field {@link #capability}, creating it if it does not already exist 1513 */ 1514 public TestScriptMetadataCapabilityComponent getCapabilityFirstRep() { 1515 if (getCapability().isEmpty()) { 1516 addCapability(); 1517 } 1518 return getCapability().get(0); 1519 } 1520 1521 protected void listChildren(List<Property> children) { 1522 super.listChildren(children); 1523 children.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link)); 1524 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)); 1525 } 1526 1527 @Override 1528 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1529 switch (_hash) { 1530 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); 1531 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); 1532 default: return super.getNamedProperty(_hash, _name, _checkValid); 1533 } 1534 1535 } 1536 1537 @Override 1538 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1539 switch (hash) { 1540 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent 1541 case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent 1542 default: return super.getProperty(hash, name, checkValid); 1543 } 1544 1545 } 1546 1547 @Override 1548 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1549 switch (hash) { 1550 case 3321850: // link 1551 this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent 1552 return value; 1553 case -783669992: // capability 1554 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent 1555 return value; 1556 default: return super.setProperty(hash, name, value); 1557 } 1558 1559 } 1560 1561 @Override 1562 public Base setProperty(String name, Base value) throws FHIRException { 1563 if (name.equals("link")) { 1564 this.getLink().add((TestScriptMetadataLinkComponent) value); 1565 } else if (name.equals("capability")) { 1566 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); 1567 } else 1568 return super.setProperty(name, value); 1569 return value; 1570 } 1571 1572 @Override 1573 public Base makeProperty(int hash, String name) throws FHIRException { 1574 switch (hash) { 1575 case 3321850: return addLink(); 1576 case -783669992: return addCapability(); 1577 default: return super.makeProperty(hash, name); 1578 } 1579 1580 } 1581 1582 @Override 1583 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1584 switch (hash) { 1585 case 3321850: /*link*/ return new String[] {}; 1586 case -783669992: /*capability*/ return new String[] {}; 1587 default: return super.getTypesForProperty(hash, name); 1588 } 1589 1590 } 1591 1592 @Override 1593 public Base addChild(String name) throws FHIRException { 1594 if (name.equals("link")) { 1595 return addLink(); 1596 } 1597 else if (name.equals("capability")) { 1598 return addCapability(); 1599 } 1600 else 1601 return super.addChild(name); 1602 } 1603 1604 public TestScriptMetadataComponent copy() { 1605 TestScriptMetadataComponent dst = new TestScriptMetadataComponent(); 1606 copyValues(dst); 1607 if (link != null) { 1608 dst.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1609 for (TestScriptMetadataLinkComponent i : link) 1610 dst.link.add(i.copy()); 1611 }; 1612 if (capability != null) { 1613 dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1614 for (TestScriptMetadataCapabilityComponent i : capability) 1615 dst.capability.add(i.copy()); 1616 }; 1617 return dst; 1618 } 1619 1620 @Override 1621 public boolean equalsDeep(Base other_) { 1622 if (!super.equalsDeep(other_)) 1623 return false; 1624 if (!(other_ instanceof TestScriptMetadataComponent)) 1625 return false; 1626 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_; 1627 return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true); 1628 } 1629 1630 @Override 1631 public boolean equalsShallow(Base other_) { 1632 if (!super.equalsShallow(other_)) 1633 return false; 1634 if (!(other_ instanceof TestScriptMetadataComponent)) 1635 return false; 1636 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other_; 1637 return true; 1638 } 1639 1640 public boolean isEmpty() { 1641 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, capability); 1642 } 1643 1644 public String fhirType() { 1645 return "TestScript.metadata"; 1646 1647 } 1648 1649 } 1650 1651 @Block() 1652 public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement { 1653 /** 1654 * URL to a particular requirement or feature within the FHIR specification. 1655 */ 1656 @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1657 @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." ) 1658 protected UriType url; 1659 1660 /** 1661 * Short description of the link. 1662 */ 1663 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1664 @Description(shortDefinition="Short description", formalDefinition="Short description of the link." ) 1665 protected StringType description; 1666 1667 private static final long serialVersionUID = 213372298L; 1668 1669 /** 1670 * Constructor 1671 */ 1672 public TestScriptMetadataLinkComponent() { 1673 super(); 1674 } 1675 1676 /** 1677 * Constructor 1678 */ 1679 public TestScriptMetadataLinkComponent(UriType url) { 1680 super(); 1681 this.url = url; 1682 } 1683 1684 /** 1685 * @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 1686 */ 1687 public UriType getUrlElement() { 1688 if (this.url == null) 1689 if (Configuration.errorOnAutoCreate()) 1690 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url"); 1691 else if (Configuration.doAutoCreate()) 1692 this.url = new UriType(); // bb 1693 return this.url; 1694 } 1695 1696 public boolean hasUrlElement() { 1697 return this.url != null && !this.url.isEmpty(); 1698 } 1699 1700 public boolean hasUrl() { 1701 return this.url != null && !this.url.isEmpty(); 1702 } 1703 1704 /** 1705 * @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 1706 */ 1707 public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 1708 this.url = value; 1709 return this; 1710 } 1711 1712 /** 1713 * @return URL to a particular requirement or feature within the FHIR specification. 1714 */ 1715 public String getUrl() { 1716 return this.url == null ? null : this.url.getValue(); 1717 } 1718 1719 /** 1720 * @param value URL to a particular requirement or feature within the FHIR specification. 1721 */ 1722 public TestScriptMetadataLinkComponent setUrl(String value) { 1723 if (this.url == null) 1724 this.url = new UriType(); 1725 this.url.setValue(value); 1726 return this; 1727 } 1728 1729 /** 1730 * @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 1731 */ 1732 public StringType getDescriptionElement() { 1733 if (this.description == null) 1734 if (Configuration.errorOnAutoCreate()) 1735 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description"); 1736 else if (Configuration.doAutoCreate()) 1737 this.description = new StringType(); // bb 1738 return this.description; 1739 } 1740 1741 public boolean hasDescriptionElement() { 1742 return this.description != null && !this.description.isEmpty(); 1743 } 1744 1745 public boolean hasDescription() { 1746 return this.description != null && !this.description.isEmpty(); 1747 } 1748 1749 /** 1750 * @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 1751 */ 1752 public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 1753 this.description = value; 1754 return this; 1755 } 1756 1757 /** 1758 * @return Short description of the link. 1759 */ 1760 public String getDescription() { 1761 return this.description == null ? null : this.description.getValue(); 1762 } 1763 1764 /** 1765 * @param value Short description of the link. 1766 */ 1767 public TestScriptMetadataLinkComponent setDescription(String value) { 1768 if (Utilities.noString(value)) 1769 this.description = null; 1770 else { 1771 if (this.description == null) 1772 this.description = new StringType(); 1773 this.description.setValue(value); 1774 } 1775 return this; 1776 } 1777 1778 protected void listChildren(List<Property> children) { 1779 super.listChildren(children); 1780 children.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url)); 1781 children.add(new Property("description", "string", "Short description of the link.", 0, 1, description)); 1782 } 1783 1784 @Override 1785 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1786 switch (_hash) { 1787 case 116079: /*url*/ return new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, 1, url); 1788 case -1724546052: /*description*/ return new Property("description", "string", "Short description of the link.", 0, 1, description); 1789 default: return super.getNamedProperty(_hash, _name, _checkValid); 1790 } 1791 1792 } 1793 1794 @Override 1795 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1796 switch (hash) { 1797 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1798 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1799 default: return super.getProperty(hash, name, checkValid); 1800 } 1801 1802 } 1803 1804 @Override 1805 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1806 switch (hash) { 1807 case 116079: // url 1808 this.url = castToUri(value); // UriType 1809 return value; 1810 case -1724546052: // description 1811 this.description = castToString(value); // StringType 1812 return value; 1813 default: return super.setProperty(hash, name, value); 1814 } 1815 1816 } 1817 1818 @Override 1819 public Base setProperty(String name, Base value) throws FHIRException { 1820 if (name.equals("url")) { 1821 this.url = castToUri(value); // UriType 1822 } else if (name.equals("description")) { 1823 this.description = castToString(value); // StringType 1824 } else 1825 return super.setProperty(name, value); 1826 return value; 1827 } 1828 1829 @Override 1830 public Base makeProperty(int hash, String name) throws FHIRException { 1831 switch (hash) { 1832 case 116079: return getUrlElement(); 1833 case -1724546052: return getDescriptionElement(); 1834 default: return super.makeProperty(hash, name); 1835 } 1836 1837 } 1838 1839 @Override 1840 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1841 switch (hash) { 1842 case 116079: /*url*/ return new String[] {"uri"}; 1843 case -1724546052: /*description*/ return new String[] {"string"}; 1844 default: return super.getTypesForProperty(hash, name); 1845 } 1846 1847 } 1848 1849 @Override 1850 public Base addChild(String name) throws FHIRException { 1851 if (name.equals("url")) { 1852 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 1853 } 1854 else if (name.equals("description")) { 1855 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 1856 } 1857 else 1858 return super.addChild(name); 1859 } 1860 1861 public TestScriptMetadataLinkComponent copy() { 1862 TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent(); 1863 copyValues(dst); 1864 dst.url = url == null ? null : url.copy(); 1865 dst.description = description == null ? null : description.copy(); 1866 return dst; 1867 } 1868 1869 @Override 1870 public boolean equalsDeep(Base other_) { 1871 if (!super.equalsDeep(other_)) 1872 return false; 1873 if (!(other_ instanceof TestScriptMetadataLinkComponent)) 1874 return false; 1875 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_; 1876 return compareDeep(url, o.url, true) && compareDeep(description, o.description, true); 1877 } 1878 1879 @Override 1880 public boolean equalsShallow(Base other_) { 1881 if (!super.equalsShallow(other_)) 1882 return false; 1883 if (!(other_ instanceof TestScriptMetadataLinkComponent)) 1884 return false; 1885 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other_; 1886 return compareValues(url, o.url, true) && compareValues(description, o.description, true); 1887 } 1888 1889 public boolean isEmpty() { 1890 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(url, description); 1891 } 1892 1893 public String fhirType() { 1894 return "TestScript.metadata.link"; 1895 1896 } 1897 1898 } 1899 1900 @Block() 1901 public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement { 1902 /** 1903 * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1904 */ 1905 @Child(name = "required", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1906 @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." ) 1907 protected BooleanType required; 1908 1909 /** 1910 * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1911 */ 1912 @Child(name = "validated", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1913 @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." ) 1914 protected BooleanType validated; 1915 1916 /** 1917 * Description of the capabilities that this test script is requiring the server to support. 1918 */ 1919 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1920 @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." ) 1921 protected StringType description; 1922 1923 /** 1924 * Which origin server these requirements apply to. 1925 */ 1926 @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1927 @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." ) 1928 protected List<IntegerType> origin; 1929 1930 /** 1931 * Which server these requirements apply to. 1932 */ 1933 @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1934 @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." ) 1935 protected IntegerType destination; 1936 1937 /** 1938 * Links to the FHIR specification that describes this interaction and the resources involved in more detail. 1939 */ 1940 @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1941 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." ) 1942 protected List<UriType> link; 1943 1944 /** 1945 * 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. 1946 */ 1947 @Child(name = "capabilities", type = {CapabilityStatement.class}, order=7, min=1, max=1, modifier=false, summary=false) 1948 @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." ) 1949 protected Reference capabilities; 1950 1951 /** 1952 * The actual object that is the target of the reference (Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.) 1953 */ 1954 protected CapabilityStatement capabilitiesTarget; 1955 1956 private static final long serialVersionUID = -106110735L; 1957 1958 /** 1959 * Constructor 1960 */ 1961 public TestScriptMetadataCapabilityComponent() { 1962 super(); 1963 } 1964 1965 /** 1966 * Constructor 1967 */ 1968 public TestScriptMetadataCapabilityComponent(Reference capabilities) { 1969 super(); 1970 this.capabilities = capabilities; 1971 } 1972 1973 /** 1974 * @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 1975 */ 1976 public BooleanType getRequiredElement() { 1977 if (this.required == null) 1978 if (Configuration.errorOnAutoCreate()) 1979 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required"); 1980 else if (Configuration.doAutoCreate()) 1981 this.required = new BooleanType(); // bb 1982 return this.required; 1983 } 1984 1985 public boolean hasRequiredElement() { 1986 return this.required != null && !this.required.isEmpty(); 1987 } 1988 1989 public boolean hasRequired() { 1990 return this.required != null && !this.required.isEmpty(); 1991 } 1992 1993 /** 1994 * @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 1995 */ 1996 public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 1997 this.required = value; 1998 return this; 1999 } 2000 2001 /** 2002 * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 2003 */ 2004 public boolean getRequired() { 2005 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 2006 } 2007 2008 /** 2009 * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 2010 */ 2011 public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 2012 if (this.required == null) 2013 this.required = new BooleanType(); 2014 this.required.setValue(value); 2015 return this; 2016 } 2017 2018 /** 2019 * @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 2020 */ 2021 public BooleanType getValidatedElement() { 2022 if (this.validated == null) 2023 if (Configuration.errorOnAutoCreate()) 2024 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated"); 2025 else if (Configuration.doAutoCreate()) 2026 this.validated = new BooleanType(); // bb 2027 return this.validated; 2028 } 2029 2030 public boolean hasValidatedElement() { 2031 return this.validated != null && !this.validated.isEmpty(); 2032 } 2033 2034 public boolean hasValidated() { 2035 return this.validated != null && !this.validated.isEmpty(); 2036 } 2037 2038 /** 2039 * @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 2040 */ 2041 public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 2042 this.validated = value; 2043 return this; 2044 } 2045 2046 /** 2047 * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 2048 */ 2049 public boolean getValidated() { 2050 return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue(); 2051 } 2052 2053 /** 2054 * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 2055 */ 2056 public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 2057 if (this.validated == null) 2058 this.validated = new BooleanType(); 2059 this.validated.setValue(value); 2060 return this; 2061 } 2062 2063 /** 2064 * @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 2065 */ 2066 public StringType getDescriptionElement() { 2067 if (this.description == null) 2068 if (Configuration.errorOnAutoCreate()) 2069 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description"); 2070 else if (Configuration.doAutoCreate()) 2071 this.description = new StringType(); // bb 2072 return this.description; 2073 } 2074 2075 public boolean hasDescriptionElement() { 2076 return this.description != null && !this.description.isEmpty(); 2077 } 2078 2079 public boolean hasDescription() { 2080 return this.description != null && !this.description.isEmpty(); 2081 } 2082 2083 /** 2084 * @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 2085 */ 2086 public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 2087 this.description = value; 2088 return this; 2089 } 2090 2091 /** 2092 * @return Description of the capabilities that this test script is requiring the server to support. 2093 */ 2094 public String getDescription() { 2095 return this.description == null ? null : this.description.getValue(); 2096 } 2097 2098 /** 2099 * @param value Description of the capabilities that this test script is requiring the server to support. 2100 */ 2101 public TestScriptMetadataCapabilityComponent setDescription(String value) { 2102 if (Utilities.noString(value)) 2103 this.description = null; 2104 else { 2105 if (this.description == null) 2106 this.description = new StringType(); 2107 this.description.setValue(value); 2108 } 2109 return this; 2110 } 2111 2112 /** 2113 * @return {@link #origin} (Which origin server these requirements apply to.) 2114 */ 2115 public List<IntegerType> getOrigin() { 2116 if (this.origin == null) 2117 this.origin = new ArrayList<IntegerType>(); 2118 return this.origin; 2119 } 2120 2121 /** 2122 * @return Returns a reference to <code>this</code> for easy method chaining 2123 */ 2124 public TestScriptMetadataCapabilityComponent setOrigin(List<IntegerType> theOrigin) { 2125 this.origin = theOrigin; 2126 return this; 2127 } 2128 2129 public boolean hasOrigin() { 2130 if (this.origin == null) 2131 return false; 2132 for (IntegerType item : this.origin) 2133 if (!item.isEmpty()) 2134 return true; 2135 return false; 2136 } 2137 2138 /** 2139 * @return {@link #origin} (Which origin server these requirements apply to.) 2140 */ 2141 public IntegerType addOriginElement() {//2 2142 IntegerType t = new IntegerType(); 2143 if (this.origin == null) 2144 this.origin = new ArrayList<IntegerType>(); 2145 this.origin.add(t); 2146 return t; 2147 } 2148 2149 /** 2150 * @param value {@link #origin} (Which origin server these requirements apply to.) 2151 */ 2152 public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1 2153 IntegerType t = new IntegerType(); 2154 t.setValue(value); 2155 if (this.origin == null) 2156 this.origin = new ArrayList<IntegerType>(); 2157 this.origin.add(t); 2158 return this; 2159 } 2160 2161 /** 2162 * @param value {@link #origin} (Which origin server these requirements apply to.) 2163 */ 2164 public boolean hasOrigin(int value) { 2165 if (this.origin == null) 2166 return false; 2167 for (IntegerType v : this.origin) 2168 if (v.getValue().equals(value)) // integer 2169 return true; 2170 return false; 2171 } 2172 2173 /** 2174 * @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 2175 */ 2176 public IntegerType getDestinationElement() { 2177 if (this.destination == null) 2178 if (Configuration.errorOnAutoCreate()) 2179 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination"); 2180 else if (Configuration.doAutoCreate()) 2181 this.destination = new IntegerType(); // bb 2182 return this.destination; 2183 } 2184 2185 public boolean hasDestinationElement() { 2186 return this.destination != null && !this.destination.isEmpty(); 2187 } 2188 2189 public boolean hasDestination() { 2190 return this.destination != null && !this.destination.isEmpty(); 2191 } 2192 2193 /** 2194 * @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 2195 */ 2196 public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 2197 this.destination = value; 2198 return this; 2199 } 2200 2201 /** 2202 * @return Which server these requirements apply to. 2203 */ 2204 public int getDestination() { 2205 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 2206 } 2207 2208 /** 2209 * @param value Which server these requirements apply to. 2210 */ 2211 public TestScriptMetadataCapabilityComponent setDestination(int value) { 2212 if (this.destination == null) 2213 this.destination = new IntegerType(); 2214 this.destination.setValue(value); 2215 return this; 2216 } 2217 2218 /** 2219 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2220 */ 2221 public List<UriType> getLink() { 2222 if (this.link == null) 2223 this.link = new ArrayList<UriType>(); 2224 return this.link; 2225 } 2226 2227 /** 2228 * @return Returns a reference to <code>this</code> for easy method chaining 2229 */ 2230 public TestScriptMetadataCapabilityComponent setLink(List<UriType> theLink) { 2231 this.link = theLink; 2232 return this; 2233 } 2234 2235 public boolean hasLink() { 2236 if (this.link == null) 2237 return false; 2238 for (UriType item : this.link) 2239 if (!item.isEmpty()) 2240 return true; 2241 return false; 2242 } 2243 2244 /** 2245 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2246 */ 2247 public UriType addLinkElement() {//2 2248 UriType t = new UriType(); 2249 if (this.link == null) 2250 this.link = new ArrayList<UriType>(); 2251 this.link.add(t); 2252 return t; 2253 } 2254 2255 /** 2256 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2257 */ 2258 public TestScriptMetadataCapabilityComponent addLink(String value) { //1 2259 UriType t = new UriType(); 2260 t.setValue(value); 2261 if (this.link == null) 2262 this.link = new ArrayList<UriType>(); 2263 this.link.add(t); 2264 return this; 2265 } 2266 2267 /** 2268 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2269 */ 2270 public boolean hasLink(String value) { 2271 if (this.link == null) 2272 return false; 2273 for (UriType v : this.link) 2274 if (v.getValue().equals(value)) // uri 2275 return true; 2276 return false; 2277 } 2278 2279 /** 2280 * @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.) 2281 */ 2282 public Reference getCapabilities() { 2283 if (this.capabilities == null) 2284 if (Configuration.errorOnAutoCreate()) 2285 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities"); 2286 else if (Configuration.doAutoCreate()) 2287 this.capabilities = new Reference(); // cc 2288 return this.capabilities; 2289 } 2290 2291 public boolean hasCapabilities() { 2292 return this.capabilities != null && !this.capabilities.isEmpty(); 2293 } 2294 2295 /** 2296 * @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.) 2297 */ 2298 public TestScriptMetadataCapabilityComponent setCapabilities(Reference value) { 2299 this.capabilities = value; 2300 return this; 2301 } 2302 2303 /** 2304 * @return {@link #capabilities} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.) 2305 */ 2306 public CapabilityStatement getCapabilitiesTarget() { 2307 if (this.capabilitiesTarget == null) 2308 if (Configuration.errorOnAutoCreate()) 2309 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.capabilities"); 2310 else if (Configuration.doAutoCreate()) 2311 this.capabilitiesTarget = new CapabilityStatement(); // aa 2312 return this.capabilitiesTarget; 2313 } 2314 2315 /** 2316 * @param value {@link #capabilities} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.) 2317 */ 2318 public TestScriptMetadataCapabilityComponent setCapabilitiesTarget(CapabilityStatement value) { 2319 this.capabilitiesTarget = value; 2320 return this; 2321 } 2322 2323 protected void listChildren(List<Property> children) { 2324 super.listChildren(children); 2325 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)); 2326 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)); 2327 children.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, 1, description)); 2328 children.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin)); 2329 children.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination)); 2330 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)); 2331 children.add(new Property("capabilities", "Reference(CapabilityStatement)", "Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.", 0, 1, capabilities)); 2332 } 2333 2334 @Override 2335 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2336 switch (_hash) { 2337 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); 2338 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); 2339 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); 2340 case -1008619738: /*origin*/ return new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin); 2341 case -1429847026: /*destination*/ return new Property("destination", "integer", "Which server these requirements apply to.", 0, 1, destination); 2342 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); 2343 case -1487597642: /*capabilities*/ return new Property("capabilities", "Reference(CapabilityStatement)", "Minimum capabilities required of server for test script to execute successfully. If server does not meet at a minimum the referenced capability statement, then all tests in this script are skipped.", 0, 1, capabilities); 2344 default: return super.getNamedProperty(_hash, _name, _checkValid); 2345 } 2346 2347 } 2348 2349 @Override 2350 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2351 switch (hash) { 2352 case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType 2353 case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType 2354 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2355 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType 2356 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 2357 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType 2358 case -1487597642: /*capabilities*/ return this.capabilities == null ? new Base[0] : new Base[] {this.capabilities}; // Reference 2359 default: return super.getProperty(hash, name, checkValid); 2360 } 2361 2362 } 2363 2364 @Override 2365 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2366 switch (hash) { 2367 case -393139297: // required 2368 this.required = castToBoolean(value); // BooleanType 2369 return value; 2370 case -1109784050: // validated 2371 this.validated = castToBoolean(value); // BooleanType 2372 return value; 2373 case -1724546052: // description 2374 this.description = castToString(value); // StringType 2375 return value; 2376 case -1008619738: // origin 2377 this.getOrigin().add(castToInteger(value)); // IntegerType 2378 return value; 2379 case -1429847026: // destination 2380 this.destination = castToInteger(value); // IntegerType 2381 return value; 2382 case 3321850: // link 2383 this.getLink().add(castToUri(value)); // UriType 2384 return value; 2385 case -1487597642: // capabilities 2386 this.capabilities = castToReference(value); // Reference 2387 return value; 2388 default: return super.setProperty(hash, name, value); 2389 } 2390 2391 } 2392 2393 @Override 2394 public Base setProperty(String name, Base value) throws FHIRException { 2395 if (name.equals("required")) { 2396 this.required = castToBoolean(value); // BooleanType 2397 } else if (name.equals("validated")) { 2398 this.validated = castToBoolean(value); // BooleanType 2399 } else if (name.equals("description")) { 2400 this.description = castToString(value); // StringType 2401 } else if (name.equals("origin")) { 2402 this.getOrigin().add(castToInteger(value)); 2403 } else if (name.equals("destination")) { 2404 this.destination = castToInteger(value); // IntegerType 2405 } else if (name.equals("link")) { 2406 this.getLink().add(castToUri(value)); 2407 } else if (name.equals("capabilities")) { 2408 this.capabilities = castToReference(value); // Reference 2409 } else 2410 return super.setProperty(name, value); 2411 return value; 2412 } 2413 2414 @Override 2415 public Base makeProperty(int hash, String name) throws FHIRException { 2416 switch (hash) { 2417 case -393139297: return getRequiredElement(); 2418 case -1109784050: return getValidatedElement(); 2419 case -1724546052: return getDescriptionElement(); 2420 case -1008619738: return addOriginElement(); 2421 case -1429847026: return getDestinationElement(); 2422 case 3321850: return addLinkElement(); 2423 case -1487597642: return getCapabilities(); 2424 default: return super.makeProperty(hash, name); 2425 } 2426 2427 } 2428 2429 @Override 2430 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2431 switch (hash) { 2432 case -393139297: /*required*/ return new String[] {"boolean"}; 2433 case -1109784050: /*validated*/ return new String[] {"boolean"}; 2434 case -1724546052: /*description*/ return new String[] {"string"}; 2435 case -1008619738: /*origin*/ return new String[] {"integer"}; 2436 case -1429847026: /*destination*/ return new String[] {"integer"}; 2437 case 3321850: /*link*/ return new String[] {"uri"}; 2438 case -1487597642: /*capabilities*/ return new String[] {"Reference"}; 2439 default: return super.getTypesForProperty(hash, name); 2440 } 2441 2442 } 2443 2444 @Override 2445 public Base addChild(String name) throws FHIRException { 2446 if (name.equals("required")) { 2447 throw new FHIRException("Cannot call addChild on a primitive type TestScript.required"); 2448 } 2449 else if (name.equals("validated")) { 2450 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated"); 2451 } 2452 else if (name.equals("description")) { 2453 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 2454 } 2455 else if (name.equals("origin")) { 2456 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 2457 } 2458 else if (name.equals("destination")) { 2459 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 2460 } 2461 else if (name.equals("link")) { 2462 throw new FHIRException("Cannot call addChild on a primitive type TestScript.link"); 2463 } 2464 else if (name.equals("capabilities")) { 2465 this.capabilities = new Reference(); 2466 return this.capabilities; 2467 } 2468 else 2469 return super.addChild(name); 2470 } 2471 2472 public TestScriptMetadataCapabilityComponent copy() { 2473 TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent(); 2474 copyValues(dst); 2475 dst.required = required == null ? null : required.copy(); 2476 dst.validated = validated == null ? null : validated.copy(); 2477 dst.description = description == null ? null : description.copy(); 2478 if (origin != null) { 2479 dst.origin = new ArrayList<IntegerType>(); 2480 for (IntegerType i : origin) 2481 dst.origin.add(i.copy()); 2482 }; 2483 dst.destination = destination == null ? null : destination.copy(); 2484 if (link != null) { 2485 dst.link = new ArrayList<UriType>(); 2486 for (UriType i : link) 2487 dst.link.add(i.copy()); 2488 }; 2489 dst.capabilities = capabilities == null ? null : capabilities.copy(); 2490 return dst; 2491 } 2492 2493 @Override 2494 public boolean equalsDeep(Base other_) { 2495 if (!super.equalsDeep(other_)) 2496 return false; 2497 if (!(other_ instanceof TestScriptMetadataCapabilityComponent)) 2498 return false; 2499 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_; 2500 return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true) 2501 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true) 2502 && compareDeep(capabilities, o.capabilities, true); 2503 } 2504 2505 @Override 2506 public boolean equalsShallow(Base other_) { 2507 if (!super.equalsShallow(other_)) 2508 return false; 2509 if (!(other_ instanceof TestScriptMetadataCapabilityComponent)) 2510 return false; 2511 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other_; 2512 return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true) 2513 && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true) 2514 ; 2515 } 2516 2517 public boolean isEmpty() { 2518 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(required, validated, description 2519 , origin, destination, link, capabilities); 2520 } 2521 2522 public String fhirType() { 2523 return "TestScript.metadata.capability"; 2524 2525 } 2526 2527 } 2528 2529 @Block() 2530 public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement { 2531 /** 2532 * 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. 2533 */ 2534 @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2535 @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." ) 2536 protected BooleanType autocreate; 2537 2538 /** 2539 * 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. 2540 */ 2541 @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2542 @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." ) 2543 protected BooleanType autodelete; 2544 2545 /** 2546 * Reference to the resource (containing the contents of the resource needed for operations). 2547 */ 2548 @Child(name = "resource", type = {Reference.class}, order=3, min=0, max=1, modifier=false, summary=false) 2549 @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." ) 2550 protected Reference resource; 2551 2552 /** 2553 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).) 2554 */ 2555 protected Resource resourceTarget; 2556 2557 private static final long serialVersionUID = 1110683307L; 2558 2559 /** 2560 * Constructor 2561 */ 2562 public TestScriptFixtureComponent() { 2563 super(); 2564 } 2565 2566 /** 2567 * @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 2568 */ 2569 public BooleanType getAutocreateElement() { 2570 if (this.autocreate == null) 2571 if (Configuration.errorOnAutoCreate()) 2572 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate"); 2573 else if (Configuration.doAutoCreate()) 2574 this.autocreate = new BooleanType(); // bb 2575 return this.autocreate; 2576 } 2577 2578 public boolean hasAutocreateElement() { 2579 return this.autocreate != null && !this.autocreate.isEmpty(); 2580 } 2581 2582 public boolean hasAutocreate() { 2583 return this.autocreate != null && !this.autocreate.isEmpty(); 2584 } 2585 2586 /** 2587 * @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 2588 */ 2589 public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 2590 this.autocreate = value; 2591 return this; 2592 } 2593 2594 /** 2595 * @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. 2596 */ 2597 public boolean getAutocreate() { 2598 return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue(); 2599 } 2600 2601 /** 2602 * @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. 2603 */ 2604 public TestScriptFixtureComponent setAutocreate(boolean value) { 2605 if (this.autocreate == null) 2606 this.autocreate = new BooleanType(); 2607 this.autocreate.setValue(value); 2608 return this; 2609 } 2610 2611 /** 2612 * @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 2613 */ 2614 public BooleanType getAutodeleteElement() { 2615 if (this.autodelete == null) 2616 if (Configuration.errorOnAutoCreate()) 2617 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete"); 2618 else if (Configuration.doAutoCreate()) 2619 this.autodelete = new BooleanType(); // bb 2620 return this.autodelete; 2621 } 2622 2623 public boolean hasAutodeleteElement() { 2624 return this.autodelete != null && !this.autodelete.isEmpty(); 2625 } 2626 2627 public boolean hasAutodelete() { 2628 return this.autodelete != null && !this.autodelete.isEmpty(); 2629 } 2630 2631 /** 2632 * @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 2633 */ 2634 public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 2635 this.autodelete = value; 2636 return this; 2637 } 2638 2639 /** 2640 * @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. 2641 */ 2642 public boolean getAutodelete() { 2643 return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue(); 2644 } 2645 2646 /** 2647 * @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. 2648 */ 2649 public TestScriptFixtureComponent setAutodelete(boolean value) { 2650 if (this.autodelete == null) 2651 this.autodelete = new BooleanType(); 2652 this.autodelete.setValue(value); 2653 return this; 2654 } 2655 2656 /** 2657 * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2658 */ 2659 public Reference getResource() { 2660 if (this.resource == null) 2661 if (Configuration.errorOnAutoCreate()) 2662 throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource"); 2663 else if (Configuration.doAutoCreate()) 2664 this.resource = new Reference(); // cc 2665 return this.resource; 2666 } 2667 2668 public boolean hasResource() { 2669 return this.resource != null && !this.resource.isEmpty(); 2670 } 2671 2672 /** 2673 * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2674 */ 2675 public TestScriptFixtureComponent setResource(Reference value) { 2676 this.resource = value; 2677 return this; 2678 } 2679 2680 /** 2681 * @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).) 2682 */ 2683 public Resource getResourceTarget() { 2684 return this.resourceTarget; 2685 } 2686 2687 /** 2688 * @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).) 2689 */ 2690 public TestScriptFixtureComponent setResourceTarget(Resource value) { 2691 this.resourceTarget = value; 2692 return this; 2693 } 2694 2695 protected void listChildren(List<Property> children) { 2696 super.listChildren(children); 2697 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)); 2698 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)); 2699 children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, 1, resource)); 2700 } 2701 2702 @Override 2703 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2704 switch (_hash) { 2705 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); 2706 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); 2707 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); 2708 default: return super.getNamedProperty(_hash, _name, _checkValid); 2709 } 2710 2711 } 2712 2713 @Override 2714 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2715 switch (hash) { 2716 case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType 2717 case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType 2718 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 2719 default: return super.getProperty(hash, name, checkValid); 2720 } 2721 2722 } 2723 2724 @Override 2725 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2726 switch (hash) { 2727 case 73154411: // autocreate 2728 this.autocreate = castToBoolean(value); // BooleanType 2729 return value; 2730 case 89990170: // autodelete 2731 this.autodelete = castToBoolean(value); // BooleanType 2732 return value; 2733 case -341064690: // resource 2734 this.resource = castToReference(value); // Reference 2735 return value; 2736 default: return super.setProperty(hash, name, value); 2737 } 2738 2739 } 2740 2741 @Override 2742 public Base setProperty(String name, Base value) throws FHIRException { 2743 if (name.equals("autocreate")) { 2744 this.autocreate = castToBoolean(value); // BooleanType 2745 } else if (name.equals("autodelete")) { 2746 this.autodelete = castToBoolean(value); // BooleanType 2747 } else if (name.equals("resource")) { 2748 this.resource = castToReference(value); // Reference 2749 } else 2750 return super.setProperty(name, value); 2751 return value; 2752 } 2753 2754 @Override 2755 public Base makeProperty(int hash, String name) throws FHIRException { 2756 switch (hash) { 2757 case 73154411: return getAutocreateElement(); 2758 case 89990170: return getAutodeleteElement(); 2759 case -341064690: return getResource(); 2760 default: return super.makeProperty(hash, name); 2761 } 2762 2763 } 2764 2765 @Override 2766 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2767 switch (hash) { 2768 case 73154411: /*autocreate*/ return new String[] {"boolean"}; 2769 case 89990170: /*autodelete*/ return new String[] {"boolean"}; 2770 case -341064690: /*resource*/ return new String[] {"Reference"}; 2771 default: return super.getTypesForProperty(hash, name); 2772 } 2773 2774 } 2775 2776 @Override 2777 public Base addChild(String name) throws FHIRException { 2778 if (name.equals("autocreate")) { 2779 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate"); 2780 } 2781 else if (name.equals("autodelete")) { 2782 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete"); 2783 } 2784 else if (name.equals("resource")) { 2785 this.resource = new Reference(); 2786 return this.resource; 2787 } 2788 else 2789 return super.addChild(name); 2790 } 2791 2792 public TestScriptFixtureComponent copy() { 2793 TestScriptFixtureComponent dst = new TestScriptFixtureComponent(); 2794 copyValues(dst); 2795 dst.autocreate = autocreate == null ? null : autocreate.copy(); 2796 dst.autodelete = autodelete == null ? null : autodelete.copy(); 2797 dst.resource = resource == null ? null : resource.copy(); 2798 return dst; 2799 } 2800 2801 @Override 2802 public boolean equalsDeep(Base other_) { 2803 if (!super.equalsDeep(other_)) 2804 return false; 2805 if (!(other_ instanceof TestScriptFixtureComponent)) 2806 return false; 2807 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_; 2808 return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true) 2809 && compareDeep(resource, o.resource, true); 2810 } 2811 2812 @Override 2813 public boolean equalsShallow(Base other_) { 2814 if (!super.equalsShallow(other_)) 2815 return false; 2816 if (!(other_ instanceof TestScriptFixtureComponent)) 2817 return false; 2818 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other_; 2819 return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true) 2820 ; 2821 } 2822 2823 public boolean isEmpty() { 2824 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(autocreate, autodelete, resource 2825 ); 2826 } 2827 2828 public String fhirType() { 2829 return "TestScript.fixture"; 2830 2831 } 2832 2833 } 2834 2835 @Block() 2836 public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement { 2837 /** 2838 * Descriptive name for this variable. 2839 */ 2840 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2841 @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." ) 2842 protected StringType name; 2843 2844 /** 2845 * A default, hard-coded, or user-defined value for this variable. 2846 */ 2847 @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2848 @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." ) 2849 protected StringType defaultValue; 2850 2851 /** 2852 * A free text natural language description of the variable and its purpose. 2853 */ 2854 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2855 @Description(shortDefinition="Natural language description of the variable", formalDefinition="A free text natural language description of the variable and its purpose." ) 2856 protected StringType description; 2857 2858 /** 2859 * The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2860 */ 2861 @Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 2862 @Description(shortDefinition="The fluentpath expression against the fixture body", formalDefinition="The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified." ) 2863 protected StringType expression; 2864 2865 /** 2866 * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2867 */ 2868 @Child(name = "headerField", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2869 @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." ) 2870 protected StringType headerField; 2871 2872 /** 2873 * Displayable text string with hint help information to the user when entering a default value. 2874 */ 2875 @Child(name = "hint", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 2876 @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." ) 2877 protected StringType hint; 2878 2879 /** 2880 * XPath or JSONPath to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 2881 */ 2882 @Child(name = "path", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 2883 @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." ) 2884 protected StringType path; 2885 2886 /** 2887 * Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2888 */ 2889 @Child(name = "sourceId", type = {IdType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2890 @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." ) 2891 protected IdType sourceId; 2892 2893 private static final long serialVersionUID = -1592325432L; 2894 2895 /** 2896 * Constructor 2897 */ 2898 public TestScriptVariableComponent() { 2899 super(); 2900 } 2901 2902 /** 2903 * Constructor 2904 */ 2905 public TestScriptVariableComponent(StringType name) { 2906 super(); 2907 this.name = name; 2908 } 2909 2910 /** 2911 * @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 2912 */ 2913 public StringType getNameElement() { 2914 if (this.name == null) 2915 if (Configuration.errorOnAutoCreate()) 2916 throw new Error("Attempt to auto-create TestScriptVariableComponent.name"); 2917 else if (Configuration.doAutoCreate()) 2918 this.name = new StringType(); // bb 2919 return this.name; 2920 } 2921 2922 public boolean hasNameElement() { 2923 return this.name != null && !this.name.isEmpty(); 2924 } 2925 2926 public boolean hasName() { 2927 return this.name != null && !this.name.isEmpty(); 2928 } 2929 2930 /** 2931 * @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 2932 */ 2933 public TestScriptVariableComponent setNameElement(StringType value) { 2934 this.name = value; 2935 return this; 2936 } 2937 2938 /** 2939 * @return Descriptive name for this variable. 2940 */ 2941 public String getName() { 2942 return this.name == null ? null : this.name.getValue(); 2943 } 2944 2945 /** 2946 * @param value Descriptive name for this variable. 2947 */ 2948 public TestScriptVariableComponent setName(String value) { 2949 if (this.name == null) 2950 this.name = new StringType(); 2951 this.name.setValue(value); 2952 return this; 2953 } 2954 2955 /** 2956 * @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 2957 */ 2958 public StringType getDefaultValueElement() { 2959 if (this.defaultValue == null) 2960 if (Configuration.errorOnAutoCreate()) 2961 throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue"); 2962 else if (Configuration.doAutoCreate()) 2963 this.defaultValue = new StringType(); // bb 2964 return this.defaultValue; 2965 } 2966 2967 public boolean hasDefaultValueElement() { 2968 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2969 } 2970 2971 public boolean hasDefaultValue() { 2972 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2973 } 2974 2975 /** 2976 * @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 2977 */ 2978 public TestScriptVariableComponent setDefaultValueElement(StringType value) { 2979 this.defaultValue = value; 2980 return this; 2981 } 2982 2983 /** 2984 * @return A default, hard-coded, or user-defined value for this variable. 2985 */ 2986 public String getDefaultValue() { 2987 return this.defaultValue == null ? null : this.defaultValue.getValue(); 2988 } 2989 2990 /** 2991 * @param value A default, hard-coded, or user-defined value for this variable. 2992 */ 2993 public TestScriptVariableComponent setDefaultValue(String value) { 2994 if (Utilities.noString(value)) 2995 this.defaultValue = null; 2996 else { 2997 if (this.defaultValue == null) 2998 this.defaultValue = new StringType(); 2999 this.defaultValue.setValue(value); 3000 } 3001 return this; 3002 } 3003 3004 /** 3005 * @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 3006 */ 3007 public StringType getDescriptionElement() { 3008 if (this.description == null) 3009 if (Configuration.errorOnAutoCreate()) 3010 throw new Error("Attempt to auto-create TestScriptVariableComponent.description"); 3011 else if (Configuration.doAutoCreate()) 3012 this.description = new StringType(); // bb 3013 return this.description; 3014 } 3015 3016 public boolean hasDescriptionElement() { 3017 return this.description != null && !this.description.isEmpty(); 3018 } 3019 3020 public boolean hasDescription() { 3021 return this.description != null && !this.description.isEmpty(); 3022 } 3023 3024 /** 3025 * @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 3026 */ 3027 public TestScriptVariableComponent setDescriptionElement(StringType value) { 3028 this.description = value; 3029 return this; 3030 } 3031 3032 /** 3033 * @return A free text natural language description of the variable and its purpose. 3034 */ 3035 public String getDescription() { 3036 return this.description == null ? null : this.description.getValue(); 3037 } 3038 3039 /** 3040 * @param value A free text natural language description of the variable and its purpose. 3041 */ 3042 public TestScriptVariableComponent setDescription(String value) { 3043 if (Utilities.noString(value)) 3044 this.description = null; 3045 else { 3046 if (this.description == null) 3047 this.description = new StringType(); 3048 this.description.setValue(value); 3049 } 3050 return this; 3051 } 3052 3053 /** 3054 * @return {@link #expression} (The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 3055 */ 3056 public StringType getExpressionElement() { 3057 if (this.expression == null) 3058 if (Configuration.errorOnAutoCreate()) 3059 throw new Error("Attempt to auto-create TestScriptVariableComponent.expression"); 3060 else if (Configuration.doAutoCreate()) 3061 this.expression = new StringType(); // bb 3062 return this.expression; 3063 } 3064 3065 public boolean hasExpressionElement() { 3066 return this.expression != null && !this.expression.isEmpty(); 3067 } 3068 3069 public boolean hasExpression() { 3070 return this.expression != null && !this.expression.isEmpty(); 3071 } 3072 3073 /** 3074 * @param value {@link #expression} (The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 3075 */ 3076 public TestScriptVariableComponent setExpressionElement(StringType value) { 3077 this.expression = value; 3078 return this; 3079 } 3080 3081 /** 3082 * @return The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 3083 */ 3084 public String getExpression() { 3085 return this.expression == null ? null : this.expression.getValue(); 3086 } 3087 3088 /** 3089 * @param value The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified. 3090 */ 3091 public TestScriptVariableComponent setExpression(String value) { 3092 if (Utilities.noString(value)) 3093 this.expression = null; 3094 else { 3095 if (this.expression == null) 3096 this.expression = new StringType(); 3097 this.expression.setValue(value); 3098 } 3099 return this; 3100 } 3101 3102 /** 3103 * @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 3104 */ 3105 public StringType getHeaderFieldElement() { 3106 if (this.headerField == null) 3107 if (Configuration.errorOnAutoCreate()) 3108 throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField"); 3109 else if (Configuration.doAutoCreate()) 3110 this.headerField = new StringType(); // bb 3111 return this.headerField; 3112 } 3113 3114 public boolean hasHeaderFieldElement() { 3115 return this.headerField != null && !this.headerField.isEmpty(); 3116 } 3117 3118 public boolean hasHeaderField() { 3119 return this.headerField != null && !this.headerField.isEmpty(); 3120 } 3121 3122 /** 3123 * @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 3124 */ 3125 public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 3126 this.headerField = value; 3127 return this; 3128 } 3129 3130 /** 3131 * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 3132 */ 3133 public String getHeaderField() { 3134 return this.headerField == null ? null : this.headerField.getValue(); 3135 } 3136 3137 /** 3138 * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 3139 */ 3140 public TestScriptVariableComponent setHeaderField(String value) { 3141 if (Utilities.noString(value)) 3142 this.headerField = null; 3143 else { 3144 if (this.headerField == null) 3145 this.headerField = new StringType(); 3146 this.headerField.setValue(value); 3147 } 3148 return this; 3149 } 3150 3151 /** 3152 * @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 3153 */ 3154 public StringType getHintElement() { 3155 if (this.hint == null) 3156 if (Configuration.errorOnAutoCreate()) 3157 throw new Error("Attempt to auto-create TestScriptVariableComponent.hint"); 3158 else if (Configuration.doAutoCreate()) 3159 this.hint = new StringType(); // bb 3160 return this.hint; 3161 } 3162 3163 public boolean hasHintElement() { 3164 return this.hint != null && !this.hint.isEmpty(); 3165 } 3166 3167 public boolean hasHint() { 3168 return this.hint != null && !this.hint.isEmpty(); 3169 } 3170 3171 /** 3172 * @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 3173 */ 3174 public TestScriptVariableComponent setHintElement(StringType value) { 3175 this.hint = value; 3176 return this; 3177 } 3178 3179 /** 3180 * @return Displayable text string with hint help information to the user when entering a default value. 3181 */ 3182 public String getHint() { 3183 return this.hint == null ? null : this.hint.getValue(); 3184 } 3185 3186 /** 3187 * @param value Displayable text string with hint help information to the user when entering a default value. 3188 */ 3189 public TestScriptVariableComponent setHint(String value) { 3190 if (Utilities.noString(value)) 3191 this.hint = null; 3192 else { 3193 if (this.hint == null) 3194 this.hint = new StringType(); 3195 this.hint.setValue(value); 3196 } 3197 return this; 3198 } 3199 3200 /** 3201 * @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 3202 */ 3203 public StringType getPathElement() { 3204 if (this.path == null) 3205 if (Configuration.errorOnAutoCreate()) 3206 throw new Error("Attempt to auto-create TestScriptVariableComponent.path"); 3207 else if (Configuration.doAutoCreate()) 3208 this.path = new StringType(); // bb 3209 return this.path; 3210 } 3211 3212 public boolean hasPathElement() { 3213 return this.path != null && !this.path.isEmpty(); 3214 } 3215 3216 public boolean hasPath() { 3217 return this.path != null && !this.path.isEmpty(); 3218 } 3219 3220 /** 3221 * @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 3222 */ 3223 public TestScriptVariableComponent setPathElement(StringType value) { 3224 this.path = value; 3225 return this; 3226 } 3227 3228 /** 3229 * @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. 3230 */ 3231 public String getPath() { 3232 return this.path == null ? null : this.path.getValue(); 3233 } 3234 3235 /** 3236 * @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. 3237 */ 3238 public TestScriptVariableComponent setPath(String value) { 3239 if (Utilities.noString(value)) 3240 this.path = null; 3241 else { 3242 if (this.path == null) 3243 this.path = new StringType(); 3244 this.path.setValue(value); 3245 } 3246 return this; 3247 } 3248 3249 /** 3250 * @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 3251 */ 3252 public IdType getSourceIdElement() { 3253 if (this.sourceId == null) 3254 if (Configuration.errorOnAutoCreate()) 3255 throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId"); 3256 else if (Configuration.doAutoCreate()) 3257 this.sourceId = new IdType(); // bb 3258 return this.sourceId; 3259 } 3260 3261 public boolean hasSourceIdElement() { 3262 return this.sourceId != null && !this.sourceId.isEmpty(); 3263 } 3264 3265 public boolean hasSourceId() { 3266 return this.sourceId != null && !this.sourceId.isEmpty(); 3267 } 3268 3269 /** 3270 * @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 3271 */ 3272 public TestScriptVariableComponent setSourceIdElement(IdType value) { 3273 this.sourceId = value; 3274 return this; 3275 } 3276 3277 /** 3278 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 3279 */ 3280 public String getSourceId() { 3281 return this.sourceId == null ? null : this.sourceId.getValue(); 3282 } 3283 3284 /** 3285 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 3286 */ 3287 public TestScriptVariableComponent setSourceId(String value) { 3288 if (Utilities.noString(value)) 3289 this.sourceId = null; 3290 else { 3291 if (this.sourceId == null) 3292 this.sourceId = new IdType(); 3293 this.sourceId.setValue(value); 3294 } 3295 return this; 3296 } 3297 3298 protected void listChildren(List<Property> children) { 3299 super.listChildren(children); 3300 children.add(new Property("name", "string", "Descriptive name for this variable.", 0, 1, name)); 3301 children.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue)); 3302 children.add(new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description)); 3303 children.add(new Property("expression", "string", "The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, expression)); 3304 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)); 3305 children.add(new Property("hint", "string", "Displayable text string with hint help information to the user when entering a default value.", 0, 1, hint)); 3306 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)); 3307 children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", 0, 1, sourceId)); 3308 } 3309 3310 @Override 3311 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3312 switch (_hash) { 3313 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this variable.", 0, 1, name); 3314 case -659125328: /*defaultValue*/ return new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, 1, defaultValue); 3315 case -1724546052: /*description*/ return new Property("description", "string", "A free text natural language description of the variable and its purpose.", 0, 1, description); 3316 case -1795452264: /*expression*/ return new Property("expression", "string", "The fluentpath expression to evaluate against the fixture body. When variables are defined, only one of either expression, headerField or path must be specified.", 0, 1, expression); 3317 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); 3318 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); 3319 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); 3320 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); 3321 default: return super.getNamedProperty(_hash, _name, _checkValid); 3322 } 3323 3324 } 3325 3326 @Override 3327 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3328 switch (hash) { 3329 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3330 case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType 3331 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3332 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 3333 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 3334 case 3202695: /*hint*/ return this.hint == null ? new Base[0] : new Base[] {this.hint}; // StringType 3335 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 3336 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 3337 default: return super.getProperty(hash, name, checkValid); 3338 } 3339 3340 } 3341 3342 @Override 3343 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3344 switch (hash) { 3345 case 3373707: // name 3346 this.name = castToString(value); // StringType 3347 return value; 3348 case -659125328: // defaultValue 3349 this.defaultValue = castToString(value); // StringType 3350 return value; 3351 case -1724546052: // description 3352 this.description = castToString(value); // StringType 3353 return value; 3354 case -1795452264: // expression 3355 this.expression = castToString(value); // StringType 3356 return value; 3357 case 1160732269: // headerField 3358 this.headerField = castToString(value); // StringType 3359 return value; 3360 case 3202695: // hint 3361 this.hint = castToString(value); // StringType 3362 return value; 3363 case 3433509: // path 3364 this.path = castToString(value); // StringType 3365 return value; 3366 case 1746327190: // sourceId 3367 this.sourceId = castToId(value); // IdType 3368 return value; 3369 default: return super.setProperty(hash, name, value); 3370 } 3371 3372 } 3373 3374 @Override 3375 public Base setProperty(String name, Base value) throws FHIRException { 3376 if (name.equals("name")) { 3377 this.name = castToString(value); // StringType 3378 } else if (name.equals("defaultValue")) { 3379 this.defaultValue = castToString(value); // StringType 3380 } else if (name.equals("description")) { 3381 this.description = castToString(value); // StringType 3382 } else if (name.equals("expression")) { 3383 this.expression = castToString(value); // StringType 3384 } else if (name.equals("headerField")) { 3385 this.headerField = castToString(value); // StringType 3386 } else if (name.equals("hint")) { 3387 this.hint = castToString(value); // StringType 3388 } else if (name.equals("path")) { 3389 this.path = castToString(value); // StringType 3390 } else if (name.equals("sourceId")) { 3391 this.sourceId = castToId(value); // IdType 3392 } else 3393 return super.setProperty(name, value); 3394 return value; 3395 } 3396 3397 @Override 3398 public Base makeProperty(int hash, String name) throws FHIRException { 3399 switch (hash) { 3400 case 3373707: return getNameElement(); 3401 case -659125328: return getDefaultValueElement(); 3402 case -1724546052: return getDescriptionElement(); 3403 case -1795452264: return getExpressionElement(); 3404 case 1160732269: return getHeaderFieldElement(); 3405 case 3202695: return getHintElement(); 3406 case 3433509: return getPathElement(); 3407 case 1746327190: return getSourceIdElement(); 3408 default: return super.makeProperty(hash, name); 3409 } 3410 3411 } 3412 3413 @Override 3414 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3415 switch (hash) { 3416 case 3373707: /*name*/ return new String[] {"string"}; 3417 case -659125328: /*defaultValue*/ return new String[] {"string"}; 3418 case -1724546052: /*description*/ return new String[] {"string"}; 3419 case -1795452264: /*expression*/ return new String[] {"string"}; 3420 case 1160732269: /*headerField*/ return new String[] {"string"}; 3421 case 3202695: /*hint*/ return new String[] {"string"}; 3422 case 3433509: /*path*/ return new String[] {"string"}; 3423 case 1746327190: /*sourceId*/ return new String[] {"id"}; 3424 default: return super.getTypesForProperty(hash, name); 3425 } 3426 3427 } 3428 3429 @Override 3430 public Base addChild(String name) throws FHIRException { 3431 if (name.equals("name")) { 3432 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3433 } 3434 else if (name.equals("defaultValue")) { 3435 throw new FHIRException("Cannot call addChild on a primitive type TestScript.defaultValue"); 3436 } 3437 else if (name.equals("description")) { 3438 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 3439 } 3440 else if (name.equals("expression")) { 3441 throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression"); 3442 } 3443 else if (name.equals("headerField")) { 3444 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 3445 } 3446 else if (name.equals("hint")) { 3447 throw new FHIRException("Cannot call addChild on a primitive type TestScript.hint"); 3448 } 3449 else if (name.equals("path")) { 3450 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 3451 } 3452 else if (name.equals("sourceId")) { 3453 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 3454 } 3455 else 3456 return super.addChild(name); 3457 } 3458 3459 public TestScriptVariableComponent copy() { 3460 TestScriptVariableComponent dst = new TestScriptVariableComponent(); 3461 copyValues(dst); 3462 dst.name = name == null ? null : name.copy(); 3463 dst.defaultValue = defaultValue == null ? null : defaultValue.copy(); 3464 dst.description = description == null ? null : description.copy(); 3465 dst.expression = expression == null ? null : expression.copy(); 3466 dst.headerField = headerField == null ? null : headerField.copy(); 3467 dst.hint = hint == null ? null : hint.copy(); 3468 dst.path = path == null ? null : path.copy(); 3469 dst.sourceId = sourceId == null ? null : sourceId.copy(); 3470 return dst; 3471 } 3472 3473 @Override 3474 public boolean equalsDeep(Base other_) { 3475 if (!super.equalsDeep(other_)) 3476 return false; 3477 if (!(other_ instanceof TestScriptVariableComponent)) 3478 return false; 3479 TestScriptVariableComponent o = (TestScriptVariableComponent) other_; 3480 return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(description, o.description, true) 3481 && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true) 3482 && compareDeep(hint, o.hint, true) && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true) 3483 ; 3484 } 3485 3486 @Override 3487 public boolean equalsShallow(Base other_) { 3488 if (!super.equalsShallow(other_)) 3489 return false; 3490 if (!(other_ instanceof TestScriptVariableComponent)) 3491 return false; 3492 TestScriptVariableComponent o = (TestScriptVariableComponent) other_; 3493 return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(description, o.description, true) 3494 && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true) 3495 && compareValues(hint, o.hint, true) && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true) 3496 ; 3497 } 3498 3499 public boolean isEmpty() { 3500 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, defaultValue, description 3501 , expression, headerField, hint, path, sourceId); 3502 } 3503 3504 public String fhirType() { 3505 return "TestScript.variable"; 3506 3507 } 3508 3509 } 3510 3511 @Block() 3512 public static class TestScriptRuleComponent extends BackboneElement implements IBaseBackboneElement { 3513 /** 3514 * Reference to the resource (containing the contents of the rule needed for assertions). 3515 */ 3516 @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 3517 @Description(shortDefinition="Assert rule resource reference", formalDefinition="Reference to the resource (containing the contents of the rule needed for assertions)." ) 3518 protected Reference resource; 3519 3520 /** 3521 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the rule needed for assertions).) 3522 */ 3523 protected Resource resourceTarget; 3524 3525 /** 3526 * Each rule template can take one or more parameters for rule evaluation. 3527 */ 3528 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3529 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 3530 protected List<RuleParamComponent> param; 3531 3532 private static final long serialVersionUID = -1869267735L; 3533 3534 /** 3535 * Constructor 3536 */ 3537 public TestScriptRuleComponent() { 3538 super(); 3539 } 3540 3541 /** 3542 * Constructor 3543 */ 3544 public TestScriptRuleComponent(Reference resource) { 3545 super(); 3546 this.resource = resource; 3547 } 3548 3549 /** 3550 * @return {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) 3551 */ 3552 public Reference getResource() { 3553 if (this.resource == null) 3554 if (Configuration.errorOnAutoCreate()) 3555 throw new Error("Attempt to auto-create TestScriptRuleComponent.resource"); 3556 else if (Configuration.doAutoCreate()) 3557 this.resource = new Reference(); // cc 3558 return this.resource; 3559 } 3560 3561 public boolean hasResource() { 3562 return this.resource != null && !this.resource.isEmpty(); 3563 } 3564 3565 /** 3566 * @param value {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) 3567 */ 3568 public TestScriptRuleComponent setResource(Reference value) { 3569 this.resource = value; 3570 return this; 3571 } 3572 3573 /** 3574 * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the rule needed for assertions).) 3575 */ 3576 public Resource getResourceTarget() { 3577 return this.resourceTarget; 3578 } 3579 3580 /** 3581 * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the rule needed for assertions).) 3582 */ 3583 public TestScriptRuleComponent setResourceTarget(Resource value) { 3584 this.resourceTarget = value; 3585 return this; 3586 } 3587 3588 /** 3589 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 3590 */ 3591 public List<RuleParamComponent> getParam() { 3592 if (this.param == null) 3593 this.param = new ArrayList<RuleParamComponent>(); 3594 return this.param; 3595 } 3596 3597 /** 3598 * @return Returns a reference to <code>this</code> for easy method chaining 3599 */ 3600 public TestScriptRuleComponent setParam(List<RuleParamComponent> theParam) { 3601 this.param = theParam; 3602 return this; 3603 } 3604 3605 public boolean hasParam() { 3606 if (this.param == null) 3607 return false; 3608 for (RuleParamComponent item : this.param) 3609 if (!item.isEmpty()) 3610 return true; 3611 return false; 3612 } 3613 3614 public RuleParamComponent addParam() { //3 3615 RuleParamComponent t = new RuleParamComponent(); 3616 if (this.param == null) 3617 this.param = new ArrayList<RuleParamComponent>(); 3618 this.param.add(t); 3619 return t; 3620 } 3621 3622 public TestScriptRuleComponent addParam(RuleParamComponent t) { //3 3623 if (t == null) 3624 return this; 3625 if (this.param == null) 3626 this.param = new ArrayList<RuleParamComponent>(); 3627 this.param.add(t); 3628 return this; 3629 } 3630 3631 /** 3632 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 3633 */ 3634 public RuleParamComponent getParamFirstRep() { 3635 if (getParam().isEmpty()) { 3636 addParam(); 3637 } 3638 return getParam().get(0); 3639 } 3640 3641 protected void listChildren(List<Property> children) { 3642 super.listChildren(children); 3643 children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, 1, resource)); 3644 children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 3645 } 3646 3647 @Override 3648 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3649 switch (_hash) { 3650 case -341064690: /*resource*/ return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, 1, resource); 3651 case 106436749: /*param*/ return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param); 3652 default: return super.getNamedProperty(_hash, _name, _checkValid); 3653 } 3654 3655 } 3656 3657 @Override 3658 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3659 switch (hash) { 3660 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 3661 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RuleParamComponent 3662 default: return super.getProperty(hash, name, checkValid); 3663 } 3664 3665 } 3666 3667 @Override 3668 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3669 switch (hash) { 3670 case -341064690: // resource 3671 this.resource = castToReference(value); // Reference 3672 return value; 3673 case 106436749: // param 3674 this.getParam().add((RuleParamComponent) value); // RuleParamComponent 3675 return value; 3676 default: return super.setProperty(hash, name, value); 3677 } 3678 3679 } 3680 3681 @Override 3682 public Base setProperty(String name, Base value) throws FHIRException { 3683 if (name.equals("resource")) { 3684 this.resource = castToReference(value); // Reference 3685 } else if (name.equals("param")) { 3686 this.getParam().add((RuleParamComponent) value); 3687 } else 3688 return super.setProperty(name, value); 3689 return value; 3690 } 3691 3692 @Override 3693 public Base makeProperty(int hash, String name) throws FHIRException { 3694 switch (hash) { 3695 case -341064690: return getResource(); 3696 case 106436749: return addParam(); 3697 default: return super.makeProperty(hash, name); 3698 } 3699 3700 } 3701 3702 @Override 3703 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3704 switch (hash) { 3705 case -341064690: /*resource*/ return new String[] {"Reference"}; 3706 case 106436749: /*param*/ return new String[] {}; 3707 default: return super.getTypesForProperty(hash, name); 3708 } 3709 3710 } 3711 3712 @Override 3713 public Base addChild(String name) throws FHIRException { 3714 if (name.equals("resource")) { 3715 this.resource = new Reference(); 3716 return this.resource; 3717 } 3718 else if (name.equals("param")) { 3719 return addParam(); 3720 } 3721 else 3722 return super.addChild(name); 3723 } 3724 3725 public TestScriptRuleComponent copy() { 3726 TestScriptRuleComponent dst = new TestScriptRuleComponent(); 3727 copyValues(dst); 3728 dst.resource = resource == null ? null : resource.copy(); 3729 if (param != null) { 3730 dst.param = new ArrayList<RuleParamComponent>(); 3731 for (RuleParamComponent i : param) 3732 dst.param.add(i.copy()); 3733 }; 3734 return dst; 3735 } 3736 3737 @Override 3738 public boolean equalsDeep(Base other_) { 3739 if (!super.equalsDeep(other_)) 3740 return false; 3741 if (!(other_ instanceof TestScriptRuleComponent)) 3742 return false; 3743 TestScriptRuleComponent o = (TestScriptRuleComponent) other_; 3744 return compareDeep(resource, o.resource, true) && compareDeep(param, o.param, true); 3745 } 3746 3747 @Override 3748 public boolean equalsShallow(Base other_) { 3749 if (!super.equalsShallow(other_)) 3750 return false; 3751 if (!(other_ instanceof TestScriptRuleComponent)) 3752 return false; 3753 TestScriptRuleComponent o = (TestScriptRuleComponent) other_; 3754 return true; 3755 } 3756 3757 public boolean isEmpty() { 3758 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, param); 3759 } 3760 3761 public String fhirType() { 3762 return "TestScript.rule"; 3763 3764 } 3765 3766 } 3767 3768 @Block() 3769 public static class RuleParamComponent extends BackboneElement implements IBaseBackboneElement { 3770 /** 3771 * Descriptive name for this parameter that matches the external assert rule parameter name. 3772 */ 3773 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3774 @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) 3775 protected StringType name; 3776 3777 /** 3778 * The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3779 */ 3780 @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3781 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The explicit or dynamic value for the parameter that will be passed on to the external rule template." ) 3782 protected StringType value; 3783 3784 private static final long serialVersionUID = 395259392L; 3785 3786 /** 3787 * Constructor 3788 */ 3789 public RuleParamComponent() { 3790 super(); 3791 } 3792 3793 /** 3794 * Constructor 3795 */ 3796 public RuleParamComponent(StringType name) { 3797 super(); 3798 this.name = name; 3799 } 3800 3801 /** 3802 * @return {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3803 */ 3804 public StringType getNameElement() { 3805 if (this.name == null) 3806 if (Configuration.errorOnAutoCreate()) 3807 throw new Error("Attempt to auto-create RuleParamComponent.name"); 3808 else if (Configuration.doAutoCreate()) 3809 this.name = new StringType(); // bb 3810 return this.name; 3811 } 3812 3813 public boolean hasNameElement() { 3814 return this.name != null && !this.name.isEmpty(); 3815 } 3816 3817 public boolean hasName() { 3818 return this.name != null && !this.name.isEmpty(); 3819 } 3820 3821 /** 3822 * @param value {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3823 */ 3824 public RuleParamComponent setNameElement(StringType value) { 3825 this.name = value; 3826 return this; 3827 } 3828 3829 /** 3830 * @return Descriptive name for this parameter that matches the external assert rule parameter name. 3831 */ 3832 public String getName() { 3833 return this.name == null ? null : this.name.getValue(); 3834 } 3835 3836 /** 3837 * @param value Descriptive name for this parameter that matches the external assert rule parameter name. 3838 */ 3839 public RuleParamComponent setName(String value) { 3840 if (this.name == null) 3841 this.name = new StringType(); 3842 this.name.setValue(value); 3843 return this; 3844 } 3845 3846 /** 3847 * @return {@link #value} (The explicit or dynamic value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 3848 */ 3849 public StringType getValueElement() { 3850 if (this.value == null) 3851 if (Configuration.errorOnAutoCreate()) 3852 throw new Error("Attempt to auto-create RuleParamComponent.value"); 3853 else if (Configuration.doAutoCreate()) 3854 this.value = new StringType(); // bb 3855 return this.value; 3856 } 3857 3858 public boolean hasValueElement() { 3859 return this.value != null && !this.value.isEmpty(); 3860 } 3861 3862 public boolean hasValue() { 3863 return this.value != null && !this.value.isEmpty(); 3864 } 3865 3866 /** 3867 * @param value {@link #value} (The explicit or dynamic value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 3868 */ 3869 public RuleParamComponent setValueElement(StringType value) { 3870 this.value = value; 3871 return this; 3872 } 3873 3874 /** 3875 * @return The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3876 */ 3877 public String getValue() { 3878 return this.value == null ? null : this.value.getValue(); 3879 } 3880 3881 /** 3882 * @param value The explicit or dynamic value for the parameter that will be passed on to the external rule template. 3883 */ 3884 public RuleParamComponent setValue(String value) { 3885 if (Utilities.noString(value)) 3886 this.value = null; 3887 else { 3888 if (this.value == null) 3889 this.value = new StringType(); 3890 this.value.setValue(value); 3891 } 3892 return this; 3893 } 3894 3895 protected void listChildren(List<Property> children) { 3896 super.listChildren(children); 3897 children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name)); 3898 children.add(new Property("value", "string", "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", 0, 1, value)); 3899 } 3900 3901 @Override 3902 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3903 switch (_hash) { 3904 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name); 3905 case 111972721: /*value*/ return new Property("value", "string", "The explicit or dynamic value for the parameter that will be passed on to the external rule template.", 0, 1, value); 3906 default: return super.getNamedProperty(_hash, _name, _checkValid); 3907 } 3908 3909 } 3910 3911 @Override 3912 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3913 switch (hash) { 3914 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3915 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 3916 default: return super.getProperty(hash, name, checkValid); 3917 } 3918 3919 } 3920 3921 @Override 3922 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3923 switch (hash) { 3924 case 3373707: // name 3925 this.name = castToString(value); // StringType 3926 return value; 3927 case 111972721: // value 3928 this.value = castToString(value); // StringType 3929 return value; 3930 default: return super.setProperty(hash, name, value); 3931 } 3932 3933 } 3934 3935 @Override 3936 public Base setProperty(String name, Base value) throws FHIRException { 3937 if (name.equals("name")) { 3938 this.name = castToString(value); // StringType 3939 } else if (name.equals("value")) { 3940 this.value = castToString(value); // StringType 3941 } else 3942 return super.setProperty(name, value); 3943 return value; 3944 } 3945 3946 @Override 3947 public Base makeProperty(int hash, String name) throws FHIRException { 3948 switch (hash) { 3949 case 3373707: return getNameElement(); 3950 case 111972721: return getValueElement(); 3951 default: return super.makeProperty(hash, name); 3952 } 3953 3954 } 3955 3956 @Override 3957 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3958 switch (hash) { 3959 case 3373707: /*name*/ return new String[] {"string"}; 3960 case 111972721: /*value*/ return new String[] {"string"}; 3961 default: return super.getTypesForProperty(hash, name); 3962 } 3963 3964 } 3965 3966 @Override 3967 public Base addChild(String name) throws FHIRException { 3968 if (name.equals("name")) { 3969 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3970 } 3971 else if (name.equals("value")) { 3972 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 3973 } 3974 else 3975 return super.addChild(name); 3976 } 3977 3978 public RuleParamComponent copy() { 3979 RuleParamComponent dst = new RuleParamComponent(); 3980 copyValues(dst); 3981 dst.name = name == null ? null : name.copy(); 3982 dst.value = value == null ? null : value.copy(); 3983 return dst; 3984 } 3985 3986 @Override 3987 public boolean equalsDeep(Base other_) { 3988 if (!super.equalsDeep(other_)) 3989 return false; 3990 if (!(other_ instanceof RuleParamComponent)) 3991 return false; 3992 RuleParamComponent o = (RuleParamComponent) other_; 3993 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 3994 } 3995 3996 @Override 3997 public boolean equalsShallow(Base other_) { 3998 if (!super.equalsShallow(other_)) 3999 return false; 4000 if (!(other_ instanceof RuleParamComponent)) 4001 return false; 4002 RuleParamComponent o = (RuleParamComponent) other_; 4003 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 4004 } 4005 4006 public boolean isEmpty() { 4007 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 4008 } 4009 4010 public String fhirType() { 4011 return "TestScript.rule.param"; 4012 4013 } 4014 4015 } 4016 4017 @Block() 4018 public static class TestScriptRulesetComponent extends BackboneElement implements IBaseBackboneElement { 4019 /** 4020 * Reference to the resource (containing the contents of the ruleset needed for assertions). 4021 */ 4022 @Child(name = "resource", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 4023 @Description(shortDefinition="Assert ruleset resource reference", formalDefinition="Reference to the resource (containing the contents of the ruleset needed for assertions)." ) 4024 protected Reference resource; 4025 4026 /** 4027 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the ruleset needed for assertions).) 4028 */ 4029 protected Resource resourceTarget; 4030 4031 /** 4032 * The referenced rule within the external ruleset template. 4033 */ 4034 @Child(name = "rule", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4035 @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." ) 4036 protected List<RulesetRuleComponent> rule; 4037 4038 private static final long serialVersionUID = 1260261423L; 4039 4040 /** 4041 * Constructor 4042 */ 4043 public TestScriptRulesetComponent() { 4044 super(); 4045 } 4046 4047 /** 4048 * Constructor 4049 */ 4050 public TestScriptRulesetComponent(Reference resource) { 4051 super(); 4052 this.resource = resource; 4053 } 4054 4055 /** 4056 * @return {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) 4057 */ 4058 public Reference getResource() { 4059 if (this.resource == null) 4060 if (Configuration.errorOnAutoCreate()) 4061 throw new Error("Attempt to auto-create TestScriptRulesetComponent.resource"); 4062 else if (Configuration.doAutoCreate()) 4063 this.resource = new Reference(); // cc 4064 return this.resource; 4065 } 4066 4067 public boolean hasResource() { 4068 return this.resource != null && !this.resource.isEmpty(); 4069 } 4070 4071 /** 4072 * @param value {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) 4073 */ 4074 public TestScriptRulesetComponent setResource(Reference value) { 4075 this.resource = value; 4076 return this; 4077 } 4078 4079 /** 4080 * @return {@link #resource} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the ruleset needed for assertions).) 4081 */ 4082 public Resource getResourceTarget() { 4083 return this.resourceTarget; 4084 } 4085 4086 /** 4087 * @param value {@link #resource} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Reference to the resource (containing the contents of the ruleset needed for assertions).) 4088 */ 4089 public TestScriptRulesetComponent setResourceTarget(Resource value) { 4090 this.resourceTarget = value; 4091 return this; 4092 } 4093 4094 /** 4095 * @return {@link #rule} (The referenced rule within the external ruleset template.) 4096 */ 4097 public List<RulesetRuleComponent> getRule() { 4098 if (this.rule == null) 4099 this.rule = new ArrayList<RulesetRuleComponent>(); 4100 return this.rule; 4101 } 4102 4103 /** 4104 * @return Returns a reference to <code>this</code> for easy method chaining 4105 */ 4106 public TestScriptRulesetComponent setRule(List<RulesetRuleComponent> theRule) { 4107 this.rule = theRule; 4108 return this; 4109 } 4110 4111 public boolean hasRule() { 4112 if (this.rule == null) 4113 return false; 4114 for (RulesetRuleComponent item : this.rule) 4115 if (!item.isEmpty()) 4116 return true; 4117 return false; 4118 } 4119 4120 public RulesetRuleComponent addRule() { //3 4121 RulesetRuleComponent t = new RulesetRuleComponent(); 4122 if (this.rule == null) 4123 this.rule = new ArrayList<RulesetRuleComponent>(); 4124 this.rule.add(t); 4125 return t; 4126 } 4127 4128 public TestScriptRulesetComponent addRule(RulesetRuleComponent t) { //3 4129 if (t == null) 4130 return this; 4131 if (this.rule == null) 4132 this.rule = new ArrayList<RulesetRuleComponent>(); 4133 this.rule.add(t); 4134 return this; 4135 } 4136 4137 /** 4138 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 4139 */ 4140 public RulesetRuleComponent getRuleFirstRep() { 4141 if (getRule().isEmpty()) { 4142 addRule(); 4143 } 4144 return getRule().get(0); 4145 } 4146 4147 protected void listChildren(List<Property> children) { 4148 super.listChildren(children); 4149 children.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, 1, resource)); 4150 children.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); 4151 } 4152 4153 @Override 4154 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4155 switch (_hash) { 4156 case -341064690: /*resource*/ return new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, 1, resource); 4157 case 3512060: /*rule*/ return new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule); 4158 default: return super.getNamedProperty(_hash, _name, _checkValid); 4159 } 4160 4161 } 4162 4163 @Override 4164 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4165 switch (hash) { 4166 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 4167 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // RulesetRuleComponent 4168 default: return super.getProperty(hash, name, checkValid); 4169 } 4170 4171 } 4172 4173 @Override 4174 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4175 switch (hash) { 4176 case -341064690: // resource 4177 this.resource = castToReference(value); // Reference 4178 return value; 4179 case 3512060: // rule 4180 this.getRule().add((RulesetRuleComponent) value); // RulesetRuleComponent 4181 return value; 4182 default: return super.setProperty(hash, name, value); 4183 } 4184 4185 } 4186 4187 @Override 4188 public Base setProperty(String name, Base value) throws FHIRException { 4189 if (name.equals("resource")) { 4190 this.resource = castToReference(value); // Reference 4191 } else if (name.equals("rule")) { 4192 this.getRule().add((RulesetRuleComponent) value); 4193 } else 4194 return super.setProperty(name, value); 4195 return value; 4196 } 4197 4198 @Override 4199 public Base makeProperty(int hash, String name) throws FHIRException { 4200 switch (hash) { 4201 case -341064690: return getResource(); 4202 case 3512060: return addRule(); 4203 default: return super.makeProperty(hash, name); 4204 } 4205 4206 } 4207 4208 @Override 4209 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4210 switch (hash) { 4211 case -341064690: /*resource*/ return new String[] {"Reference"}; 4212 case 3512060: /*rule*/ return new String[] {}; 4213 default: return super.getTypesForProperty(hash, name); 4214 } 4215 4216 } 4217 4218 @Override 4219 public Base addChild(String name) throws FHIRException { 4220 if (name.equals("resource")) { 4221 this.resource = new Reference(); 4222 return this.resource; 4223 } 4224 else if (name.equals("rule")) { 4225 return addRule(); 4226 } 4227 else 4228 return super.addChild(name); 4229 } 4230 4231 public TestScriptRulesetComponent copy() { 4232 TestScriptRulesetComponent dst = new TestScriptRulesetComponent(); 4233 copyValues(dst); 4234 dst.resource = resource == null ? null : resource.copy(); 4235 if (rule != null) { 4236 dst.rule = new ArrayList<RulesetRuleComponent>(); 4237 for (RulesetRuleComponent i : rule) 4238 dst.rule.add(i.copy()); 4239 }; 4240 return dst; 4241 } 4242 4243 @Override 4244 public boolean equalsDeep(Base other_) { 4245 if (!super.equalsDeep(other_)) 4246 return false; 4247 if (!(other_ instanceof TestScriptRulesetComponent)) 4248 return false; 4249 TestScriptRulesetComponent o = (TestScriptRulesetComponent) other_; 4250 return compareDeep(resource, o.resource, true) && compareDeep(rule, o.rule, true); 4251 } 4252 4253 @Override 4254 public boolean equalsShallow(Base other_) { 4255 if (!super.equalsShallow(other_)) 4256 return false; 4257 if (!(other_ instanceof TestScriptRulesetComponent)) 4258 return false; 4259 TestScriptRulesetComponent o = (TestScriptRulesetComponent) other_; 4260 return true; 4261 } 4262 4263 public boolean isEmpty() { 4264 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(resource, rule); 4265 } 4266 4267 public String fhirType() { 4268 return "TestScript.ruleset"; 4269 4270 } 4271 4272 } 4273 4274 @Block() 4275 public static class RulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { 4276 /** 4277 * Id of the referenced rule within the external ruleset template. 4278 */ 4279 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4280 @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) 4281 protected IdType ruleId; 4282 4283 /** 4284 * Each rule template can take one or more parameters for rule evaluation. 4285 */ 4286 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4287 @Description(shortDefinition="Ruleset rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 4288 protected List<RulesetRuleParamComponent> param; 4289 4290 private static final long serialVersionUID = -1399866981L; 4291 4292 /** 4293 * Constructor 4294 */ 4295 public RulesetRuleComponent() { 4296 super(); 4297 } 4298 4299 /** 4300 * Constructor 4301 */ 4302 public RulesetRuleComponent(IdType ruleId) { 4303 super(); 4304 this.ruleId = ruleId; 4305 } 4306 4307 /** 4308 * @return {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 4309 */ 4310 public IdType getRuleIdElement() { 4311 if (this.ruleId == null) 4312 if (Configuration.errorOnAutoCreate()) 4313 throw new Error("Attempt to auto-create RulesetRuleComponent.ruleId"); 4314 else if (Configuration.doAutoCreate()) 4315 this.ruleId = new IdType(); // bb 4316 return this.ruleId; 4317 } 4318 4319 public boolean hasRuleIdElement() { 4320 return this.ruleId != null && !this.ruleId.isEmpty(); 4321 } 4322 4323 public boolean hasRuleId() { 4324 return this.ruleId != null && !this.ruleId.isEmpty(); 4325 } 4326 4327 /** 4328 * @param value {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 4329 */ 4330 public RulesetRuleComponent setRuleIdElement(IdType value) { 4331 this.ruleId = value; 4332 return this; 4333 } 4334 4335 /** 4336 * @return Id of the referenced rule within the external ruleset template. 4337 */ 4338 public String getRuleId() { 4339 return this.ruleId == null ? null : this.ruleId.getValue(); 4340 } 4341 4342 /** 4343 * @param value Id of the referenced rule within the external ruleset template. 4344 */ 4345 public RulesetRuleComponent setRuleId(String value) { 4346 if (this.ruleId == null) 4347 this.ruleId = new IdType(); 4348 this.ruleId.setValue(value); 4349 return this; 4350 } 4351 4352 /** 4353 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 4354 */ 4355 public List<RulesetRuleParamComponent> getParam() { 4356 if (this.param == null) 4357 this.param = new ArrayList<RulesetRuleParamComponent>(); 4358 return this.param; 4359 } 4360 4361 /** 4362 * @return Returns a reference to <code>this</code> for easy method chaining 4363 */ 4364 public RulesetRuleComponent setParam(List<RulesetRuleParamComponent> theParam) { 4365 this.param = theParam; 4366 return this; 4367 } 4368 4369 public boolean hasParam() { 4370 if (this.param == null) 4371 return false; 4372 for (RulesetRuleParamComponent item : this.param) 4373 if (!item.isEmpty()) 4374 return true; 4375 return false; 4376 } 4377 4378 public RulesetRuleParamComponent addParam() { //3 4379 RulesetRuleParamComponent t = new RulesetRuleParamComponent(); 4380 if (this.param == null) 4381 this.param = new ArrayList<RulesetRuleParamComponent>(); 4382 this.param.add(t); 4383 return t; 4384 } 4385 4386 public RulesetRuleComponent addParam(RulesetRuleParamComponent t) { //3 4387 if (t == null) 4388 return this; 4389 if (this.param == null) 4390 this.param = new ArrayList<RulesetRuleParamComponent>(); 4391 this.param.add(t); 4392 return this; 4393 } 4394 4395 /** 4396 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 4397 */ 4398 public RulesetRuleParamComponent getParamFirstRep() { 4399 if (getParam().isEmpty()) { 4400 addParam(); 4401 } 4402 return getParam().get(0); 4403 } 4404 4405 protected void listChildren(List<Property> children) { 4406 super.listChildren(children); 4407 children.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId)); 4408 children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 4409 } 4410 4411 @Override 4412 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4413 switch (_hash) { 4414 case -919875273: /*ruleId*/ return new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId); 4415 case 106436749: /*param*/ return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param); 4416 default: return super.getNamedProperty(_hash, _name, _checkValid); 4417 } 4418 4419 } 4420 4421 @Override 4422 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4423 switch (hash) { 4424 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 4425 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // RulesetRuleParamComponent 4426 default: return super.getProperty(hash, name, checkValid); 4427 } 4428 4429 } 4430 4431 @Override 4432 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4433 switch (hash) { 4434 case -919875273: // ruleId 4435 this.ruleId = castToId(value); // IdType 4436 return value; 4437 case 106436749: // param 4438 this.getParam().add((RulesetRuleParamComponent) value); // RulesetRuleParamComponent 4439 return value; 4440 default: return super.setProperty(hash, name, value); 4441 } 4442 4443 } 4444 4445 @Override 4446 public Base setProperty(String name, Base value) throws FHIRException { 4447 if (name.equals("ruleId")) { 4448 this.ruleId = castToId(value); // IdType 4449 } else if (name.equals("param")) { 4450 this.getParam().add((RulesetRuleParamComponent) value); 4451 } else 4452 return super.setProperty(name, value); 4453 return value; 4454 } 4455 4456 @Override 4457 public Base makeProperty(int hash, String name) throws FHIRException { 4458 switch (hash) { 4459 case -919875273: return getRuleIdElement(); 4460 case 106436749: return addParam(); 4461 default: return super.makeProperty(hash, name); 4462 } 4463 4464 } 4465 4466 @Override 4467 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4468 switch (hash) { 4469 case -919875273: /*ruleId*/ return new String[] {"id"}; 4470 case 106436749: /*param*/ return new String[] {}; 4471 default: return super.getTypesForProperty(hash, name); 4472 } 4473 4474 } 4475 4476 @Override 4477 public Base addChild(String name) throws FHIRException { 4478 if (name.equals("ruleId")) { 4479 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 4480 } 4481 else if (name.equals("param")) { 4482 return addParam(); 4483 } 4484 else 4485 return super.addChild(name); 4486 } 4487 4488 public RulesetRuleComponent copy() { 4489 RulesetRuleComponent dst = new RulesetRuleComponent(); 4490 copyValues(dst); 4491 dst.ruleId = ruleId == null ? null : ruleId.copy(); 4492 if (param != null) { 4493 dst.param = new ArrayList<RulesetRuleParamComponent>(); 4494 for (RulesetRuleParamComponent i : param) 4495 dst.param.add(i.copy()); 4496 }; 4497 return dst; 4498 } 4499 4500 @Override 4501 public boolean equalsDeep(Base other_) { 4502 if (!super.equalsDeep(other_)) 4503 return false; 4504 if (!(other_ instanceof RulesetRuleComponent)) 4505 return false; 4506 RulesetRuleComponent o = (RulesetRuleComponent) other_; 4507 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 4508 } 4509 4510 @Override 4511 public boolean equalsShallow(Base other_) { 4512 if (!super.equalsShallow(other_)) 4513 return false; 4514 if (!(other_ instanceof RulesetRuleComponent)) 4515 return false; 4516 RulesetRuleComponent o = (RulesetRuleComponent) other_; 4517 return compareValues(ruleId, o.ruleId, true); 4518 } 4519 4520 public boolean isEmpty() { 4521 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 4522 } 4523 4524 public String fhirType() { 4525 return "TestScript.ruleset.rule"; 4526 4527 } 4528 4529 } 4530 4531 @Block() 4532 public static class RulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 4533 /** 4534 * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4535 */ 4536 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 4537 @Description(shortDefinition="Parameter name matching external assert ruleset rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert ruleset rule parameter name." ) 4538 protected StringType name; 4539 4540 /** 4541 * The value for the parameter that will be passed on to the external ruleset rule template. 4542 */ 4543 @Child(name = "value", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4544 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external ruleset rule template." ) 4545 protected StringType value; 4546 4547 private static final long serialVersionUID = 395259392L; 4548 4549 /** 4550 * Constructor 4551 */ 4552 public RulesetRuleParamComponent() { 4553 super(); 4554 } 4555 4556 /** 4557 * Constructor 4558 */ 4559 public RulesetRuleParamComponent(StringType name) { 4560 super(); 4561 this.name = name; 4562 } 4563 4564 /** 4565 * @return {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 4566 */ 4567 public StringType getNameElement() { 4568 if (this.name == null) 4569 if (Configuration.errorOnAutoCreate()) 4570 throw new Error("Attempt to auto-create RulesetRuleParamComponent.name"); 4571 else if (Configuration.doAutoCreate()) 4572 this.name = new StringType(); // bb 4573 return this.name; 4574 } 4575 4576 public boolean hasNameElement() { 4577 return this.name != null && !this.name.isEmpty(); 4578 } 4579 4580 public boolean hasName() { 4581 return this.name != null && !this.name.isEmpty(); 4582 } 4583 4584 /** 4585 * @param value {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 4586 */ 4587 public RulesetRuleParamComponent setNameElement(StringType value) { 4588 this.name = value; 4589 return this; 4590 } 4591 4592 /** 4593 * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4594 */ 4595 public String getName() { 4596 return this.name == null ? null : this.name.getValue(); 4597 } 4598 4599 /** 4600 * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4601 */ 4602 public RulesetRuleParamComponent setName(String value) { 4603 if (this.name == null) 4604 this.name = new StringType(); 4605 this.name.setValue(value); 4606 return this; 4607 } 4608 4609 /** 4610 * @return {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 4611 */ 4612 public StringType getValueElement() { 4613 if (this.value == null) 4614 if (Configuration.errorOnAutoCreate()) 4615 throw new Error("Attempt to auto-create RulesetRuleParamComponent.value"); 4616 else if (Configuration.doAutoCreate()) 4617 this.value = new StringType(); // bb 4618 return this.value; 4619 } 4620 4621 public boolean hasValueElement() { 4622 return this.value != null && !this.value.isEmpty(); 4623 } 4624 4625 public boolean hasValue() { 4626 return this.value != null && !this.value.isEmpty(); 4627 } 4628 4629 /** 4630 * @param value {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 4631 */ 4632 public RulesetRuleParamComponent setValueElement(StringType value) { 4633 this.value = value; 4634 return this; 4635 } 4636 4637 /** 4638 * @return The value for the parameter that will be passed on to the external ruleset rule template. 4639 */ 4640 public String getValue() { 4641 return this.value == null ? null : this.value.getValue(); 4642 } 4643 4644 /** 4645 * @param value The value for the parameter that will be passed on to the external ruleset rule template. 4646 */ 4647 public RulesetRuleParamComponent setValue(String value) { 4648 if (Utilities.noString(value)) 4649 this.value = null; 4650 else { 4651 if (this.value == null) 4652 this.value = new StringType(); 4653 this.value.setValue(value); 4654 } 4655 return this; 4656 } 4657 4658 protected void listChildren(List<Property> children) { 4659 super.listChildren(children); 4660 children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name)); 4661 children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value)); 4662 } 4663 4664 @Override 4665 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4666 switch (_hash) { 4667 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name); 4668 case 111972721: /*value*/ return new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value); 4669 default: return super.getNamedProperty(_hash, _name, _checkValid); 4670 } 4671 4672 } 4673 4674 @Override 4675 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4676 switch (hash) { 4677 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 4678 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 4679 default: return super.getProperty(hash, name, checkValid); 4680 } 4681 4682 } 4683 4684 @Override 4685 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4686 switch (hash) { 4687 case 3373707: // name 4688 this.name = castToString(value); // StringType 4689 return value; 4690 case 111972721: // value 4691 this.value = castToString(value); // StringType 4692 return value; 4693 default: return super.setProperty(hash, name, value); 4694 } 4695 4696 } 4697 4698 @Override 4699 public Base setProperty(String name, Base value) throws FHIRException { 4700 if (name.equals("name")) { 4701 this.name = castToString(value); // StringType 4702 } else if (name.equals("value")) { 4703 this.value = castToString(value); // StringType 4704 } else 4705 return super.setProperty(name, value); 4706 return value; 4707 } 4708 4709 @Override 4710 public Base makeProperty(int hash, String name) throws FHIRException { 4711 switch (hash) { 4712 case 3373707: return getNameElement(); 4713 case 111972721: return getValueElement(); 4714 default: return super.makeProperty(hash, name); 4715 } 4716 4717 } 4718 4719 @Override 4720 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4721 switch (hash) { 4722 case 3373707: /*name*/ return new String[] {"string"}; 4723 case 111972721: /*value*/ return new String[] {"string"}; 4724 default: return super.getTypesForProperty(hash, name); 4725 } 4726 4727 } 4728 4729 @Override 4730 public Base addChild(String name) throws FHIRException { 4731 if (name.equals("name")) { 4732 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 4733 } 4734 else if (name.equals("value")) { 4735 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 4736 } 4737 else 4738 return super.addChild(name); 4739 } 4740 4741 public RulesetRuleParamComponent copy() { 4742 RulesetRuleParamComponent dst = new RulesetRuleParamComponent(); 4743 copyValues(dst); 4744 dst.name = name == null ? null : name.copy(); 4745 dst.value = value == null ? null : value.copy(); 4746 return dst; 4747 } 4748 4749 @Override 4750 public boolean equalsDeep(Base other_) { 4751 if (!super.equalsDeep(other_)) 4752 return false; 4753 if (!(other_ instanceof RulesetRuleParamComponent)) 4754 return false; 4755 RulesetRuleParamComponent o = (RulesetRuleParamComponent) other_; 4756 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 4757 } 4758 4759 @Override 4760 public boolean equalsShallow(Base other_) { 4761 if (!super.equalsShallow(other_)) 4762 return false; 4763 if (!(other_ instanceof RulesetRuleParamComponent)) 4764 return false; 4765 RulesetRuleParamComponent o = (RulesetRuleParamComponent) other_; 4766 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 4767 } 4768 4769 public boolean isEmpty() { 4770 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 4771 } 4772 4773 public String fhirType() { 4774 return "TestScript.ruleset.rule.param"; 4775 4776 } 4777 4778 } 4779 4780 @Block() 4781 public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement { 4782 /** 4783 * Action would contain either an operation or an assertion. 4784 */ 4785 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4786 @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 4787 protected List<SetupActionComponent> action; 4788 4789 private static final long serialVersionUID = -123374486L; 4790 4791 /** 4792 * Constructor 4793 */ 4794 public TestScriptSetupComponent() { 4795 super(); 4796 } 4797 4798 /** 4799 * @return {@link #action} (Action would contain either an operation or an assertion.) 4800 */ 4801 public List<SetupActionComponent> getAction() { 4802 if (this.action == null) 4803 this.action = new ArrayList<SetupActionComponent>(); 4804 return this.action; 4805 } 4806 4807 /** 4808 * @return Returns a reference to <code>this</code> for easy method chaining 4809 */ 4810 public TestScriptSetupComponent setAction(List<SetupActionComponent> theAction) { 4811 this.action = theAction; 4812 return this; 4813 } 4814 4815 public boolean hasAction() { 4816 if (this.action == null) 4817 return false; 4818 for (SetupActionComponent item : this.action) 4819 if (!item.isEmpty()) 4820 return true; 4821 return false; 4822 } 4823 4824 public SetupActionComponent addAction() { //3 4825 SetupActionComponent t = new SetupActionComponent(); 4826 if (this.action == null) 4827 this.action = new ArrayList<SetupActionComponent>(); 4828 this.action.add(t); 4829 return t; 4830 } 4831 4832 public TestScriptSetupComponent addAction(SetupActionComponent t) { //3 4833 if (t == null) 4834 return this; 4835 if (this.action == null) 4836 this.action = new ArrayList<SetupActionComponent>(); 4837 this.action.add(t); 4838 return this; 4839 } 4840 4841 /** 4842 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 4843 */ 4844 public SetupActionComponent getActionFirstRep() { 4845 if (getAction().isEmpty()) { 4846 addAction(); 4847 } 4848 return getAction().get(0); 4849 } 4850 4851 protected void listChildren(List<Property> children) { 4852 super.listChildren(children); 4853 children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 4854 } 4855 4856 @Override 4857 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4858 switch (_hash) { 4859 case -1422950858: /*action*/ return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action); 4860 default: return super.getNamedProperty(_hash, _name, _checkValid); 4861 } 4862 4863 } 4864 4865 @Override 4866 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4867 switch (hash) { 4868 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent 4869 default: return super.getProperty(hash, name, checkValid); 4870 } 4871 4872 } 4873 4874 @Override 4875 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4876 switch (hash) { 4877 case -1422950858: // action 4878 this.getAction().add((SetupActionComponent) value); // SetupActionComponent 4879 return value; 4880 default: return super.setProperty(hash, name, value); 4881 } 4882 4883 } 4884 4885 @Override 4886 public Base setProperty(String name, Base value) throws FHIRException { 4887 if (name.equals("action")) { 4888 this.getAction().add((SetupActionComponent) value); 4889 } else 4890 return super.setProperty(name, value); 4891 return value; 4892 } 4893 4894 @Override 4895 public Base makeProperty(int hash, String name) throws FHIRException { 4896 switch (hash) { 4897 case -1422950858: return addAction(); 4898 default: return super.makeProperty(hash, name); 4899 } 4900 4901 } 4902 4903 @Override 4904 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4905 switch (hash) { 4906 case -1422950858: /*action*/ return new String[] {}; 4907 default: return super.getTypesForProperty(hash, name); 4908 } 4909 4910 } 4911 4912 @Override 4913 public Base addChild(String name) throws FHIRException { 4914 if (name.equals("action")) { 4915 return addAction(); 4916 } 4917 else 4918 return super.addChild(name); 4919 } 4920 4921 public TestScriptSetupComponent copy() { 4922 TestScriptSetupComponent dst = new TestScriptSetupComponent(); 4923 copyValues(dst); 4924 if (action != null) { 4925 dst.action = new ArrayList<SetupActionComponent>(); 4926 for (SetupActionComponent i : action) 4927 dst.action.add(i.copy()); 4928 }; 4929 return dst; 4930 } 4931 4932 @Override 4933 public boolean equalsDeep(Base other_) { 4934 if (!super.equalsDeep(other_)) 4935 return false; 4936 if (!(other_ instanceof TestScriptSetupComponent)) 4937 return false; 4938 TestScriptSetupComponent o = (TestScriptSetupComponent) other_; 4939 return compareDeep(action, o.action, true); 4940 } 4941 4942 @Override 4943 public boolean equalsShallow(Base other_) { 4944 if (!super.equalsShallow(other_)) 4945 return false; 4946 if (!(other_ instanceof TestScriptSetupComponent)) 4947 return false; 4948 TestScriptSetupComponent o = (TestScriptSetupComponent) other_; 4949 return true; 4950 } 4951 4952 public boolean isEmpty() { 4953 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action); 4954 } 4955 4956 public String fhirType() { 4957 return "TestScript.setup"; 4958 4959 } 4960 4961 } 4962 4963 @Block() 4964 public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement { 4965 /** 4966 * The operation to perform. 4967 */ 4968 @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false) 4969 @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." ) 4970 protected SetupActionOperationComponent operation; 4971 4972 /** 4973 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 4974 */ 4975 @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false) 4976 @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 4977 protected SetupActionAssertComponent assert_; 4978 4979 private static final long serialVersionUID = -252088305L; 4980 4981 /** 4982 * Constructor 4983 */ 4984 public SetupActionComponent() { 4985 super(); 4986 } 4987 4988 /** 4989 * @return {@link #operation} (The operation to perform.) 4990 */ 4991 public SetupActionOperationComponent getOperation() { 4992 if (this.operation == null) 4993 if (Configuration.errorOnAutoCreate()) 4994 throw new Error("Attempt to auto-create SetupActionComponent.operation"); 4995 else if (Configuration.doAutoCreate()) 4996 this.operation = new SetupActionOperationComponent(); // cc 4997 return this.operation; 4998 } 4999 5000 public boolean hasOperation() { 5001 return this.operation != null && !this.operation.isEmpty(); 5002 } 5003 5004 /** 5005 * @param value {@link #operation} (The operation to perform.) 5006 */ 5007 public SetupActionComponent setOperation(SetupActionOperationComponent value) { 5008 this.operation = value; 5009 return this; 5010 } 5011 5012 /** 5013 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 5014 */ 5015 public SetupActionAssertComponent getAssert() { 5016 if (this.assert_ == null) 5017 if (Configuration.errorOnAutoCreate()) 5018 throw new Error("Attempt to auto-create SetupActionComponent.assert_"); 5019 else if (Configuration.doAutoCreate()) 5020 this.assert_ = new SetupActionAssertComponent(); // cc 5021 return this.assert_; 5022 } 5023 5024 public boolean hasAssert() { 5025 return this.assert_ != null && !this.assert_.isEmpty(); 5026 } 5027 5028 /** 5029 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 5030 */ 5031 public SetupActionComponent setAssert(SetupActionAssertComponent value) { 5032 this.assert_ = value; 5033 return this; 5034 } 5035 5036 protected void listChildren(List<Property> children) { 5037 super.listChildren(children); 5038 children.add(new Property("operation", "", "The operation to perform.", 0, 1, operation)); 5039 children.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, 1, assert_)); 5040 } 5041 5042 @Override 5043 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5044 switch (_hash) { 5045 case 1662702951: /*operation*/ return new Property("operation", "", "The operation to perform.", 0, 1, operation); 5046 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_); 5047 default: return super.getNamedProperty(_hash, _name, _checkValid); 5048 } 5049 5050 } 5051 5052 @Override 5053 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5054 switch (hash) { 5055 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 5056 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 5057 default: return super.getProperty(hash, name, checkValid); 5058 } 5059 5060 } 5061 5062 @Override 5063 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5064 switch (hash) { 5065 case 1662702951: // operation 5066 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 5067 return value; 5068 case -1408208058: // assert 5069 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 5070 return value; 5071 default: return super.setProperty(hash, name, value); 5072 } 5073 5074 } 5075 5076 @Override 5077 public Base setProperty(String name, Base value) throws FHIRException { 5078 if (name.equals("operation")) { 5079 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 5080 } else if (name.equals("assert")) { 5081 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 5082 } else 5083 return super.setProperty(name, value); 5084 return value; 5085 } 5086 5087 @Override 5088 public Base makeProperty(int hash, String name) throws FHIRException { 5089 switch (hash) { 5090 case 1662702951: return getOperation(); 5091 case -1408208058: return getAssert(); 5092 default: return super.makeProperty(hash, name); 5093 } 5094 5095 } 5096 5097 @Override 5098 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5099 switch (hash) { 5100 case 1662702951: /*operation*/ return new String[] {}; 5101 case -1408208058: /*assert*/ return new String[] {}; 5102 default: return super.getTypesForProperty(hash, name); 5103 } 5104 5105 } 5106 5107 @Override 5108 public Base addChild(String name) throws FHIRException { 5109 if (name.equals("operation")) { 5110 this.operation = new SetupActionOperationComponent(); 5111 return this.operation; 5112 } 5113 else if (name.equals("assert")) { 5114 this.assert_ = new SetupActionAssertComponent(); 5115 return this.assert_; 5116 } 5117 else 5118 return super.addChild(name); 5119 } 5120 5121 public SetupActionComponent copy() { 5122 SetupActionComponent dst = new SetupActionComponent(); 5123 copyValues(dst); 5124 dst.operation = operation == null ? null : operation.copy(); 5125 dst.assert_ = assert_ == null ? null : assert_.copy(); 5126 return dst; 5127 } 5128 5129 @Override 5130 public boolean equalsDeep(Base other_) { 5131 if (!super.equalsDeep(other_)) 5132 return false; 5133 if (!(other_ instanceof SetupActionComponent)) 5134 return false; 5135 SetupActionComponent o = (SetupActionComponent) other_; 5136 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 5137 } 5138 5139 @Override 5140 public boolean equalsShallow(Base other_) { 5141 if (!super.equalsShallow(other_)) 5142 return false; 5143 if (!(other_ instanceof SetupActionComponent)) 5144 return false; 5145 SetupActionComponent o = (SetupActionComponent) other_; 5146 return true; 5147 } 5148 5149 public boolean isEmpty() { 5150 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_); 5151 } 5152 5153 public String fhirType() { 5154 return "TestScript.setup.action"; 5155 5156 } 5157 5158 } 5159 5160 @Block() 5161 public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement { 5162 /** 5163 * Server interaction or operation type. 5164 */ 5165 @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false) 5166 @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." ) 5167 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/testscript-operation-codes") 5168 protected Coding type; 5169 5170 /** 5171 * The type of the resource. See http://build.fhir.org/resourcelist.html. 5172 */ 5173 @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5174 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://build.fhir.org/resourcelist.html." ) 5175 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 5176 protected CodeType resource; 5177 5178 /** 5179 * The label would be used for tracking/logging purposes by test engines. 5180 */ 5181 @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5182 @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 5183 protected StringType label; 5184 5185 /** 5186 * The description would be used by test engines for tracking and reporting purposes. 5187 */ 5188 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 5189 @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 5190 protected StringType description; 5191 5192 /** 5193 * The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5194 */ 5195 @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 5196 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Accept' header." ) 5197 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 5198 protected Enumeration<ContentType> accept; 5199 5200 /** 5201 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5202 */ 5203 @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 5204 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 5205 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 5206 protected Enumeration<ContentType> contentType; 5207 5208 /** 5209 * The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5210 */ 5211 @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5212 @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." ) 5213 protected IntegerType destination; 5214 5215 /** 5216 * 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. 5217 */ 5218 @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) 5219 @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." ) 5220 protected BooleanType encodeRequestUrl; 5221 5222 /** 5223 * The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5224 */ 5225 @Child(name = "origin", type = {IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false) 5226 @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." ) 5227 protected IntegerType origin; 5228 5229 /** 5230 * Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5231 */ 5232 @Child(name = "params", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 5233 @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type]. Used to set parts of the request URL explicitly." ) 5234 protected StringType params; 5235 5236 /** 5237 * Header elements would be used to set HTTP headers. 5238 */ 5239 @Child(name = "requestHeader", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5240 @Description(shortDefinition="Each operation can have one or more header elements", formalDefinition="Header elements would be used to set HTTP headers." ) 5241 protected List<SetupActionOperationRequestHeaderComponent> requestHeader; 5242 5243 /** 5244 * The fixture id (maybe new) to map to the request. 5245 */ 5246 @Child(name = "requestId", type = {IdType.class}, order=12, min=0, max=1, modifier=false, summary=false) 5247 @Description(shortDefinition="Fixture Id of mapped request", formalDefinition="The fixture id (maybe new) to map to the request." ) 5248 protected IdType requestId; 5249 5250 /** 5251 * The fixture id (maybe new) to map to the response. 5252 */ 5253 @Child(name = "responseId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false) 5254 @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." ) 5255 protected IdType responseId; 5256 5257 /** 5258 * The id of the fixture used as the body of a PUT or POST request. 5259 */ 5260 @Child(name = "sourceId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false) 5261 @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." ) 5262 protected IdType sourceId; 5263 5264 /** 5265 * Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5266 */ 5267 @Child(name = "targetId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false) 5268 @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." ) 5269 protected IdType targetId; 5270 5271 /** 5272 * Complete request URL. 5273 */ 5274 @Child(name = "url", type = {StringType.class}, order=16, min=0, max=1, modifier=false, summary=false) 5275 @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." ) 5276 protected StringType url; 5277 5278 private static final long serialVersionUID = -488909648L; 5279 5280 /** 5281 * Constructor 5282 */ 5283 public SetupActionOperationComponent() { 5284 super(); 5285 } 5286 5287 /** 5288 * @return {@link #type} (Server interaction or operation type.) 5289 */ 5290 public Coding getType() { 5291 if (this.type == null) 5292 if (Configuration.errorOnAutoCreate()) 5293 throw new Error("Attempt to auto-create SetupActionOperationComponent.type"); 5294 else if (Configuration.doAutoCreate()) 5295 this.type = new Coding(); // cc 5296 return this.type; 5297 } 5298 5299 public boolean hasType() { 5300 return this.type != null && !this.type.isEmpty(); 5301 } 5302 5303 /** 5304 * @param value {@link #type} (Server interaction or operation type.) 5305 */ 5306 public SetupActionOperationComponent setType(Coding value) { 5307 this.type = value; 5308 return this; 5309 } 5310 5311 /** 5312 * @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 5313 */ 5314 public CodeType getResourceElement() { 5315 if (this.resource == null) 5316 if (Configuration.errorOnAutoCreate()) 5317 throw new Error("Attempt to auto-create SetupActionOperationComponent.resource"); 5318 else if (Configuration.doAutoCreate()) 5319 this.resource = new CodeType(); // bb 5320 return this.resource; 5321 } 5322 5323 public boolean hasResourceElement() { 5324 return this.resource != null && !this.resource.isEmpty(); 5325 } 5326 5327 public boolean hasResource() { 5328 return this.resource != null && !this.resource.isEmpty(); 5329 } 5330 5331 /** 5332 * @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 5333 */ 5334 public SetupActionOperationComponent setResourceElement(CodeType value) { 5335 this.resource = value; 5336 return this; 5337 } 5338 5339 /** 5340 * @return The type of the resource. See http://build.fhir.org/resourcelist.html. 5341 */ 5342 public String getResource() { 5343 return this.resource == null ? null : this.resource.getValue(); 5344 } 5345 5346 /** 5347 * @param value The type of the resource. See http://build.fhir.org/resourcelist.html. 5348 */ 5349 public SetupActionOperationComponent setResource(String value) { 5350 if (Utilities.noString(value)) 5351 this.resource = null; 5352 else { 5353 if (this.resource == null) 5354 this.resource = new CodeType(); 5355 this.resource.setValue(value); 5356 } 5357 return this; 5358 } 5359 5360 /** 5361 * @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 5362 */ 5363 public StringType getLabelElement() { 5364 if (this.label == null) 5365 if (Configuration.errorOnAutoCreate()) 5366 throw new Error("Attempt to auto-create SetupActionOperationComponent.label"); 5367 else if (Configuration.doAutoCreate()) 5368 this.label = new StringType(); // bb 5369 return this.label; 5370 } 5371 5372 public boolean hasLabelElement() { 5373 return this.label != null && !this.label.isEmpty(); 5374 } 5375 5376 public boolean hasLabel() { 5377 return this.label != null && !this.label.isEmpty(); 5378 } 5379 5380 /** 5381 * @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 5382 */ 5383 public SetupActionOperationComponent setLabelElement(StringType value) { 5384 this.label = value; 5385 return this; 5386 } 5387 5388 /** 5389 * @return The label would be used for tracking/logging purposes by test engines. 5390 */ 5391 public String getLabel() { 5392 return this.label == null ? null : this.label.getValue(); 5393 } 5394 5395 /** 5396 * @param value The label would be used for tracking/logging purposes by test engines. 5397 */ 5398 public SetupActionOperationComponent setLabel(String value) { 5399 if (Utilities.noString(value)) 5400 this.label = null; 5401 else { 5402 if (this.label == null) 5403 this.label = new StringType(); 5404 this.label.setValue(value); 5405 } 5406 return this; 5407 } 5408 5409 /** 5410 * @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 5411 */ 5412 public StringType getDescriptionElement() { 5413 if (this.description == null) 5414 if (Configuration.errorOnAutoCreate()) 5415 throw new Error("Attempt to auto-create SetupActionOperationComponent.description"); 5416 else if (Configuration.doAutoCreate()) 5417 this.description = new StringType(); // bb 5418 return this.description; 5419 } 5420 5421 public boolean hasDescriptionElement() { 5422 return this.description != null && !this.description.isEmpty(); 5423 } 5424 5425 public boolean hasDescription() { 5426 return this.description != null && !this.description.isEmpty(); 5427 } 5428 5429 /** 5430 * @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 5431 */ 5432 public SetupActionOperationComponent setDescriptionElement(StringType value) { 5433 this.description = value; 5434 return this; 5435 } 5436 5437 /** 5438 * @return The description would be used by test engines for tracking and reporting purposes. 5439 */ 5440 public String getDescription() { 5441 return this.description == null ? null : this.description.getValue(); 5442 } 5443 5444 /** 5445 * @param value The description would be used by test engines for tracking and reporting purposes. 5446 */ 5447 public SetupActionOperationComponent setDescription(String value) { 5448 if (Utilities.noString(value)) 5449 this.description = null; 5450 else { 5451 if (this.description == null) 5452 this.description = new StringType(); 5453 this.description.setValue(value); 5454 } 5455 return this; 5456 } 5457 5458 /** 5459 * @return {@link #accept} (The content-type or mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value 5460 */ 5461 public Enumeration<ContentType> getAcceptElement() { 5462 if (this.accept == null) 5463 if (Configuration.errorOnAutoCreate()) 5464 throw new Error("Attempt to auto-create SetupActionOperationComponent.accept"); 5465 else if (Configuration.doAutoCreate()) 5466 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 5467 return this.accept; 5468 } 5469 5470 public boolean hasAcceptElement() { 5471 return this.accept != null && !this.accept.isEmpty(); 5472 } 5473 5474 public boolean hasAccept() { 5475 return this.accept != null && !this.accept.isEmpty(); 5476 } 5477 5478 /** 5479 * @param value {@link #accept} (The content-type or mime-type to use for RESTful operation in the 'Accept' header.). This is the underlying object with id, value and extensions. The accessor "getAccept" gives direct access to the value 5480 */ 5481 public SetupActionOperationComponent setAcceptElement(Enumeration<ContentType> value) { 5482 this.accept = value; 5483 return this; 5484 } 5485 5486 /** 5487 * @return The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5488 */ 5489 public ContentType getAccept() { 5490 return this.accept == null ? null : this.accept.getValue(); 5491 } 5492 5493 /** 5494 * @param value The content-type or mime-type to use for RESTful operation in the 'Accept' header. 5495 */ 5496 public SetupActionOperationComponent setAccept(ContentType value) { 5497 if (value == null) 5498 this.accept = null; 5499 else { 5500 if (this.accept == null) 5501 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 5502 this.accept.setValue(value); 5503 } 5504 return this; 5505 } 5506 5507 /** 5508 * @return {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 5509 */ 5510 public Enumeration<ContentType> getContentTypeElement() { 5511 if (this.contentType == null) 5512 if (Configuration.errorOnAutoCreate()) 5513 throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType"); 5514 else if (Configuration.doAutoCreate()) 5515 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 5516 return this.contentType; 5517 } 5518 5519 public boolean hasContentTypeElement() { 5520 return this.contentType != null && !this.contentType.isEmpty(); 5521 } 5522 5523 public boolean hasContentType() { 5524 return this.contentType != null && !this.contentType.isEmpty(); 5525 } 5526 5527 /** 5528 * @param value {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 5529 */ 5530 public SetupActionOperationComponent setContentTypeElement(Enumeration<ContentType> value) { 5531 this.contentType = value; 5532 return this; 5533 } 5534 5535 /** 5536 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5537 */ 5538 public ContentType getContentType() { 5539 return this.contentType == null ? null : this.contentType.getValue(); 5540 } 5541 5542 /** 5543 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5544 */ 5545 public SetupActionOperationComponent setContentType(ContentType value) { 5546 if (value == null) 5547 this.contentType = null; 5548 else { 5549 if (this.contentType == null) 5550 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 5551 this.contentType.setValue(value); 5552 } 5553 return this; 5554 } 5555 5556 /** 5557 * @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 5558 */ 5559 public IntegerType getDestinationElement() { 5560 if (this.destination == null) 5561 if (Configuration.errorOnAutoCreate()) 5562 throw new Error("Attempt to auto-create SetupActionOperationComponent.destination"); 5563 else if (Configuration.doAutoCreate()) 5564 this.destination = new IntegerType(); // bb 5565 return this.destination; 5566 } 5567 5568 public boolean hasDestinationElement() { 5569 return this.destination != null && !this.destination.isEmpty(); 5570 } 5571 5572 public boolean hasDestination() { 5573 return this.destination != null && !this.destination.isEmpty(); 5574 } 5575 5576 /** 5577 * @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 5578 */ 5579 public SetupActionOperationComponent setDestinationElement(IntegerType value) { 5580 this.destination = value; 5581 return this; 5582 } 5583 5584 /** 5585 * @return The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5586 */ 5587 public int getDestination() { 5588 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 5589 } 5590 5591 /** 5592 * @param value The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5593 */ 5594 public SetupActionOperationComponent setDestination(int value) { 5595 if (this.destination == null) 5596 this.destination = new IntegerType(); 5597 this.destination.setValue(value); 5598 return this; 5599 } 5600 5601 /** 5602 * @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 5603 */ 5604 public BooleanType getEncodeRequestUrlElement() { 5605 if (this.encodeRequestUrl == null) 5606 if (Configuration.errorOnAutoCreate()) 5607 throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl"); 5608 else if (Configuration.doAutoCreate()) 5609 this.encodeRequestUrl = new BooleanType(); // bb 5610 return this.encodeRequestUrl; 5611 } 5612 5613 public boolean hasEncodeRequestUrlElement() { 5614 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 5615 } 5616 5617 public boolean hasEncodeRequestUrl() { 5618 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 5619 } 5620 5621 /** 5622 * @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 5623 */ 5624 public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 5625 this.encodeRequestUrl = value; 5626 return this; 5627 } 5628 5629 /** 5630 * @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. 5631 */ 5632 public boolean getEncodeRequestUrl() { 5633 return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue(); 5634 } 5635 5636 /** 5637 * @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. 5638 */ 5639 public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 5640 if (this.encodeRequestUrl == null) 5641 this.encodeRequestUrl = new BooleanType(); 5642 this.encodeRequestUrl.setValue(value); 5643 return this; 5644 } 5645 5646 /** 5647 * @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 5648 */ 5649 public IntegerType getOriginElement() { 5650 if (this.origin == null) 5651 if (Configuration.errorOnAutoCreate()) 5652 throw new Error("Attempt to auto-create SetupActionOperationComponent.origin"); 5653 else if (Configuration.doAutoCreate()) 5654 this.origin = new IntegerType(); // bb 5655 return this.origin; 5656 } 5657 5658 public boolean hasOriginElement() { 5659 return this.origin != null && !this.origin.isEmpty(); 5660 } 5661 5662 public boolean hasOrigin() { 5663 return this.origin != null && !this.origin.isEmpty(); 5664 } 5665 5666 /** 5667 * @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 5668 */ 5669 public SetupActionOperationComponent setOriginElement(IntegerType value) { 5670 this.origin = value; 5671 return this; 5672 } 5673 5674 /** 5675 * @return The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5676 */ 5677 public int getOrigin() { 5678 return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue(); 5679 } 5680 5681 /** 5682 * @param value The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5683 */ 5684 public SetupActionOperationComponent setOrigin(int value) { 5685 if (this.origin == null) 5686 this.origin = new IntegerType(); 5687 this.origin.setValue(value); 5688 return this; 5689 } 5690 5691 /** 5692 * @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 5693 */ 5694 public StringType getParamsElement() { 5695 if (this.params == null) 5696 if (Configuration.errorOnAutoCreate()) 5697 throw new Error("Attempt to auto-create SetupActionOperationComponent.params"); 5698 else if (Configuration.doAutoCreate()) 5699 this.params = new StringType(); // bb 5700 return this.params; 5701 } 5702 5703 public boolean hasParamsElement() { 5704 return this.params != null && !this.params.isEmpty(); 5705 } 5706 5707 public boolean hasParams() { 5708 return this.params != null && !this.params.isEmpty(); 5709 } 5710 5711 /** 5712 * @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 5713 */ 5714 public SetupActionOperationComponent setParamsElement(StringType value) { 5715 this.params = value; 5716 return this; 5717 } 5718 5719 /** 5720 * @return Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5721 */ 5722 public String getParams() { 5723 return this.params == null ? null : this.params.getValue(); 5724 } 5725 5726 /** 5727 * @param value Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5728 */ 5729 public SetupActionOperationComponent setParams(String value) { 5730 if (Utilities.noString(value)) 5731 this.params = null; 5732 else { 5733 if (this.params == null) 5734 this.params = new StringType(); 5735 this.params.setValue(value); 5736 } 5737 return this; 5738 } 5739 5740 /** 5741 * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) 5742 */ 5743 public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 5744 if (this.requestHeader == null) 5745 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5746 return this.requestHeader; 5747 } 5748 5749 /** 5750 * @return Returns a reference to <code>this</code> for easy method chaining 5751 */ 5752 public SetupActionOperationComponent setRequestHeader(List<SetupActionOperationRequestHeaderComponent> theRequestHeader) { 5753 this.requestHeader = theRequestHeader; 5754 return this; 5755 } 5756 5757 public boolean hasRequestHeader() { 5758 if (this.requestHeader == null) 5759 return false; 5760 for (SetupActionOperationRequestHeaderComponent item : this.requestHeader) 5761 if (!item.isEmpty()) 5762 return true; 5763 return false; 5764 } 5765 5766 public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3 5767 SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent(); 5768 if (this.requestHeader == null) 5769 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5770 this.requestHeader.add(t); 5771 return t; 5772 } 5773 5774 public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3 5775 if (t == null) 5776 return this; 5777 if (this.requestHeader == null) 5778 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5779 this.requestHeader.add(t); 5780 return this; 5781 } 5782 5783 /** 5784 * @return The first repetition of repeating field {@link #requestHeader}, creating it if it does not already exist 5785 */ 5786 public SetupActionOperationRequestHeaderComponent getRequestHeaderFirstRep() { 5787 if (getRequestHeader().isEmpty()) { 5788 addRequestHeader(); 5789 } 5790 return getRequestHeader().get(0); 5791 } 5792 5793 /** 5794 * @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 5795 */ 5796 public IdType getRequestIdElement() { 5797 if (this.requestId == null) 5798 if (Configuration.errorOnAutoCreate()) 5799 throw new Error("Attempt to auto-create SetupActionOperationComponent.requestId"); 5800 else if (Configuration.doAutoCreate()) 5801 this.requestId = new IdType(); // bb 5802 return this.requestId; 5803 } 5804 5805 public boolean hasRequestIdElement() { 5806 return this.requestId != null && !this.requestId.isEmpty(); 5807 } 5808 5809 public boolean hasRequestId() { 5810 return this.requestId != null && !this.requestId.isEmpty(); 5811 } 5812 5813 /** 5814 * @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 5815 */ 5816 public SetupActionOperationComponent setRequestIdElement(IdType value) { 5817 this.requestId = value; 5818 return this; 5819 } 5820 5821 /** 5822 * @return The fixture id (maybe new) to map to the request. 5823 */ 5824 public String getRequestId() { 5825 return this.requestId == null ? null : this.requestId.getValue(); 5826 } 5827 5828 /** 5829 * @param value The fixture id (maybe new) to map to the request. 5830 */ 5831 public SetupActionOperationComponent setRequestId(String value) { 5832 if (Utilities.noString(value)) 5833 this.requestId = null; 5834 else { 5835 if (this.requestId == null) 5836 this.requestId = new IdType(); 5837 this.requestId.setValue(value); 5838 } 5839 return this; 5840 } 5841 5842 /** 5843 * @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 5844 */ 5845 public IdType getResponseIdElement() { 5846 if (this.responseId == null) 5847 if (Configuration.errorOnAutoCreate()) 5848 throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId"); 5849 else if (Configuration.doAutoCreate()) 5850 this.responseId = new IdType(); // bb 5851 return this.responseId; 5852 } 5853 5854 public boolean hasResponseIdElement() { 5855 return this.responseId != null && !this.responseId.isEmpty(); 5856 } 5857 5858 public boolean hasResponseId() { 5859 return this.responseId != null && !this.responseId.isEmpty(); 5860 } 5861 5862 /** 5863 * @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 5864 */ 5865 public SetupActionOperationComponent setResponseIdElement(IdType value) { 5866 this.responseId = value; 5867 return this; 5868 } 5869 5870 /** 5871 * @return The fixture id (maybe new) to map to the response. 5872 */ 5873 public String getResponseId() { 5874 return this.responseId == null ? null : this.responseId.getValue(); 5875 } 5876 5877 /** 5878 * @param value The fixture id (maybe new) to map to the response. 5879 */ 5880 public SetupActionOperationComponent setResponseId(String value) { 5881 if (Utilities.noString(value)) 5882 this.responseId = null; 5883 else { 5884 if (this.responseId == null) 5885 this.responseId = new IdType(); 5886 this.responseId.setValue(value); 5887 } 5888 return this; 5889 } 5890 5891 /** 5892 * @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 5893 */ 5894 public IdType getSourceIdElement() { 5895 if (this.sourceId == null) 5896 if (Configuration.errorOnAutoCreate()) 5897 throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId"); 5898 else if (Configuration.doAutoCreate()) 5899 this.sourceId = new IdType(); // bb 5900 return this.sourceId; 5901 } 5902 5903 public boolean hasSourceIdElement() { 5904 return this.sourceId != null && !this.sourceId.isEmpty(); 5905 } 5906 5907 public boolean hasSourceId() { 5908 return this.sourceId != null && !this.sourceId.isEmpty(); 5909 } 5910 5911 /** 5912 * @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 5913 */ 5914 public SetupActionOperationComponent setSourceIdElement(IdType value) { 5915 this.sourceId = value; 5916 return this; 5917 } 5918 5919 /** 5920 * @return The id of the fixture used as the body of a PUT or POST request. 5921 */ 5922 public String getSourceId() { 5923 return this.sourceId == null ? null : this.sourceId.getValue(); 5924 } 5925 5926 /** 5927 * @param value The id of the fixture used as the body of a PUT or POST request. 5928 */ 5929 public SetupActionOperationComponent setSourceId(String value) { 5930 if (Utilities.noString(value)) 5931 this.sourceId = null; 5932 else { 5933 if (this.sourceId == null) 5934 this.sourceId = new IdType(); 5935 this.sourceId.setValue(value); 5936 } 5937 return this; 5938 } 5939 5940 /** 5941 * @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 5942 */ 5943 public IdType getTargetIdElement() { 5944 if (this.targetId == null) 5945 if (Configuration.errorOnAutoCreate()) 5946 throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId"); 5947 else if (Configuration.doAutoCreate()) 5948 this.targetId = new IdType(); // bb 5949 return this.targetId; 5950 } 5951 5952 public boolean hasTargetIdElement() { 5953 return this.targetId != null && !this.targetId.isEmpty(); 5954 } 5955 5956 public boolean hasTargetId() { 5957 return this.targetId != null && !this.targetId.isEmpty(); 5958 } 5959 5960 /** 5961 * @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 5962 */ 5963 public SetupActionOperationComponent setTargetIdElement(IdType value) { 5964 this.targetId = value; 5965 return this; 5966 } 5967 5968 /** 5969 * @return Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5970 */ 5971 public String getTargetId() { 5972 return this.targetId == null ? null : this.targetId.getValue(); 5973 } 5974 5975 /** 5976 * @param value Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5977 */ 5978 public SetupActionOperationComponent setTargetId(String value) { 5979 if (Utilities.noString(value)) 5980 this.targetId = null; 5981 else { 5982 if (this.targetId == null) 5983 this.targetId = new IdType(); 5984 this.targetId.setValue(value); 5985 } 5986 return this; 5987 } 5988 5989 /** 5990 * @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 5991 */ 5992 public StringType getUrlElement() { 5993 if (this.url == null) 5994 if (Configuration.errorOnAutoCreate()) 5995 throw new Error("Attempt to auto-create SetupActionOperationComponent.url"); 5996 else if (Configuration.doAutoCreate()) 5997 this.url = new StringType(); // bb 5998 return this.url; 5999 } 6000 6001 public boolean hasUrlElement() { 6002 return this.url != null && !this.url.isEmpty(); 6003 } 6004 6005 public boolean hasUrl() { 6006 return this.url != null && !this.url.isEmpty(); 6007 } 6008 6009 /** 6010 * @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 6011 */ 6012 public SetupActionOperationComponent setUrlElement(StringType value) { 6013 this.url = value; 6014 return this; 6015 } 6016 6017 /** 6018 * @return Complete request URL. 6019 */ 6020 public String getUrl() { 6021 return this.url == null ? null : this.url.getValue(); 6022 } 6023 6024 /** 6025 * @param value Complete request URL. 6026 */ 6027 public SetupActionOperationComponent setUrl(String value) { 6028 if (Utilities.noString(value)) 6029 this.url = null; 6030 else { 6031 if (this.url == null) 6032 this.url = new StringType(); 6033 this.url.setValue(value); 6034 } 6035 return this; 6036 } 6037 6038 protected void listChildren(List<Property> children) { 6039 super.listChildren(children); 6040 children.add(new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type)); 6041 children.add(new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource)); 6042 children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label)); 6043 children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description)); 6044 children.add(new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept)); 6045 children.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType)); 6046 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)); 6047 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)); 6048 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)); 6049 children.add(new Property("params", "string", "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", 0, 1, params)); 6050 children.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader)); 6051 children.add(new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId)); 6052 children.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId)); 6053 children.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, 1, sourceId)); 6054 children.add(new Property("targetId", "id", "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", 0, 1, targetId)); 6055 children.add(new Property("url", "string", "Complete request URL.", 0, 1, url)); 6056 } 6057 6058 @Override 6059 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6060 switch (_hash) { 6061 case 3575610: /*type*/ return new Property("type", "Coding", "Server interaction or operation type.", 0, 1, type); 6062 case -341064690: /*resource*/ return new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource); 6063 case 102727412: /*label*/ return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label); 6064 case -1724546052: /*description*/ return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description); 6065 case -1423461112: /*accept*/ return new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, 1, accept); 6066 case -389131437: /*contentType*/ return new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType); 6067 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); 6068 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); 6069 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); 6070 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); 6071 case 1074158076: /*requestHeader*/ return new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader); 6072 case 693933066: /*requestId*/ return new Property("requestId", "id", "The fixture id (maybe new) to map to the request.", 0, 1, requestId); 6073 case -633138884: /*responseId*/ return new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, 1, responseId); 6074 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); 6075 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); 6076 case 116079: /*url*/ return new Property("url", "string", "Complete request URL.", 0, 1, url); 6077 default: return super.getNamedProperty(_hash, _name, _checkValid); 6078 } 6079 6080 } 6081 6082 @Override 6083 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6084 switch (hash) { 6085 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 6086 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 6087 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 6088 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 6089 case -1423461112: /*accept*/ return this.accept == null ? new Base[0] : new Base[] {this.accept}; // Enumeration<ContentType> 6090 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType> 6091 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 6092 case -1760554218: /*encodeRequestUrl*/ return this.encodeRequestUrl == null ? new Base[0] : new Base[] {this.encodeRequestUrl}; // BooleanType 6093 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // IntegerType 6094 case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType 6095 case 1074158076: /*requestHeader*/ return this.requestHeader == null ? new Base[0] : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent 6096 case 693933066: /*requestId*/ return this.requestId == null ? new Base[0] : new Base[] {this.requestId}; // IdType 6097 case -633138884: /*responseId*/ return this.responseId == null ? new Base[0] : new Base[] {this.responseId}; // IdType 6098 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 6099 case -441951604: /*targetId*/ return this.targetId == null ? new Base[0] : new Base[] {this.targetId}; // IdType 6100 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // StringType 6101 default: return super.getProperty(hash, name, checkValid); 6102 } 6103 6104 } 6105 6106 @Override 6107 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6108 switch (hash) { 6109 case 3575610: // type 6110 this.type = castToCoding(value); // Coding 6111 return value; 6112 case -341064690: // resource 6113 this.resource = castToCode(value); // CodeType 6114 return value; 6115 case 102727412: // label 6116 this.label = castToString(value); // StringType 6117 return value; 6118 case -1724546052: // description 6119 this.description = castToString(value); // StringType 6120 return value; 6121 case -1423461112: // accept 6122 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 6123 this.accept = (Enumeration) value; // Enumeration<ContentType> 6124 return value; 6125 case -389131437: // contentType 6126 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 6127 this.contentType = (Enumeration) value; // Enumeration<ContentType> 6128 return value; 6129 case -1429847026: // destination 6130 this.destination = castToInteger(value); // IntegerType 6131 return value; 6132 case -1760554218: // encodeRequestUrl 6133 this.encodeRequestUrl = castToBoolean(value); // BooleanType 6134 return value; 6135 case -1008619738: // origin 6136 this.origin = castToInteger(value); // IntegerType 6137 return value; 6138 case -995427962: // params 6139 this.params = castToString(value); // StringType 6140 return value; 6141 case 1074158076: // requestHeader 6142 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent 6143 return value; 6144 case 693933066: // requestId 6145 this.requestId = castToId(value); // IdType 6146 return value; 6147 case -633138884: // responseId 6148 this.responseId = castToId(value); // IdType 6149 return value; 6150 case 1746327190: // sourceId 6151 this.sourceId = castToId(value); // IdType 6152 return value; 6153 case -441951604: // targetId 6154 this.targetId = castToId(value); // IdType 6155 return value; 6156 case 116079: // url 6157 this.url = castToString(value); // StringType 6158 return value; 6159 default: return super.setProperty(hash, name, value); 6160 } 6161 6162 } 6163 6164 @Override 6165 public Base setProperty(String name, Base value) throws FHIRException { 6166 if (name.equals("type")) { 6167 this.type = castToCoding(value); // Coding 6168 } else if (name.equals("resource")) { 6169 this.resource = castToCode(value); // CodeType 6170 } else if (name.equals("label")) { 6171 this.label = castToString(value); // StringType 6172 } else if (name.equals("description")) { 6173 this.description = castToString(value); // StringType 6174 } else if (name.equals("accept")) { 6175 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 6176 this.accept = (Enumeration) value; // Enumeration<ContentType> 6177 } else if (name.equals("contentType")) { 6178 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 6179 this.contentType = (Enumeration) value; // Enumeration<ContentType> 6180 } else if (name.equals("destination")) { 6181 this.destination = castToInteger(value); // IntegerType 6182 } else if (name.equals("encodeRequestUrl")) { 6183 this.encodeRequestUrl = castToBoolean(value); // BooleanType 6184 } else if (name.equals("origin")) { 6185 this.origin = castToInteger(value); // IntegerType 6186 } else if (name.equals("params")) { 6187 this.params = castToString(value); // StringType 6188 } else if (name.equals("requestHeader")) { 6189 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); 6190 } else if (name.equals("requestId")) { 6191 this.requestId = castToId(value); // IdType 6192 } else if (name.equals("responseId")) { 6193 this.responseId = castToId(value); // IdType 6194 } else if (name.equals("sourceId")) { 6195 this.sourceId = castToId(value); // IdType 6196 } else if (name.equals("targetId")) { 6197 this.targetId = castToId(value); // IdType 6198 } else if (name.equals("url")) { 6199 this.url = castToString(value); // StringType 6200 } else 6201 return super.setProperty(name, value); 6202 return value; 6203 } 6204 6205 @Override 6206 public Base makeProperty(int hash, String name) throws FHIRException { 6207 switch (hash) { 6208 case 3575610: return getType(); 6209 case -341064690: return getResourceElement(); 6210 case 102727412: return getLabelElement(); 6211 case -1724546052: return getDescriptionElement(); 6212 case -1423461112: return getAcceptElement(); 6213 case -389131437: return getContentTypeElement(); 6214 case -1429847026: return getDestinationElement(); 6215 case -1760554218: return getEncodeRequestUrlElement(); 6216 case -1008619738: return getOriginElement(); 6217 case -995427962: return getParamsElement(); 6218 case 1074158076: return addRequestHeader(); 6219 case 693933066: return getRequestIdElement(); 6220 case -633138884: return getResponseIdElement(); 6221 case 1746327190: return getSourceIdElement(); 6222 case -441951604: return getTargetIdElement(); 6223 case 116079: return getUrlElement(); 6224 default: return super.makeProperty(hash, name); 6225 } 6226 6227 } 6228 6229 @Override 6230 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6231 switch (hash) { 6232 case 3575610: /*type*/ return new String[] {"Coding"}; 6233 case -341064690: /*resource*/ return new String[] {"code"}; 6234 case 102727412: /*label*/ return new String[] {"string"}; 6235 case -1724546052: /*description*/ return new String[] {"string"}; 6236 case -1423461112: /*accept*/ return new String[] {"code"}; 6237 case -389131437: /*contentType*/ return new String[] {"code"}; 6238 case -1429847026: /*destination*/ return new String[] {"integer"}; 6239 case -1760554218: /*encodeRequestUrl*/ return new String[] {"boolean"}; 6240 case -1008619738: /*origin*/ return new String[] {"integer"}; 6241 case -995427962: /*params*/ return new String[] {"string"}; 6242 case 1074158076: /*requestHeader*/ return new String[] {}; 6243 case 693933066: /*requestId*/ return new String[] {"id"}; 6244 case -633138884: /*responseId*/ return new String[] {"id"}; 6245 case 1746327190: /*sourceId*/ return new String[] {"id"}; 6246 case -441951604: /*targetId*/ return new String[] {"id"}; 6247 case 116079: /*url*/ return new String[] {"string"}; 6248 default: return super.getTypesForProperty(hash, name); 6249 } 6250 6251 } 6252 6253 @Override 6254 public Base addChild(String name) throws FHIRException { 6255 if (name.equals("type")) { 6256 this.type = new Coding(); 6257 return this.type; 6258 } 6259 else if (name.equals("resource")) { 6260 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 6261 } 6262 else if (name.equals("label")) { 6263 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 6264 } 6265 else if (name.equals("description")) { 6266 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 6267 } 6268 else if (name.equals("accept")) { 6269 throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept"); 6270 } 6271 else if (name.equals("contentType")) { 6272 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 6273 } 6274 else if (name.equals("destination")) { 6275 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 6276 } 6277 else if (name.equals("encodeRequestUrl")) { 6278 throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl"); 6279 } 6280 else if (name.equals("origin")) { 6281 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 6282 } 6283 else if (name.equals("params")) { 6284 throw new FHIRException("Cannot call addChild on a primitive type TestScript.params"); 6285 } 6286 else if (name.equals("requestHeader")) { 6287 return addRequestHeader(); 6288 } 6289 else if (name.equals("requestId")) { 6290 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestId"); 6291 } 6292 else if (name.equals("responseId")) { 6293 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId"); 6294 } 6295 else if (name.equals("sourceId")) { 6296 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 6297 } 6298 else if (name.equals("targetId")) { 6299 throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId"); 6300 } 6301 else if (name.equals("url")) { 6302 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 6303 } 6304 else 6305 return super.addChild(name); 6306 } 6307 6308 public SetupActionOperationComponent copy() { 6309 SetupActionOperationComponent dst = new SetupActionOperationComponent(); 6310 copyValues(dst); 6311 dst.type = type == null ? null : type.copy(); 6312 dst.resource = resource == null ? null : resource.copy(); 6313 dst.label = label == null ? null : label.copy(); 6314 dst.description = description == null ? null : description.copy(); 6315 dst.accept = accept == null ? null : accept.copy(); 6316 dst.contentType = contentType == null ? null : contentType.copy(); 6317 dst.destination = destination == null ? null : destination.copy(); 6318 dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy(); 6319 dst.origin = origin == null ? null : origin.copy(); 6320 dst.params = params == null ? null : params.copy(); 6321 if (requestHeader != null) { 6322 dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 6323 for (SetupActionOperationRequestHeaderComponent i : requestHeader) 6324 dst.requestHeader.add(i.copy()); 6325 }; 6326 dst.requestId = requestId == null ? null : requestId.copy(); 6327 dst.responseId = responseId == null ? null : responseId.copy(); 6328 dst.sourceId = sourceId == null ? null : sourceId.copy(); 6329 dst.targetId = targetId == null ? null : targetId.copy(); 6330 dst.url = url == null ? null : url.copy(); 6331 return dst; 6332 } 6333 6334 @Override 6335 public boolean equalsDeep(Base other_) { 6336 if (!super.equalsDeep(other_)) 6337 return false; 6338 if (!(other_ instanceof SetupActionOperationComponent)) 6339 return false; 6340 SetupActionOperationComponent o = (SetupActionOperationComponent) other_; 6341 return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true) 6342 && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true) 6343 && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true) 6344 && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true) 6345 && compareDeep(requestId, o.requestId, true) && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true) 6346 && compareDeep(targetId, o.targetId, true) && compareDeep(url, o.url, true); 6347 } 6348 6349 @Override 6350 public boolean equalsShallow(Base other_) { 6351 if (!super.equalsShallow(other_)) 6352 return false; 6353 if (!(other_ instanceof SetupActionOperationComponent)) 6354 return false; 6355 SetupActionOperationComponent o = (SetupActionOperationComponent) other_; 6356 return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true) 6357 && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true) 6358 && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(origin, o.origin, true) 6359 && compareValues(params, o.params, true) && compareValues(requestId, o.requestId, true) && compareValues(responseId, o.responseId, true) 6360 && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true) && compareValues(url, o.url, true) 6361 ; 6362 } 6363 6364 public boolean isEmpty() { 6365 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, resource, label, description 6366 , accept, contentType, destination, encodeRequestUrl, origin, params, requestHeader 6367 , requestId, responseId, sourceId, targetId, url); 6368 } 6369 6370 public String fhirType() { 6371 return "TestScript.setup.action.operation"; 6372 6373 } 6374 6375 } 6376 6377 @Block() 6378 public static class SetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement { 6379 /** 6380 * The HTTP header field e.g. "Accept". 6381 */ 6382 @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 6383 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." ) 6384 protected StringType field; 6385 6386 /** 6387 * The value of the header e.g. "application/fhir+xml". 6388 */ 6389 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 6390 @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/fhir+xml\"." ) 6391 protected StringType value; 6392 6393 private static final long serialVersionUID = 274395337L; 6394 6395 /** 6396 * Constructor 6397 */ 6398 public SetupActionOperationRequestHeaderComponent() { 6399 super(); 6400 } 6401 6402 /** 6403 * Constructor 6404 */ 6405 public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) { 6406 super(); 6407 this.field = field; 6408 this.value = value; 6409 } 6410 6411 /** 6412 * @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 6413 */ 6414 public StringType getFieldElement() { 6415 if (this.field == null) 6416 if (Configuration.errorOnAutoCreate()) 6417 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field"); 6418 else if (Configuration.doAutoCreate()) 6419 this.field = new StringType(); // bb 6420 return this.field; 6421 } 6422 6423 public boolean hasFieldElement() { 6424 return this.field != null && !this.field.isEmpty(); 6425 } 6426 6427 public boolean hasField() { 6428 return this.field != null && !this.field.isEmpty(); 6429 } 6430 6431 /** 6432 * @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 6433 */ 6434 public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 6435 this.field = value; 6436 return this; 6437 } 6438 6439 /** 6440 * @return The HTTP header field e.g. "Accept". 6441 */ 6442 public String getField() { 6443 return this.field == null ? null : this.field.getValue(); 6444 } 6445 6446 /** 6447 * @param value The HTTP header field e.g. "Accept". 6448 */ 6449 public SetupActionOperationRequestHeaderComponent setField(String value) { 6450 if (this.field == null) 6451 this.field = new StringType(); 6452 this.field.setValue(value); 6453 return this; 6454 } 6455 6456 /** 6457 * @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 6458 */ 6459 public StringType getValueElement() { 6460 if (this.value == null) 6461 if (Configuration.errorOnAutoCreate()) 6462 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value"); 6463 else if (Configuration.doAutoCreate()) 6464 this.value = new StringType(); // bb 6465 return this.value; 6466 } 6467 6468 public boolean hasValueElement() { 6469 return this.value != null && !this.value.isEmpty(); 6470 } 6471 6472 public boolean hasValue() { 6473 return this.value != null && !this.value.isEmpty(); 6474 } 6475 6476 /** 6477 * @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 6478 */ 6479 public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 6480 this.value = value; 6481 return this; 6482 } 6483 6484 /** 6485 * @return The value of the header e.g. "application/fhir+xml". 6486 */ 6487 public String getValue() { 6488 return this.value == null ? null : this.value.getValue(); 6489 } 6490 6491 /** 6492 * @param value The value of the header e.g. "application/fhir+xml". 6493 */ 6494 public SetupActionOperationRequestHeaderComponent setValue(String value) { 6495 if (this.value == null) 6496 this.value = new StringType(); 6497 this.value.setValue(value); 6498 return this; 6499 } 6500 6501 protected void listChildren(List<Property> children) { 6502 super.listChildren(children); 6503 children.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field)); 6504 children.add(new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value)); 6505 } 6506 6507 @Override 6508 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 6509 switch (_hash) { 6510 case 97427706: /*field*/ return new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, 1, field); 6511 case 111972721: /*value*/ return new Property("value", "string", "The value of the header e.g. \"application/fhir+xml\".", 0, 1, value); 6512 default: return super.getNamedProperty(_hash, _name, _checkValid); 6513 } 6514 6515 } 6516 6517 @Override 6518 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6519 switch (hash) { 6520 case 97427706: /*field*/ return this.field == null ? new Base[0] : new Base[] {this.field}; // StringType 6521 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 6522 default: return super.getProperty(hash, name, checkValid); 6523 } 6524 6525 } 6526 6527 @Override 6528 public Base setProperty(int hash, String name, Base value) throws FHIRException { 6529 switch (hash) { 6530 case 97427706: // field 6531 this.field = castToString(value); // StringType 6532 return value; 6533 case 111972721: // value 6534 this.value = castToString(value); // StringType 6535 return value; 6536 default: return super.setProperty(hash, name, value); 6537 } 6538 6539 } 6540 6541 @Override 6542 public Base setProperty(String name, Base value) throws FHIRException { 6543 if (name.equals("field")) { 6544 this.field = castToString(value); // StringType 6545 } else if (name.equals("value")) { 6546 this.value = castToString(value); // StringType 6547 } else 6548 return super.setProperty(name, value); 6549 return value; 6550 } 6551 6552 @Override 6553 public Base makeProperty(int hash, String name) throws FHIRException { 6554 switch (hash) { 6555 case 97427706: return getFieldElement(); 6556 case 111972721: return getValueElement(); 6557 default: return super.makeProperty(hash, name); 6558 } 6559 6560 } 6561 6562 @Override 6563 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 6564 switch (hash) { 6565 case 97427706: /*field*/ return new String[] {"string"}; 6566 case 111972721: /*value*/ return new String[] {"string"}; 6567 default: return super.getTypesForProperty(hash, name); 6568 } 6569 6570 } 6571 6572 @Override 6573 public Base addChild(String name) throws FHIRException { 6574 if (name.equals("field")) { 6575 throw new FHIRException("Cannot call addChild on a primitive type TestScript.field"); 6576 } 6577 else if (name.equals("value")) { 6578 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 6579 } 6580 else 6581 return super.addChild(name); 6582 } 6583 6584 public SetupActionOperationRequestHeaderComponent copy() { 6585 SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent(); 6586 copyValues(dst); 6587 dst.field = field == null ? null : field.copy(); 6588 dst.value = value == null ? null : value.copy(); 6589 return dst; 6590 } 6591 6592 @Override 6593 public boolean equalsDeep(Base other_) { 6594 if (!super.equalsDeep(other_)) 6595 return false; 6596 if (!(other_ instanceof SetupActionOperationRequestHeaderComponent)) 6597 return false; 6598 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_; 6599 return compareDeep(field, o.field, true) && compareDeep(value, o.value, true); 6600 } 6601 6602 @Override 6603 public boolean equalsShallow(Base other_) { 6604 if (!super.equalsShallow(other_)) 6605 return false; 6606 if (!(other_ instanceof SetupActionOperationRequestHeaderComponent)) 6607 return false; 6608 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other_; 6609 return compareValues(field, o.field, true) && compareValues(value, o.value, true); 6610 } 6611 6612 public boolean isEmpty() { 6613 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(field, value); 6614 } 6615 6616 public String fhirType() { 6617 return "TestScript.setup.action.operation.requestHeader"; 6618 6619 } 6620 6621 } 6622 6623 @Block() 6624 public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement { 6625 /** 6626 * The label would be used for tracking/logging purposes by test engines. 6627 */ 6628 @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 6629 @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 6630 protected StringType label; 6631 6632 /** 6633 * The description would be used by test engines for tracking and reporting purposes. 6634 */ 6635 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 6636 @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 6637 protected StringType description; 6638 6639 /** 6640 * The direction to use for the assertion. 6641 */ 6642 @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 6643 @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." ) 6644 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-direction-codes") 6645 protected Enumeration<AssertionDirectionType> direction; 6646 6647 /** 6648 * Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6649 */ 6650 @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 6651 @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." ) 6652 protected StringType compareToSourceId; 6653 6654 /** 6655 * The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6656 */ 6657 @Child(name = "compareToSourceExpression", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 6658 @Description(shortDefinition="The fluentpath expression to evaluate against the source fixture", formalDefinition="The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both." ) 6659 protected StringType compareToSourceExpression; 6660 6661 /** 6662 * XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 6663 */ 6664 @Child(name = "compareToSourcePath", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=false) 6665 @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." ) 6666 protected StringType compareToSourcePath; 6667 6668 /** 6669 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 6670 */ 6671 @Child(name = "contentType", type = {CodeType.class}, order=7, min=0, max=1, modifier=false, summary=false) 6672 @Description(shortDefinition="xml | json | ttl | none", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 6673 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/content-type") 6674 protected Enumeration<ContentType> contentType; 6675 6676 /** 6677 * The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 6678 */ 6679 @Child(name = "expression", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 6680 @Description(shortDefinition="The fluentpath expression to be evaluated", formalDefinition="The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload." ) 6681 protected StringType expression; 6682 6683 /** 6684 * The HTTP header field name e.g. 'Location'. 6685 */ 6686 @Child(name = "headerField", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 6687 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." ) 6688 protected StringType headerField; 6689 6690 /** 6691 * The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 6692 */ 6693 @Child(name = "minimumId", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 6694 @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." ) 6695 protected StringType minimumId; 6696 6697 /** 6698 * Whether or not the test execution performs validation on the bundle navigation links. 6699 */ 6700 @Child(name = "navigationLinks", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false) 6701 @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." ) 6702 protected BooleanType navigationLinks; 6703 6704 /** 6705 * The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 6706 */ 6707 @Child(name = "operator", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) 6708 @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." ) 6709 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-operator-codes") 6710 protected Enumeration<AssertionOperatorType> operator; 6711 6712 /** 6713 * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 6714 */ 6715 @Child(name = "path", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) 6716 @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." ) 6717 protected StringType path; 6718 6719 /** 6720 * The request method or HTTP operation code to compare against that used by the client system under test. 6721 */ 6722 @Child(name = "requestMethod", type = {CodeType.class}, order=14, min=0, max=1, modifier=false, summary=false) 6723 @Description(shortDefinition="delete | get | options | patch | post | put", formalDefinition="The request method or HTTP operation code to compare against that used by the client system under test." ) 6724 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-operations") 6725 protected Enumeration<TestScriptRequestMethodCode> requestMethod; 6726 6727 /** 6728 * The value to use in a comparison against the request URL path string. 6729 */ 6730 @Child(name = "requestURL", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 6731 @Description(shortDefinition="Request URL comparison value", formalDefinition="The value to use in a comparison against the request URL path string." ) 6732 protected StringType requestURL; 6733 6734 /** 6735 * The type of the resource. See http://build.fhir.org/resourcelist.html. 6736 */ 6737 @Child(name = "resource", type = {CodeType.class}, order=16, min=0, max=1, modifier=false, summary=false) 6738 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://build.fhir.org/resourcelist.html." ) 6739 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/defined-types") 6740 protected CodeType resource; 6741 6742 /** 6743 * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 6744 */ 6745 @Child(name = "response", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false) 6746 @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." ) 6747 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/assert-response-code-types") 6748 protected Enumeration<AssertionResponseTypes> response; 6749 6750 /** 6751 * The value of the HTTP response code to be tested. 6752 */ 6753 @Child(name = "responseCode", type = {StringType.class}, order=18, min=0, max=1, modifier=false, summary=false) 6754 @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." ) 6755 protected StringType responseCode; 6756 6757 /** 6758 * The TestScript.rule this assert will evaluate. 6759 */ 6760 @Child(name = "rule", type = {}, order=19, min=0, max=1, modifier=false, summary=false) 6761 @Description(shortDefinition="The reference to a TestScript.rule", formalDefinition="The TestScript.rule this assert will evaluate." ) 6762 protected ActionAssertRuleComponent rule; 6763 6764 /** 6765 * The TestScript.ruleset this assert will evaluate. 6766 */ 6767 @Child(name = "ruleset", type = {}, order=20, min=0, max=1, modifier=false, summary=false) 6768 @Description(shortDefinition="The reference to a TestScript.ruleset", formalDefinition="The TestScript.ruleset this assert will evaluate." ) 6769 protected ActionAssertRulesetComponent ruleset; 6770 6771 /** 6772 * Fixture to evaluate the XPath/JSONPath expression or the headerField against. 6773 */ 6774 @Child(name = "sourceId", type = {IdType.class}, order=21, min=0, max=1, modifier=false, summary=false) 6775 @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against." ) 6776 protected IdType sourceId; 6777 6778 /** 6779 * The ID of the Profile to validate against. 6780 */ 6781 @Child(name = "validateProfileId", type = {IdType.class}, order=22, min=0, max=1, modifier=false, summary=false) 6782 @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." ) 6783 protected IdType validateProfileId; 6784 6785 /** 6786 * The value to compare to. 6787 */ 6788 @Child(name = "value", type = {StringType.class}, order=23, min=0, max=1, modifier=false, summary=false) 6789 @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." ) 6790 protected StringType value; 6791 6792 /** 6793 * Whether or not the test execution will produce a warning only on error for this assert. 6794 */ 6795 @Child(name = "warningOnly", type = {BooleanType.class}, order=24, min=0, max=1, modifier=false, summary=false) 6796 @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." ) 6797 protected BooleanType warningOnly; 6798 6799 private static final long serialVersionUID = 171718507L; 6800 6801 /** 6802 * Constructor 6803 */ 6804 public SetupActionAssertComponent() { 6805 super(); 6806 } 6807 6808 /** 6809 * @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 6810 */ 6811 public StringType getLabelElement() { 6812 if (this.label == null) 6813 if (Configuration.errorOnAutoCreate()) 6814 throw new Error("Attempt to auto-create SetupActionAssertComponent.label"); 6815 else if (Configuration.doAutoCreate()) 6816 this.label = new StringType(); // bb 6817 return this.label; 6818 } 6819 6820 public boolean hasLabelElement() { 6821 return this.label != null && !this.label.isEmpty(); 6822 } 6823 6824 public boolean hasLabel() { 6825 return this.label != null && !this.label.isEmpty(); 6826 } 6827 6828 /** 6829 * @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 6830 */ 6831 public SetupActionAssertComponent setLabelElement(StringType value) { 6832 this.label = value; 6833 return this; 6834 } 6835 6836 /** 6837 * @return The label would be used for tracking/logging purposes by test engines. 6838 */ 6839 public String getLabel() { 6840 return this.label == null ? null : this.label.getValue(); 6841 } 6842 6843 /** 6844 * @param value The label would be used for tracking/logging purposes by test engines. 6845 */ 6846 public SetupActionAssertComponent setLabel(String value) { 6847 if (Utilities.noString(value)) 6848 this.label = null; 6849 else { 6850 if (this.label == null) 6851 this.label = new StringType(); 6852 this.label.setValue(value); 6853 } 6854 return this; 6855 } 6856 6857 /** 6858 * @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 6859 */ 6860 public StringType getDescriptionElement() { 6861 if (this.description == null) 6862 if (Configuration.errorOnAutoCreate()) 6863 throw new Error("Attempt to auto-create SetupActionAssertComponent.description"); 6864 else if (Configuration.doAutoCreate()) 6865 this.description = new StringType(); // bb 6866 return this.description; 6867 } 6868 6869 public boolean hasDescriptionElement() { 6870 return this.description != null && !this.description.isEmpty(); 6871 } 6872 6873 public boolean hasDescription() { 6874 return this.description != null && !this.description.isEmpty(); 6875 } 6876 6877 /** 6878 * @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 6879 */ 6880 public SetupActionAssertComponent setDescriptionElement(StringType value) { 6881 this.description = value; 6882 return this; 6883 } 6884 6885 /** 6886 * @return The description would be used by test engines for tracking and reporting purposes. 6887 */ 6888 public String getDescription() { 6889 return this.description == null ? null : this.description.getValue(); 6890 } 6891 6892 /** 6893 * @param value The description would be used by test engines for tracking and reporting purposes. 6894 */ 6895 public SetupActionAssertComponent setDescription(String value) { 6896 if (Utilities.noString(value)) 6897 this.description = null; 6898 else { 6899 if (this.description == null) 6900 this.description = new StringType(); 6901 this.description.setValue(value); 6902 } 6903 return this; 6904 } 6905 6906 /** 6907 * @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 6908 */ 6909 public Enumeration<AssertionDirectionType> getDirectionElement() { 6910 if (this.direction == null) 6911 if (Configuration.errorOnAutoCreate()) 6912 throw new Error("Attempt to auto-create SetupActionAssertComponent.direction"); 6913 else if (Configuration.doAutoCreate()) 6914 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb 6915 return this.direction; 6916 } 6917 6918 public boolean hasDirectionElement() { 6919 return this.direction != null && !this.direction.isEmpty(); 6920 } 6921 6922 public boolean hasDirection() { 6923 return this.direction != null && !this.direction.isEmpty(); 6924 } 6925 6926 /** 6927 * @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 6928 */ 6929 public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 6930 this.direction = value; 6931 return this; 6932 } 6933 6934 /** 6935 * @return The direction to use for the assertion. 6936 */ 6937 public AssertionDirectionType getDirection() { 6938 return this.direction == null ? null : this.direction.getValue(); 6939 } 6940 6941 /** 6942 * @param value The direction to use for the assertion. 6943 */ 6944 public SetupActionAssertComponent setDirection(AssertionDirectionType value) { 6945 if (value == null) 6946 this.direction = null; 6947 else { 6948 if (this.direction == null) 6949 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); 6950 this.direction.setValue(value); 6951 } 6952 return this; 6953 } 6954 6955 /** 6956 * @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 6957 */ 6958 public StringType getCompareToSourceIdElement() { 6959 if (this.compareToSourceId == null) 6960 if (Configuration.errorOnAutoCreate()) 6961 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId"); 6962 else if (Configuration.doAutoCreate()) 6963 this.compareToSourceId = new StringType(); // bb 6964 return this.compareToSourceId; 6965 } 6966 6967 public boolean hasCompareToSourceIdElement() { 6968 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 6969 } 6970 6971 public boolean hasCompareToSourceId() { 6972 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 6973 } 6974 6975 /** 6976 * @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 6977 */ 6978 public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 6979 this.compareToSourceId = value; 6980 return this; 6981 } 6982 6983 /** 6984 * @return Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6985 */ 6986 public String getCompareToSourceId() { 6987 return this.compareToSourceId == null ? null : this.compareToSourceId.getValue(); 6988 } 6989 6990 /** 6991 * @param value Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition. 6992 */ 6993 public SetupActionAssertComponent setCompareToSourceId(String value) { 6994 if (Utilities.noString(value)) 6995 this.compareToSourceId = null; 6996 else { 6997 if (this.compareToSourceId == null) 6998 this.compareToSourceId = new StringType(); 6999 this.compareToSourceId.setValue(value); 7000 } 7001 return this; 7002 } 7003 7004 /** 7005 * @return {@link #compareToSourceExpression} (The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceExpression" gives direct access to the value 7006 */ 7007 public StringType getCompareToSourceExpressionElement() { 7008 if (this.compareToSourceExpression == null) 7009 if (Configuration.errorOnAutoCreate()) 7010 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceExpression"); 7011 else if (Configuration.doAutoCreate()) 7012 this.compareToSourceExpression = new StringType(); // bb 7013 return this.compareToSourceExpression; 7014 } 7015 7016 public boolean hasCompareToSourceExpressionElement() { 7017 return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty(); 7018 } 7019 7020 public boolean hasCompareToSourceExpression() { 7021 return this.compareToSourceExpression != null && !this.compareToSourceExpression.isEmpty(); 7022 } 7023 7024 /** 7025 * @param value {@link #compareToSourceExpression} (The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceExpression" gives direct access to the value 7026 */ 7027 public SetupActionAssertComponent setCompareToSourceExpressionElement(StringType value) { 7028 this.compareToSourceExpression = value; 7029 return this; 7030 } 7031 7032 /** 7033 * @return The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 7034 */ 7035 public String getCompareToSourceExpression() { 7036 return this.compareToSourceExpression == null ? null : this.compareToSourceExpression.getValue(); 7037 } 7038 7039 /** 7040 * @param value The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both. 7041 */ 7042 public SetupActionAssertComponent setCompareToSourceExpression(String value) { 7043 if (Utilities.noString(value)) 7044 this.compareToSourceExpression = null; 7045 else { 7046 if (this.compareToSourceExpression == null) 7047 this.compareToSourceExpression = new StringType(); 7048 this.compareToSourceExpression.setValue(value); 7049 } 7050 return this; 7051 } 7052 7053 /** 7054 * @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 7055 */ 7056 public StringType getCompareToSourcePathElement() { 7057 if (this.compareToSourcePath == null) 7058 if (Configuration.errorOnAutoCreate()) 7059 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath"); 7060 else if (Configuration.doAutoCreate()) 7061 this.compareToSourcePath = new StringType(); // bb 7062 return this.compareToSourcePath; 7063 } 7064 7065 public boolean hasCompareToSourcePathElement() { 7066 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 7067 } 7068 7069 public boolean hasCompareToSourcePath() { 7070 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 7071 } 7072 7073 /** 7074 * @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 7075 */ 7076 public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 7077 this.compareToSourcePath = value; 7078 return this; 7079 } 7080 7081 /** 7082 * @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. 7083 */ 7084 public String getCompareToSourcePath() { 7085 return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue(); 7086 } 7087 7088 /** 7089 * @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. 7090 */ 7091 public SetupActionAssertComponent setCompareToSourcePath(String value) { 7092 if (Utilities.noString(value)) 7093 this.compareToSourcePath = null; 7094 else { 7095 if (this.compareToSourcePath == null) 7096 this.compareToSourcePath = new StringType(); 7097 this.compareToSourcePath.setValue(value); 7098 } 7099 return this; 7100 } 7101 7102 /** 7103 * @return {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 7104 */ 7105 public Enumeration<ContentType> getContentTypeElement() { 7106 if (this.contentType == null) 7107 if (Configuration.errorOnAutoCreate()) 7108 throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType"); 7109 else if (Configuration.doAutoCreate()) 7110 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 7111 return this.contentType; 7112 } 7113 7114 public boolean hasContentTypeElement() { 7115 return this.contentType != null && !this.contentType.isEmpty(); 7116 } 7117 7118 public boolean hasContentType() { 7119 return this.contentType != null && !this.contentType.isEmpty(); 7120 } 7121 7122 /** 7123 * @param value {@link #contentType} (The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value 7124 */ 7125 public SetupActionAssertComponent setContentTypeElement(Enumeration<ContentType> value) { 7126 this.contentType = value; 7127 return this; 7128 } 7129 7130 /** 7131 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 7132 */ 7133 public ContentType getContentType() { 7134 return this.contentType == null ? null : this.contentType.getValue(); 7135 } 7136 7137 /** 7138 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 7139 */ 7140 public SetupActionAssertComponent setContentType(ContentType value) { 7141 if (value == null) 7142 this.contentType = null; 7143 else { 7144 if (this.contentType == null) 7145 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 7146 this.contentType.setValue(value); 7147 } 7148 return this; 7149 } 7150 7151 /** 7152 * @return {@link #expression} (The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 7153 */ 7154 public StringType getExpressionElement() { 7155 if (this.expression == null) 7156 if (Configuration.errorOnAutoCreate()) 7157 throw new Error("Attempt to auto-create SetupActionAssertComponent.expression"); 7158 else if (Configuration.doAutoCreate()) 7159 this.expression = new StringType(); // bb 7160 return this.expression; 7161 } 7162 7163 public boolean hasExpressionElement() { 7164 return this.expression != null && !this.expression.isEmpty(); 7165 } 7166 7167 public boolean hasExpression() { 7168 return this.expression != null && !this.expression.isEmpty(); 7169 } 7170 7171 /** 7172 * @param value {@link #expression} (The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value 7173 */ 7174 public SetupActionAssertComponent setExpressionElement(StringType value) { 7175 this.expression = value; 7176 return this; 7177 } 7178 7179 /** 7180 * @return The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 7181 */ 7182 public String getExpression() { 7183 return this.expression == null ? null : this.expression.getValue(); 7184 } 7185 7186 /** 7187 * @param value The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload. 7188 */ 7189 public SetupActionAssertComponent setExpression(String value) { 7190 if (Utilities.noString(value)) 7191 this.expression = null; 7192 else { 7193 if (this.expression == null) 7194 this.expression = new StringType(); 7195 this.expression.setValue(value); 7196 } 7197 return this; 7198 } 7199 7200 /** 7201 * @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 7202 */ 7203 public StringType getHeaderFieldElement() { 7204 if (this.headerField == null) 7205 if (Configuration.errorOnAutoCreate()) 7206 throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField"); 7207 else if (Configuration.doAutoCreate()) 7208 this.headerField = new StringType(); // bb 7209 return this.headerField; 7210 } 7211 7212 public boolean hasHeaderFieldElement() { 7213 return this.headerField != null && !this.headerField.isEmpty(); 7214 } 7215 7216 public boolean hasHeaderField() { 7217 return this.headerField != null && !this.headerField.isEmpty(); 7218 } 7219 7220 /** 7221 * @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 7222 */ 7223 public SetupActionAssertComponent setHeaderFieldElement(StringType value) { 7224 this.headerField = value; 7225 return this; 7226 } 7227 7228 /** 7229 * @return The HTTP header field name e.g. 'Location'. 7230 */ 7231 public String getHeaderField() { 7232 return this.headerField == null ? null : this.headerField.getValue(); 7233 } 7234 7235 /** 7236 * @param value The HTTP header field name e.g. 'Location'. 7237 */ 7238 public SetupActionAssertComponent setHeaderField(String value) { 7239 if (Utilities.noString(value)) 7240 this.headerField = null; 7241 else { 7242 if (this.headerField == null) 7243 this.headerField = new StringType(); 7244 this.headerField.setValue(value); 7245 } 7246 return this; 7247 } 7248 7249 /** 7250 * @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 7251 */ 7252 public StringType getMinimumIdElement() { 7253 if (this.minimumId == null) 7254 if (Configuration.errorOnAutoCreate()) 7255 throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId"); 7256 else if (Configuration.doAutoCreate()) 7257 this.minimumId = new StringType(); // bb 7258 return this.minimumId; 7259 } 7260 7261 public boolean hasMinimumIdElement() { 7262 return this.minimumId != null && !this.minimumId.isEmpty(); 7263 } 7264 7265 public boolean hasMinimumId() { 7266 return this.minimumId != null && !this.minimumId.isEmpty(); 7267 } 7268 7269 /** 7270 * @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 7271 */ 7272 public SetupActionAssertComponent setMinimumIdElement(StringType value) { 7273 this.minimumId = value; 7274 return this; 7275 } 7276 7277 /** 7278 * @return The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 7279 */ 7280 public String getMinimumId() { 7281 return this.minimumId == null ? null : this.minimumId.getValue(); 7282 } 7283 7284 /** 7285 * @param value The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 7286 */ 7287 public SetupActionAssertComponent setMinimumId(String value) { 7288 if (Utilities.noString(value)) 7289 this.minimumId = null; 7290 else { 7291 if (this.minimumId == null) 7292 this.minimumId = new StringType(); 7293 this.minimumId.setValue(value); 7294 } 7295 return this; 7296 } 7297 7298 /** 7299 * @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 7300 */ 7301 public BooleanType getNavigationLinksElement() { 7302 if (this.navigationLinks == null) 7303 if (Configuration.errorOnAutoCreate()) 7304 throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks"); 7305 else if (Configuration.doAutoCreate()) 7306 this.navigationLinks = new BooleanType(); // bb 7307 return this.navigationLinks; 7308 } 7309 7310 public boolean hasNavigationLinksElement() { 7311 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 7312 } 7313 7314 public boolean hasNavigationLinks() { 7315 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 7316 } 7317 7318 /** 7319 * @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 7320 */ 7321 public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 7322 this.navigationLinks = value; 7323 return this; 7324 } 7325 7326 /** 7327 * @return Whether or not the test execution performs validation on the bundle navigation links. 7328 */ 7329 public boolean getNavigationLinks() { 7330 return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue(); 7331 } 7332 7333 /** 7334 * @param value Whether or not the test execution performs validation on the bundle navigation links. 7335 */ 7336 public SetupActionAssertComponent setNavigationLinks(boolean value) { 7337 if (this.navigationLinks == null) 7338 this.navigationLinks = new BooleanType(); 7339 this.navigationLinks.setValue(value); 7340 return this; 7341 } 7342 7343 /** 7344 * @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 7345 */ 7346 public Enumeration<AssertionOperatorType> getOperatorElement() { 7347 if (this.operator == null) 7348 if (Configuration.errorOnAutoCreate()) 7349 throw new Error("Attempt to auto-create SetupActionAssertComponent.operator"); 7350 else if (Configuration.doAutoCreate()) 7351 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb 7352 return this.operator; 7353 } 7354 7355 public boolean hasOperatorElement() { 7356 return this.operator != null && !this.operator.isEmpty(); 7357 } 7358 7359 public boolean hasOperator() { 7360 return this.operator != null && !this.operator.isEmpty(); 7361 } 7362 7363 /** 7364 * @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 7365 */ 7366 public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 7367 this.operator = value; 7368 return this; 7369 } 7370 7371 /** 7372 * @return The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 7373 */ 7374 public AssertionOperatorType getOperator() { 7375 return this.operator == null ? null : this.operator.getValue(); 7376 } 7377 7378 /** 7379 * @param value The operator type defines the conditional behavior of the assert. If not defined, the default is equals. 7380 */ 7381 public SetupActionAssertComponent setOperator(AssertionOperatorType value) { 7382 if (value == null) 7383 this.operator = null; 7384 else { 7385 if (this.operator == null) 7386 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); 7387 this.operator.setValue(value); 7388 } 7389 return this; 7390 } 7391 7392 /** 7393 * @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 7394 */ 7395 public StringType getPathElement() { 7396 if (this.path == null) 7397 if (Configuration.errorOnAutoCreate()) 7398 throw new Error("Attempt to auto-create SetupActionAssertComponent.path"); 7399 else if (Configuration.doAutoCreate()) 7400 this.path = new StringType(); // bb 7401 return this.path; 7402 } 7403 7404 public boolean hasPathElement() { 7405 return this.path != null && !this.path.isEmpty(); 7406 } 7407 7408 public boolean hasPath() { 7409 return this.path != null && !this.path.isEmpty(); 7410 } 7411 7412 /** 7413 * @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 7414 */ 7415 public SetupActionAssertComponent setPathElement(StringType value) { 7416 this.path = value; 7417 return this; 7418 } 7419 7420 /** 7421 * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 7422 */ 7423 public String getPath() { 7424 return this.path == null ? null : this.path.getValue(); 7425 } 7426 7427 /** 7428 * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 7429 */ 7430 public SetupActionAssertComponent setPath(String value) { 7431 if (Utilities.noString(value)) 7432 this.path = null; 7433 else { 7434 if (this.path == null) 7435 this.path = new StringType(); 7436 this.path.setValue(value); 7437 } 7438 return this; 7439 } 7440 7441 /** 7442 * @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 7443 */ 7444 public Enumeration<TestScriptRequestMethodCode> getRequestMethodElement() { 7445 if (this.requestMethod == null) 7446 if (Configuration.errorOnAutoCreate()) 7447 throw new Error("Attempt to auto-create SetupActionAssertComponent.requestMethod"); 7448 else if (Configuration.doAutoCreate()) 7449 this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); // bb 7450 return this.requestMethod; 7451 } 7452 7453 public boolean hasRequestMethodElement() { 7454 return this.requestMethod != null && !this.requestMethod.isEmpty(); 7455 } 7456 7457 public boolean hasRequestMethod() { 7458 return this.requestMethod != null && !this.requestMethod.isEmpty(); 7459 } 7460 7461 /** 7462 * @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 7463 */ 7464 public SetupActionAssertComponent setRequestMethodElement(Enumeration<TestScriptRequestMethodCode> value) { 7465 this.requestMethod = value; 7466 return this; 7467 } 7468 7469 /** 7470 * @return The request method or HTTP operation code to compare against that used by the client system under test. 7471 */ 7472 public TestScriptRequestMethodCode getRequestMethod() { 7473 return this.requestMethod == null ? null : this.requestMethod.getValue(); 7474 } 7475 7476 /** 7477 * @param value The request method or HTTP operation code to compare against that used by the client system under test. 7478 */ 7479 public SetupActionAssertComponent setRequestMethod(TestScriptRequestMethodCode value) { 7480 if (value == null) 7481 this.requestMethod = null; 7482 else { 7483 if (this.requestMethod == null) 7484 this.requestMethod = new Enumeration<TestScriptRequestMethodCode>(new TestScriptRequestMethodCodeEnumFactory()); 7485 this.requestMethod.setValue(value); 7486 } 7487 return this; 7488 } 7489 7490 /** 7491 * @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 7492 */ 7493 public StringType getRequestURLElement() { 7494 if (this.requestURL == null) 7495 if (Configuration.errorOnAutoCreate()) 7496 throw new Error("Attempt to auto-create SetupActionAssertComponent.requestURL"); 7497 else if (Configuration.doAutoCreate()) 7498 this.requestURL = new StringType(); // bb 7499 return this.requestURL; 7500 } 7501 7502 public boolean hasRequestURLElement() { 7503 return this.requestURL != null && !this.requestURL.isEmpty(); 7504 } 7505 7506 public boolean hasRequestURL() { 7507 return this.requestURL != null && !this.requestURL.isEmpty(); 7508 } 7509 7510 /** 7511 * @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 7512 */ 7513 public SetupActionAssertComponent setRequestURLElement(StringType value) { 7514 this.requestURL = value; 7515 return this; 7516 } 7517 7518 /** 7519 * @return The value to use in a comparison against the request URL path string. 7520 */ 7521 public String getRequestURL() { 7522 return this.requestURL == null ? null : this.requestURL.getValue(); 7523 } 7524 7525 /** 7526 * @param value The value to use in a comparison against the request URL path string. 7527 */ 7528 public SetupActionAssertComponent setRequestURL(String value) { 7529 if (Utilities.noString(value)) 7530 this.requestURL = null; 7531 else { 7532 if (this.requestURL == null) 7533 this.requestURL = new StringType(); 7534 this.requestURL.setValue(value); 7535 } 7536 return this; 7537 } 7538 7539 /** 7540 * @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 7541 */ 7542 public CodeType getResourceElement() { 7543 if (this.resource == null) 7544 if (Configuration.errorOnAutoCreate()) 7545 throw new Error("Attempt to auto-create SetupActionAssertComponent.resource"); 7546 else if (Configuration.doAutoCreate()) 7547 this.resource = new CodeType(); // bb 7548 return this.resource; 7549 } 7550 7551 public boolean hasResourceElement() { 7552 return this.resource != null && !this.resource.isEmpty(); 7553 } 7554 7555 public boolean hasResource() { 7556 return this.resource != null && !this.resource.isEmpty(); 7557 } 7558 7559 /** 7560 * @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 7561 */ 7562 public SetupActionAssertComponent setResourceElement(CodeType value) { 7563 this.resource = value; 7564 return this; 7565 } 7566 7567 /** 7568 * @return The type of the resource. See http://build.fhir.org/resourcelist.html. 7569 */ 7570 public String getResource() { 7571 return this.resource == null ? null : this.resource.getValue(); 7572 } 7573 7574 /** 7575 * @param value The type of the resource. See http://build.fhir.org/resourcelist.html. 7576 */ 7577 public SetupActionAssertComponent setResource(String value) { 7578 if (Utilities.noString(value)) 7579 this.resource = null; 7580 else { 7581 if (this.resource == null) 7582 this.resource = new CodeType(); 7583 this.resource.setValue(value); 7584 } 7585 return this; 7586 } 7587 7588 /** 7589 * @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 7590 */ 7591 public Enumeration<AssertionResponseTypes> getResponseElement() { 7592 if (this.response == null) 7593 if (Configuration.errorOnAutoCreate()) 7594 throw new Error("Attempt to auto-create SetupActionAssertComponent.response"); 7595 else if (Configuration.doAutoCreate()) 7596 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb 7597 return this.response; 7598 } 7599 7600 public boolean hasResponseElement() { 7601 return this.response != null && !this.response.isEmpty(); 7602 } 7603 7604 public boolean hasResponse() { 7605 return this.response != null && !this.response.isEmpty(); 7606 } 7607 7608 /** 7609 * @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 7610 */ 7611 public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 7612 this.response = value; 7613 return this; 7614 } 7615 7616 /** 7617 * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 7618 */ 7619 public AssertionResponseTypes getResponse() { 7620 return this.response == null ? null : this.response.getValue(); 7621 } 7622 7623 /** 7624 * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 7625 */ 7626 public SetupActionAssertComponent setResponse(AssertionResponseTypes value) { 7627 if (value == null) 7628 this.response = null; 7629 else { 7630 if (this.response == null) 7631 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); 7632 this.response.setValue(value); 7633 } 7634 return this; 7635 } 7636 7637 /** 7638 * @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 7639 */ 7640 public StringType getResponseCodeElement() { 7641 if (this.responseCode == null) 7642 if (Configuration.errorOnAutoCreate()) 7643 throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode"); 7644 else if (Configuration.doAutoCreate()) 7645 this.responseCode = new StringType(); // bb 7646 return this.responseCode; 7647 } 7648 7649 public boolean hasResponseCodeElement() { 7650 return this.responseCode != null && !this.responseCode.isEmpty(); 7651 } 7652 7653 public boolean hasResponseCode() { 7654 return this.responseCode != null && !this.responseCode.isEmpty(); 7655 } 7656 7657 /** 7658 * @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 7659 */ 7660 public SetupActionAssertComponent setResponseCodeElement(StringType value) { 7661 this.responseCode = value; 7662 return this; 7663 } 7664 7665 /** 7666 * @return The value of the HTTP response code to be tested. 7667 */ 7668 public String getResponseCode() { 7669 return this.responseCode == null ? null : this.responseCode.getValue(); 7670 } 7671 7672 /** 7673 * @param value The value of the HTTP response code to be tested. 7674 */ 7675 public SetupActionAssertComponent setResponseCode(String value) { 7676 if (Utilities.noString(value)) 7677 this.responseCode = null; 7678 else { 7679 if (this.responseCode == null) 7680 this.responseCode = new StringType(); 7681 this.responseCode.setValue(value); 7682 } 7683 return this; 7684 } 7685 7686 /** 7687 * @return {@link #rule} (The TestScript.rule this assert will evaluate.) 7688 */ 7689 public ActionAssertRuleComponent getRule() { 7690 if (this.rule == null) 7691 if (Configuration.errorOnAutoCreate()) 7692 throw new Error("Attempt to auto-create SetupActionAssertComponent.rule"); 7693 else if (Configuration.doAutoCreate()) 7694 this.rule = new ActionAssertRuleComponent(); // cc 7695 return this.rule; 7696 } 7697 7698 public boolean hasRule() { 7699 return this.rule != null && !this.rule.isEmpty(); 7700 } 7701 7702 /** 7703 * @param value {@link #rule} (The TestScript.rule this assert will evaluate.) 7704 */ 7705 public SetupActionAssertComponent setRule(ActionAssertRuleComponent value) { 7706 this.rule = value; 7707 return this; 7708 } 7709 7710 /** 7711 * @return {@link #ruleset} (The TestScript.ruleset this assert will evaluate.) 7712 */ 7713 public ActionAssertRulesetComponent getRuleset() { 7714 if (this.ruleset == null) 7715 if (Configuration.errorOnAutoCreate()) 7716 throw new Error("Attempt to auto-create SetupActionAssertComponent.ruleset"); 7717 else if (Configuration.doAutoCreate()) 7718 this.ruleset = new ActionAssertRulesetComponent(); // cc 7719 return this.ruleset; 7720 } 7721 7722 public boolean hasRuleset() { 7723 return this.ruleset != null && !this.ruleset.isEmpty(); 7724 } 7725 7726 /** 7727 * @param value {@link #ruleset} (The TestScript.ruleset this assert will evaluate.) 7728 */ 7729 public SetupActionAssertComponent setRuleset(ActionAssertRulesetComponent value) { 7730 this.ruleset = value; 7731 return this; 7732 } 7733 7734 /** 7735 * @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 7736 */ 7737 public IdType getSourceIdElement() { 7738 if (this.sourceId == null) 7739 if (Configuration.errorOnAutoCreate()) 7740 throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId"); 7741 else if (Configuration.doAutoCreate()) 7742 this.sourceId = new IdType(); // bb 7743 return this.sourceId; 7744 } 7745 7746 public boolean hasSourceIdElement() { 7747 return this.sourceId != null && !this.sourceId.isEmpty(); 7748 } 7749 7750 public boolean hasSourceId() { 7751 return this.sourceId != null && !this.sourceId.isEmpty(); 7752 } 7753 7754 /** 7755 * @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 7756 */ 7757 public SetupActionAssertComponent setSourceIdElement(IdType value) { 7758 this.sourceId = value; 7759 return this; 7760 } 7761 7762 /** 7763 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against. 7764 */ 7765 public String getSourceId() { 7766 return this.sourceId == null ? null : this.sourceId.getValue(); 7767 } 7768 7769 /** 7770 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against. 7771 */ 7772 public SetupActionAssertComponent setSourceId(String value) { 7773 if (Utilities.noString(value)) 7774 this.sourceId = null; 7775 else { 7776 if (this.sourceId == null) 7777 this.sourceId = new IdType(); 7778 this.sourceId.setValue(value); 7779 } 7780 return this; 7781 } 7782 7783 /** 7784 * @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 7785 */ 7786 public IdType getValidateProfileIdElement() { 7787 if (this.validateProfileId == null) 7788 if (Configuration.errorOnAutoCreate()) 7789 throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId"); 7790 else if (Configuration.doAutoCreate()) 7791 this.validateProfileId = new IdType(); // bb 7792 return this.validateProfileId; 7793 } 7794 7795 public boolean hasValidateProfileIdElement() { 7796 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 7797 } 7798 7799 public boolean hasValidateProfileId() { 7800 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 7801 } 7802 7803 /** 7804 * @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 7805 */ 7806 public SetupActionAssertComponent setValidateProfileIdElement(IdType value) { 7807 this.validateProfileId = value; 7808 return this; 7809 } 7810 7811 /** 7812 * @return The ID of the Profile to validate against. 7813 */ 7814 public String getValidateProfileId() { 7815 return this.validateProfileId == null ? null : this.validateProfileId.getValue(); 7816 } 7817 7818 /** 7819 * @param value The ID of the Profile to validate against. 7820 */ 7821 public SetupActionAssertComponent setValidateProfileId(String value) { 7822 if (Utilities.noString(value)) 7823 this.validateProfileId = null; 7824 else { 7825 if (this.validateProfileId == null) 7826 this.validateProfileId = new IdType(); 7827 this.validateProfileId.setValue(value); 7828 } 7829 return this; 7830 } 7831 7832 /** 7833 * @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 7834 */ 7835 public StringType getValueElement() { 7836 if (this.value == null) 7837 if (Configuration.errorOnAutoCreate()) 7838 throw new Error("Attempt to auto-create SetupActionAssertComponent.value"); 7839 else if (Configuration.doAutoCreate()) 7840 this.value = new StringType(); // bb 7841 return this.value; 7842 } 7843 7844 public boolean hasValueElement() { 7845 return this.value != null && !this.value.isEmpty(); 7846 } 7847 7848 public boolean hasValue() { 7849 return this.value != null && !this.value.isEmpty(); 7850 } 7851 7852 /** 7853 * @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 7854 */ 7855 public SetupActionAssertComponent setValueElement(StringType value) { 7856 this.value = value; 7857 return this; 7858 } 7859 7860 /** 7861 * @return The value to compare to. 7862 */ 7863 public String getValue() { 7864 return this.value == null ? null : this.value.getValue(); 7865 } 7866 7867 /** 7868 * @param value The value to compare to. 7869 */ 7870 public SetupActionAssertComponent setValue(String value) { 7871 if (Utilities.noString(value)) 7872 this.value = null; 7873 else { 7874 if (this.value == null) 7875 this.value = new StringType(); 7876 this.value.setValue(value); 7877 } 7878 return this; 7879 } 7880 7881 /** 7882 * @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 7883 */ 7884 public BooleanType getWarningOnlyElement() { 7885 if (this.warningOnly == null) 7886 if (Configuration.errorOnAutoCreate()) 7887 throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly"); 7888 else if (Configuration.doAutoCreate()) 7889 this.warningOnly = new BooleanType(); // bb 7890 return this.warningOnly; 7891 } 7892 7893 public boolean hasWarningOnlyElement() { 7894 return this.warningOnly != null && !this.warningOnly.isEmpty(); 7895 } 7896 7897 public boolean hasWarningOnly() { 7898 return this.warningOnly != null && !this.warningOnly.isEmpty(); 7899 } 7900 7901 /** 7902 * @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 7903 */ 7904 public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 7905 this.warningOnly = value; 7906 return this; 7907 } 7908 7909 /** 7910 * @return Whether or not the test execution will produce a warning only on error for this assert. 7911 */ 7912 public boolean getWarningOnly() { 7913 return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue(); 7914 } 7915 7916 /** 7917 * @param value Whether or not the test execution will produce a warning only on error for this assert. 7918 */ 7919 public SetupActionAssertComponent setWarningOnly(boolean value) { 7920 if (this.warningOnly == null) 7921 this.warningOnly = new BooleanType(); 7922 this.warningOnly.setValue(value); 7923 return this; 7924 } 7925 7926 protected void listChildren(List<Property> children) { 7927 super.listChildren(children); 7928 children.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label)); 7929 children.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description)); 7930 children.add(new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction)); 7931 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)); 7932 children.add(new Property("compareToSourceExpression", "string", "The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourceExpression)); 7933 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)); 7934 children.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType)); 7935 children.add(new Property("expression", "string", "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression)); 7936 children.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField)); 7937 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)); 7938 children.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks)); 7939 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)); 7940 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)); 7941 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)); 7942 children.add(new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL)); 7943 children.add(new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource)); 7944 children.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response)); 7945 children.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode)); 7946 children.add(new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, 1, rule)); 7947 children.add(new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, 1, ruleset)); 7948 children.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, 1, sourceId)); 7949 children.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId)); 7950 children.add(new Property("value", "string", "The value to compare to.", 0, 1, value)); 7951 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)); 7952 } 7953 7954 @Override 7955 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 7956 switch (_hash) { 7957 case 102727412: /*label*/ return new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, 1, label); 7958 case -1724546052: /*description*/ return new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, 1, description); 7959 case -962590849: /*direction*/ return new Property("direction", "code", "The direction to use for the assertion.", 0, 1, direction); 7960 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); 7961 case -1415702669: /*compareToSourceExpression*/ return new Property("compareToSourceExpression", "string", "The fluentpath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.", 0, 1, compareToSourceExpression); 7962 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); 7963 case -389131437: /*contentType*/ return new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, 1, contentType); 7964 case -1795452264: /*expression*/ return new Property("expression", "string", "The fluentpath expression to be evaluated against the request or response message contents - HTTP headers and payload.", 0, 1, expression); 7965 case 1160732269: /*headerField*/ return new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, 1, headerField); 7966 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); 7967 case 1001488901: /*navigationLinks*/ return new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, 1, navigationLinks); 7968 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); 7969 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); 7970 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); 7971 case 37099616: /*requestURL*/ return new Property("requestURL", "string", "The value to use in a comparison against the request URL path string.", 0, 1, requestURL); 7972 case -341064690: /*resource*/ return new Property("resource", "code", "The type of the resource. See http://build.fhir.org/resourcelist.html.", 0, 1, resource); 7973 case -340323263: /*response*/ return new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, 1, response); 7974 case 1438723534: /*responseCode*/ return new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, 1, responseCode); 7975 case 3512060: /*rule*/ return new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, 1, rule); 7976 case 1548678118: /*ruleset*/ return new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, 1, ruleset); 7977 case 1746327190: /*sourceId*/ return new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, 1, sourceId); 7978 case 1555541038: /*validateProfileId*/ return new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, 1, validateProfileId); 7979 case 111972721: /*value*/ return new Property("value", "string", "The value to compare to.", 0, 1, value); 7980 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); 7981 default: return super.getNamedProperty(_hash, _name, _checkValid); 7982 } 7983 7984 } 7985 7986 @Override 7987 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7988 switch (hash) { 7989 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 7990 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 7991 case -962590849: /*direction*/ return this.direction == null ? new Base[0] : new Base[] {this.direction}; // Enumeration<AssertionDirectionType> 7992 case 2081856758: /*compareToSourceId*/ return this.compareToSourceId == null ? new Base[0] : new Base[] {this.compareToSourceId}; // StringType 7993 case -1415702669: /*compareToSourceExpression*/ return this.compareToSourceExpression == null ? new Base[0] : new Base[] {this.compareToSourceExpression}; // StringType 7994 case -790206144: /*compareToSourcePath*/ return this.compareToSourcePath == null ? new Base[0] : new Base[] {this.compareToSourcePath}; // StringType 7995 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType> 7996 case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType 7997 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 7998 case 818925001: /*minimumId*/ return this.minimumId == null ? new Base[0] : new Base[] {this.minimumId}; // StringType 7999 case 1001488901: /*navigationLinks*/ return this.navigationLinks == null ? new Base[0] : new Base[] {this.navigationLinks}; // BooleanType 8000 case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Enumeration<AssertionOperatorType> 8001 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 8002 case 1217874000: /*requestMethod*/ return this.requestMethod == null ? new Base[0] : new Base[] {this.requestMethod}; // Enumeration<TestScriptRequestMethodCode> 8003 case 37099616: /*requestURL*/ return this.requestURL == null ? new Base[0] : new Base[] {this.requestURL}; // StringType 8004 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 8005 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Enumeration<AssertionResponseTypes> 8006 case 1438723534: /*responseCode*/ return this.responseCode == null ? new Base[0] : new Base[] {this.responseCode}; // StringType 8007 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : new Base[] {this.rule}; // ActionAssertRuleComponent 8008 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // ActionAssertRulesetComponent 8009 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 8010 case 1555541038: /*validateProfileId*/ return this.validateProfileId == null ? new Base[0] : new Base[] {this.validateProfileId}; // IdType 8011 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 8012 case -481159832: /*warningOnly*/ return this.warningOnly == null ? new Base[0] : new Base[] {this.warningOnly}; // BooleanType 8013 default: return super.getProperty(hash, name, checkValid); 8014 } 8015 8016 } 8017 8018 @Override 8019 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8020 switch (hash) { 8021 case 102727412: // label 8022 this.label = castToString(value); // StringType 8023 return value; 8024 case -1724546052: // description 8025 this.description = castToString(value); // StringType 8026 return value; 8027 case -962590849: // direction 8028 value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value)); 8029 this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType> 8030 return value; 8031 case 2081856758: // compareToSourceId 8032 this.compareToSourceId = castToString(value); // StringType 8033 return value; 8034 case -1415702669: // compareToSourceExpression 8035 this.compareToSourceExpression = castToString(value); // StringType 8036 return value; 8037 case -790206144: // compareToSourcePath 8038 this.compareToSourcePath = castToString(value); // StringType 8039 return value; 8040 case -389131437: // contentType 8041 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 8042 this.contentType = (Enumeration) value; // Enumeration<ContentType> 8043 return value; 8044 case -1795452264: // expression 8045 this.expression = castToString(value); // StringType 8046 return value; 8047 case 1160732269: // headerField 8048 this.headerField = castToString(value); // StringType 8049 return value; 8050 case 818925001: // minimumId 8051 this.minimumId = castToString(value); // StringType 8052 return value; 8053 case 1001488901: // navigationLinks 8054 this.navigationLinks = castToBoolean(value); // BooleanType 8055 return value; 8056 case -500553564: // operator 8057 value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value)); 8058 this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType> 8059 return value; 8060 case 3433509: // path 8061 this.path = castToString(value); // StringType 8062 return value; 8063 case 1217874000: // requestMethod 8064 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 8065 this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 8066 return value; 8067 case 37099616: // requestURL 8068 this.requestURL = castToString(value); // StringType 8069 return value; 8070 case -341064690: // resource 8071 this.resource = castToCode(value); // CodeType 8072 return value; 8073 case -340323263: // response 8074 value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value)); 8075 this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes> 8076 return value; 8077 case 1438723534: // responseCode 8078 this.responseCode = castToString(value); // StringType 8079 return value; 8080 case 3512060: // rule 8081 this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent 8082 return value; 8083 case 1548678118: // ruleset 8084 this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent 8085 return value; 8086 case 1746327190: // sourceId 8087 this.sourceId = castToId(value); // IdType 8088 return value; 8089 case 1555541038: // validateProfileId 8090 this.validateProfileId = castToId(value); // IdType 8091 return value; 8092 case 111972721: // value 8093 this.value = castToString(value); // StringType 8094 return value; 8095 case -481159832: // warningOnly 8096 this.warningOnly = castToBoolean(value); // BooleanType 8097 return value; 8098 default: return super.setProperty(hash, name, value); 8099 } 8100 8101 } 8102 8103 @Override 8104 public Base setProperty(String name, Base value) throws FHIRException { 8105 if (name.equals("label")) { 8106 this.label = castToString(value); // StringType 8107 } else if (name.equals("description")) { 8108 this.description = castToString(value); // StringType 8109 } else if (name.equals("direction")) { 8110 value = new AssertionDirectionTypeEnumFactory().fromType(castToCode(value)); 8111 this.direction = (Enumeration) value; // Enumeration<AssertionDirectionType> 8112 } else if (name.equals("compareToSourceId")) { 8113 this.compareToSourceId = castToString(value); // StringType 8114 } else if (name.equals("compareToSourceExpression")) { 8115 this.compareToSourceExpression = castToString(value); // StringType 8116 } else if (name.equals("compareToSourcePath")) { 8117 this.compareToSourcePath = castToString(value); // StringType 8118 } else if (name.equals("contentType")) { 8119 value = new ContentTypeEnumFactory().fromType(castToCode(value)); 8120 this.contentType = (Enumeration) value; // Enumeration<ContentType> 8121 } else if (name.equals("expression")) { 8122 this.expression = castToString(value); // StringType 8123 } else if (name.equals("headerField")) { 8124 this.headerField = castToString(value); // StringType 8125 } else if (name.equals("minimumId")) { 8126 this.minimumId = castToString(value); // StringType 8127 } else if (name.equals("navigationLinks")) { 8128 this.navigationLinks = castToBoolean(value); // BooleanType 8129 } else if (name.equals("operator")) { 8130 value = new AssertionOperatorTypeEnumFactory().fromType(castToCode(value)); 8131 this.operator = (Enumeration) value; // Enumeration<AssertionOperatorType> 8132 } else if (name.equals("path")) { 8133 this.path = castToString(value); // StringType 8134 } else if (name.equals("requestMethod")) { 8135 value = new TestScriptRequestMethodCodeEnumFactory().fromType(castToCode(value)); 8136 this.requestMethod = (Enumeration) value; // Enumeration<TestScriptRequestMethodCode> 8137 } else if (name.equals("requestURL")) { 8138 this.requestURL = castToString(value); // StringType 8139 } else if (name.equals("resource")) { 8140 this.resource = castToCode(value); // CodeType 8141 } else if (name.equals("response")) { 8142 value = new AssertionResponseTypesEnumFactory().fromType(castToCode(value)); 8143 this.response = (Enumeration) value; // Enumeration<AssertionResponseTypes> 8144 } else if (name.equals("responseCode")) { 8145 this.responseCode = castToString(value); // StringType 8146 } else if (name.equals("rule")) { 8147 this.rule = (ActionAssertRuleComponent) value; // ActionAssertRuleComponent 8148 } else if (name.equals("ruleset")) { 8149 this.ruleset = (ActionAssertRulesetComponent) value; // ActionAssertRulesetComponent 8150 } else if (name.equals("sourceId")) { 8151 this.sourceId = castToId(value); // IdType 8152 } else if (name.equals("validateProfileId")) { 8153 this.validateProfileId = castToId(value); // IdType 8154 } else if (name.equals("value")) { 8155 this.value = castToString(value); // StringType 8156 } else if (name.equals("warningOnly")) { 8157 this.warningOnly = castToBoolean(value); // BooleanType 8158 } else 8159 return super.setProperty(name, value); 8160 return value; 8161 } 8162 8163 @Override 8164 public Base makeProperty(int hash, String name) throws FHIRException { 8165 switch (hash) { 8166 case 102727412: return getLabelElement(); 8167 case -1724546052: return getDescriptionElement(); 8168 case -962590849: return getDirectionElement(); 8169 case 2081856758: return getCompareToSourceIdElement(); 8170 case -1415702669: return getCompareToSourceExpressionElement(); 8171 case -790206144: return getCompareToSourcePathElement(); 8172 case -389131437: return getContentTypeElement(); 8173 case -1795452264: return getExpressionElement(); 8174 case 1160732269: return getHeaderFieldElement(); 8175 case 818925001: return getMinimumIdElement(); 8176 case 1001488901: return getNavigationLinksElement(); 8177 case -500553564: return getOperatorElement(); 8178 case 3433509: return getPathElement(); 8179 case 1217874000: return getRequestMethodElement(); 8180 case 37099616: return getRequestURLElement(); 8181 case -341064690: return getResourceElement(); 8182 case -340323263: return getResponseElement(); 8183 case 1438723534: return getResponseCodeElement(); 8184 case 3512060: return getRule(); 8185 case 1548678118: return getRuleset(); 8186 case 1746327190: return getSourceIdElement(); 8187 case 1555541038: return getValidateProfileIdElement(); 8188 case 111972721: return getValueElement(); 8189 case -481159832: return getWarningOnlyElement(); 8190 default: return super.makeProperty(hash, name); 8191 } 8192 8193 } 8194 8195 @Override 8196 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8197 switch (hash) { 8198 case 102727412: /*label*/ return new String[] {"string"}; 8199 case -1724546052: /*description*/ return new String[] {"string"}; 8200 case -962590849: /*direction*/ return new String[] {"code"}; 8201 case 2081856758: /*compareToSourceId*/ return new String[] {"string"}; 8202 case -1415702669: /*compareToSourceExpression*/ return new String[] {"string"}; 8203 case -790206144: /*compareToSourcePath*/ return new String[] {"string"}; 8204 case -389131437: /*contentType*/ return new String[] {"code"}; 8205 case -1795452264: /*expression*/ return new String[] {"string"}; 8206 case 1160732269: /*headerField*/ return new String[] {"string"}; 8207 case 818925001: /*minimumId*/ return new String[] {"string"}; 8208 case 1001488901: /*navigationLinks*/ return new String[] {"boolean"}; 8209 case -500553564: /*operator*/ return new String[] {"code"}; 8210 case 3433509: /*path*/ return new String[] {"string"}; 8211 case 1217874000: /*requestMethod*/ return new String[] {"code"}; 8212 case 37099616: /*requestURL*/ return new String[] {"string"}; 8213 case -341064690: /*resource*/ return new String[] {"code"}; 8214 case -340323263: /*response*/ return new String[] {"code"}; 8215 case 1438723534: /*responseCode*/ return new String[] {"string"}; 8216 case 3512060: /*rule*/ return new String[] {}; 8217 case 1548678118: /*ruleset*/ return new String[] {}; 8218 case 1746327190: /*sourceId*/ return new String[] {"id"}; 8219 case 1555541038: /*validateProfileId*/ return new String[] {"id"}; 8220 case 111972721: /*value*/ return new String[] {"string"}; 8221 case -481159832: /*warningOnly*/ return new String[] {"boolean"}; 8222 default: return super.getTypesForProperty(hash, name); 8223 } 8224 8225 } 8226 8227 @Override 8228 public Base addChild(String name) throws FHIRException { 8229 if (name.equals("label")) { 8230 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 8231 } 8232 else if (name.equals("description")) { 8233 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 8234 } 8235 else if (name.equals("direction")) { 8236 throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction"); 8237 } 8238 else if (name.equals("compareToSourceId")) { 8239 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId"); 8240 } 8241 else if (name.equals("compareToSourceExpression")) { 8242 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceExpression"); 8243 } 8244 else if (name.equals("compareToSourcePath")) { 8245 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath"); 8246 } 8247 else if (name.equals("contentType")) { 8248 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 8249 } 8250 else if (name.equals("expression")) { 8251 throw new FHIRException("Cannot call addChild on a primitive type TestScript.expression"); 8252 } 8253 else if (name.equals("headerField")) { 8254 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 8255 } 8256 else if (name.equals("minimumId")) { 8257 throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId"); 8258 } 8259 else if (name.equals("navigationLinks")) { 8260 throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks"); 8261 } 8262 else if (name.equals("operator")) { 8263 throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator"); 8264 } 8265 else if (name.equals("path")) { 8266 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 8267 } 8268 else if (name.equals("requestMethod")) { 8269 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestMethod"); 8270 } 8271 else if (name.equals("requestURL")) { 8272 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requestURL"); 8273 } 8274 else if (name.equals("resource")) { 8275 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 8276 } 8277 else if (name.equals("response")) { 8278 throw new FHIRException("Cannot call addChild on a primitive type TestScript.response"); 8279 } 8280 else if (name.equals("responseCode")) { 8281 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode"); 8282 } 8283 else if (name.equals("rule")) { 8284 this.rule = new ActionAssertRuleComponent(); 8285 return this.rule; 8286 } 8287 else if (name.equals("ruleset")) { 8288 this.ruleset = new ActionAssertRulesetComponent(); 8289 return this.ruleset; 8290 } 8291 else if (name.equals("sourceId")) { 8292 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 8293 } 8294 else if (name.equals("validateProfileId")) { 8295 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId"); 8296 } 8297 else if (name.equals("value")) { 8298 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 8299 } 8300 else if (name.equals("warningOnly")) { 8301 throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly"); 8302 } 8303 else 8304 return super.addChild(name); 8305 } 8306 8307 public SetupActionAssertComponent copy() { 8308 SetupActionAssertComponent dst = new SetupActionAssertComponent(); 8309 copyValues(dst); 8310 dst.label = label == null ? null : label.copy(); 8311 dst.description = description == null ? null : description.copy(); 8312 dst.direction = direction == null ? null : direction.copy(); 8313 dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy(); 8314 dst.compareToSourceExpression = compareToSourceExpression == null ? null : compareToSourceExpression.copy(); 8315 dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy(); 8316 dst.contentType = contentType == null ? null : contentType.copy(); 8317 dst.expression = expression == null ? null : expression.copy(); 8318 dst.headerField = headerField == null ? null : headerField.copy(); 8319 dst.minimumId = minimumId == null ? null : minimumId.copy(); 8320 dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy(); 8321 dst.operator = operator == null ? null : operator.copy(); 8322 dst.path = path == null ? null : path.copy(); 8323 dst.requestMethod = requestMethod == null ? null : requestMethod.copy(); 8324 dst.requestURL = requestURL == null ? null : requestURL.copy(); 8325 dst.resource = resource == null ? null : resource.copy(); 8326 dst.response = response == null ? null : response.copy(); 8327 dst.responseCode = responseCode == null ? null : responseCode.copy(); 8328 dst.rule = rule == null ? null : rule.copy(); 8329 dst.ruleset = ruleset == null ? null : ruleset.copy(); 8330 dst.sourceId = sourceId == null ? null : sourceId.copy(); 8331 dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy(); 8332 dst.value = value == null ? null : value.copy(); 8333 dst.warningOnly = warningOnly == null ? null : warningOnly.copy(); 8334 return dst; 8335 } 8336 8337 @Override 8338 public boolean equalsDeep(Base other_) { 8339 if (!super.equalsDeep(other_)) 8340 return false; 8341 if (!(other_ instanceof SetupActionAssertComponent)) 8342 return false; 8343 SetupActionAssertComponent o = (SetupActionAssertComponent) other_; 8344 return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true) 8345 && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourceExpression, o.compareToSourceExpression, true) 8346 && compareDeep(compareToSourcePath, o.compareToSourcePath, true) && compareDeep(contentType, o.contentType, true) 8347 && compareDeep(expression, o.expression, true) && compareDeep(headerField, o.headerField, true) 8348 && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true) 8349 && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(requestMethod, o.requestMethod, true) 8350 && compareDeep(requestURL, o.requestURL, true) && compareDeep(resource, o.resource, true) && compareDeep(response, o.response, true) 8351 && compareDeep(responseCode, o.responseCode, true) && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) 8352 && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true) 8353 && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true); 8354 } 8355 8356 @Override 8357 public boolean equalsShallow(Base other_) { 8358 if (!super.equalsShallow(other_)) 8359 return false; 8360 if (!(other_ instanceof SetupActionAssertComponent)) 8361 return false; 8362 SetupActionAssertComponent o = (SetupActionAssertComponent) other_; 8363 return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true) 8364 && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourceExpression, o.compareToSourceExpression, true) 8365 && compareValues(compareToSourcePath, o.compareToSourcePath, true) && compareValues(contentType, o.contentType, true) 8366 && compareValues(expression, o.expression, true) && compareValues(headerField, o.headerField, true) 8367 && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true) 8368 && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(requestMethod, o.requestMethod, true) 8369 && compareValues(requestURL, o.requestURL, true) && compareValues(resource, o.resource, true) && compareValues(response, o.response, true) 8370 && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) && compareValues(validateProfileId, o.validateProfileId, true) 8371 && compareValues(value, o.value, true) && compareValues(warningOnly, o.warningOnly, true); 8372 } 8373 8374 public boolean isEmpty() { 8375 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, description, direction 8376 , compareToSourceId, compareToSourceExpression, compareToSourcePath, contentType, expression 8377 , headerField, minimumId, navigationLinks, operator, path, requestMethod, requestURL 8378 , resource, response, responseCode, rule, ruleset, sourceId, validateProfileId 8379 , value, warningOnly); 8380 } 8381 8382 public String fhirType() { 8383 return "TestScript.setup.action.assert"; 8384 8385 } 8386 8387 } 8388 8389 @Block() 8390 public static class ActionAssertRuleComponent extends BackboneElement implements IBaseBackboneElement { 8391 /** 8392 * The TestScript.rule id value this assert will evaluate. 8393 */ 8394 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8395 @Description(shortDefinition="Id of the TestScript.rule", formalDefinition="The TestScript.rule id value this assert will evaluate." ) 8396 protected IdType ruleId; 8397 8398 /** 8399 * Each rule template can take one or more parameters for rule evaluation. 8400 */ 8401 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8402 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 8403 protected List<ActionAssertRuleParamComponent> param; 8404 8405 private static final long serialVersionUID = -1860715431L; 8406 8407 /** 8408 * Constructor 8409 */ 8410 public ActionAssertRuleComponent() { 8411 super(); 8412 } 8413 8414 /** 8415 * Constructor 8416 */ 8417 public ActionAssertRuleComponent(IdType ruleId) { 8418 super(); 8419 this.ruleId = ruleId; 8420 } 8421 8422 /** 8423 * @return {@link #ruleId} (The TestScript.rule id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 8424 */ 8425 public IdType getRuleIdElement() { 8426 if (this.ruleId == null) 8427 if (Configuration.errorOnAutoCreate()) 8428 throw new Error("Attempt to auto-create ActionAssertRuleComponent.ruleId"); 8429 else if (Configuration.doAutoCreate()) 8430 this.ruleId = new IdType(); // bb 8431 return this.ruleId; 8432 } 8433 8434 public boolean hasRuleIdElement() { 8435 return this.ruleId != null && !this.ruleId.isEmpty(); 8436 } 8437 8438 public boolean hasRuleId() { 8439 return this.ruleId != null && !this.ruleId.isEmpty(); 8440 } 8441 8442 /** 8443 * @param value {@link #ruleId} (The TestScript.rule id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 8444 */ 8445 public ActionAssertRuleComponent setRuleIdElement(IdType value) { 8446 this.ruleId = value; 8447 return this; 8448 } 8449 8450 /** 8451 * @return The TestScript.rule id value this assert will evaluate. 8452 */ 8453 public String getRuleId() { 8454 return this.ruleId == null ? null : this.ruleId.getValue(); 8455 } 8456 8457 /** 8458 * @param value The TestScript.rule id value this assert will evaluate. 8459 */ 8460 public ActionAssertRuleComponent setRuleId(String value) { 8461 if (this.ruleId == null) 8462 this.ruleId = new IdType(); 8463 this.ruleId.setValue(value); 8464 return this; 8465 } 8466 8467 /** 8468 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 8469 */ 8470 public List<ActionAssertRuleParamComponent> getParam() { 8471 if (this.param == null) 8472 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8473 return this.param; 8474 } 8475 8476 /** 8477 * @return Returns a reference to <code>this</code> for easy method chaining 8478 */ 8479 public ActionAssertRuleComponent setParam(List<ActionAssertRuleParamComponent> theParam) { 8480 this.param = theParam; 8481 return this; 8482 } 8483 8484 public boolean hasParam() { 8485 if (this.param == null) 8486 return false; 8487 for (ActionAssertRuleParamComponent item : this.param) 8488 if (!item.isEmpty()) 8489 return true; 8490 return false; 8491 } 8492 8493 public ActionAssertRuleParamComponent addParam() { //3 8494 ActionAssertRuleParamComponent t = new ActionAssertRuleParamComponent(); 8495 if (this.param == null) 8496 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8497 this.param.add(t); 8498 return t; 8499 } 8500 8501 public ActionAssertRuleComponent addParam(ActionAssertRuleParamComponent t) { //3 8502 if (t == null) 8503 return this; 8504 if (this.param == null) 8505 this.param = new ArrayList<ActionAssertRuleParamComponent>(); 8506 this.param.add(t); 8507 return this; 8508 } 8509 8510 /** 8511 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 8512 */ 8513 public ActionAssertRuleParamComponent getParamFirstRep() { 8514 if (getParam().isEmpty()) { 8515 addParam(); 8516 } 8517 return getParam().get(0); 8518 } 8519 8520 protected void listChildren(List<Property> children) { 8521 super.listChildren(children); 8522 children.add(new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, 1, ruleId)); 8523 children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 8524 } 8525 8526 @Override 8527 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8528 switch (_hash) { 8529 case -919875273: /*ruleId*/ return new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, 1, ruleId); 8530 case 106436749: /*param*/ return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param); 8531 default: return super.getNamedProperty(_hash, _name, _checkValid); 8532 } 8533 8534 } 8535 8536 @Override 8537 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8538 switch (hash) { 8539 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 8540 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRuleParamComponent 8541 default: return super.getProperty(hash, name, checkValid); 8542 } 8543 8544 } 8545 8546 @Override 8547 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8548 switch (hash) { 8549 case -919875273: // ruleId 8550 this.ruleId = castToId(value); // IdType 8551 return value; 8552 case 106436749: // param 8553 this.getParam().add((ActionAssertRuleParamComponent) value); // ActionAssertRuleParamComponent 8554 return value; 8555 default: return super.setProperty(hash, name, value); 8556 } 8557 8558 } 8559 8560 @Override 8561 public Base setProperty(String name, Base value) throws FHIRException { 8562 if (name.equals("ruleId")) { 8563 this.ruleId = castToId(value); // IdType 8564 } else if (name.equals("param")) { 8565 this.getParam().add((ActionAssertRuleParamComponent) value); 8566 } else 8567 return super.setProperty(name, value); 8568 return value; 8569 } 8570 8571 @Override 8572 public Base makeProperty(int hash, String name) throws FHIRException { 8573 switch (hash) { 8574 case -919875273: return getRuleIdElement(); 8575 case 106436749: return addParam(); 8576 default: return super.makeProperty(hash, name); 8577 } 8578 8579 } 8580 8581 @Override 8582 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8583 switch (hash) { 8584 case -919875273: /*ruleId*/ return new String[] {"id"}; 8585 case 106436749: /*param*/ return new String[] {}; 8586 default: return super.getTypesForProperty(hash, name); 8587 } 8588 8589 } 8590 8591 @Override 8592 public Base addChild(String name) throws FHIRException { 8593 if (name.equals("ruleId")) { 8594 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 8595 } 8596 else if (name.equals("param")) { 8597 return addParam(); 8598 } 8599 else 8600 return super.addChild(name); 8601 } 8602 8603 public ActionAssertRuleComponent copy() { 8604 ActionAssertRuleComponent dst = new ActionAssertRuleComponent(); 8605 copyValues(dst); 8606 dst.ruleId = ruleId == null ? null : ruleId.copy(); 8607 if (param != null) { 8608 dst.param = new ArrayList<ActionAssertRuleParamComponent>(); 8609 for (ActionAssertRuleParamComponent i : param) 8610 dst.param.add(i.copy()); 8611 }; 8612 return dst; 8613 } 8614 8615 @Override 8616 public boolean equalsDeep(Base other_) { 8617 if (!super.equalsDeep(other_)) 8618 return false; 8619 if (!(other_ instanceof ActionAssertRuleComponent)) 8620 return false; 8621 ActionAssertRuleComponent o = (ActionAssertRuleComponent) other_; 8622 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 8623 } 8624 8625 @Override 8626 public boolean equalsShallow(Base other_) { 8627 if (!super.equalsShallow(other_)) 8628 return false; 8629 if (!(other_ instanceof ActionAssertRuleComponent)) 8630 return false; 8631 ActionAssertRuleComponent o = (ActionAssertRuleComponent) other_; 8632 return compareValues(ruleId, o.ruleId, true); 8633 } 8634 8635 public boolean isEmpty() { 8636 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 8637 } 8638 8639 public String fhirType() { 8640 return "TestScript.setup.action.assert.rule"; 8641 8642 } 8643 8644 } 8645 8646 @Block() 8647 public static class ActionAssertRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 8648 /** 8649 * Descriptive name for this parameter that matches the external assert rule parameter name. 8650 */ 8651 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8652 @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) 8653 protected StringType name; 8654 8655 /** 8656 * The value for the parameter that will be passed on to the external rule template. 8657 */ 8658 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 8659 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external rule template." ) 8660 protected StringType value; 8661 8662 private static final long serialVersionUID = 395259392L; 8663 8664 /** 8665 * Constructor 8666 */ 8667 public ActionAssertRuleParamComponent() { 8668 super(); 8669 } 8670 8671 /** 8672 * Constructor 8673 */ 8674 public ActionAssertRuleParamComponent(StringType name, StringType value) { 8675 super(); 8676 this.name = name; 8677 this.value = value; 8678 } 8679 8680 /** 8681 * @return {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 8682 */ 8683 public StringType getNameElement() { 8684 if (this.name == null) 8685 if (Configuration.errorOnAutoCreate()) 8686 throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.name"); 8687 else if (Configuration.doAutoCreate()) 8688 this.name = new StringType(); // bb 8689 return this.name; 8690 } 8691 8692 public boolean hasNameElement() { 8693 return this.name != null && !this.name.isEmpty(); 8694 } 8695 8696 public boolean hasName() { 8697 return this.name != null && !this.name.isEmpty(); 8698 } 8699 8700 /** 8701 * @param value {@link #name} (Descriptive name for this parameter that matches the external assert rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 8702 */ 8703 public ActionAssertRuleParamComponent setNameElement(StringType value) { 8704 this.name = value; 8705 return this; 8706 } 8707 8708 /** 8709 * @return Descriptive name for this parameter that matches the external assert rule parameter name. 8710 */ 8711 public String getName() { 8712 return this.name == null ? null : this.name.getValue(); 8713 } 8714 8715 /** 8716 * @param value Descriptive name for this parameter that matches the external assert rule parameter name. 8717 */ 8718 public ActionAssertRuleParamComponent setName(String value) { 8719 if (this.name == null) 8720 this.name = new StringType(); 8721 this.name.setValue(value); 8722 return this; 8723 } 8724 8725 /** 8726 * @return {@link #value} (The value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 8727 */ 8728 public StringType getValueElement() { 8729 if (this.value == null) 8730 if (Configuration.errorOnAutoCreate()) 8731 throw new Error("Attempt to auto-create ActionAssertRuleParamComponent.value"); 8732 else if (Configuration.doAutoCreate()) 8733 this.value = new StringType(); // bb 8734 return this.value; 8735 } 8736 8737 public boolean hasValueElement() { 8738 return this.value != null && !this.value.isEmpty(); 8739 } 8740 8741 public boolean hasValue() { 8742 return this.value != null && !this.value.isEmpty(); 8743 } 8744 8745 /** 8746 * @param value {@link #value} (The value for the parameter that will be passed on to the external rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 8747 */ 8748 public ActionAssertRuleParamComponent setValueElement(StringType value) { 8749 this.value = value; 8750 return this; 8751 } 8752 8753 /** 8754 * @return The value for the parameter that will be passed on to the external rule template. 8755 */ 8756 public String getValue() { 8757 return this.value == null ? null : this.value.getValue(); 8758 } 8759 8760 /** 8761 * @param value The value for the parameter that will be passed on to the external rule template. 8762 */ 8763 public ActionAssertRuleParamComponent setValue(String value) { 8764 if (this.value == null) 8765 this.value = new StringType(); 8766 this.value.setValue(value); 8767 return this; 8768 } 8769 8770 protected void listChildren(List<Property> children) { 8771 super.listChildren(children); 8772 children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name)); 8773 children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, 1, value)); 8774 } 8775 8776 @Override 8777 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 8778 switch (_hash) { 8779 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, 1, name); 8780 case 111972721: /*value*/ return new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, 1, value); 8781 default: return super.getNamedProperty(_hash, _name, _checkValid); 8782 } 8783 8784 } 8785 8786 @Override 8787 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8788 switch (hash) { 8789 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 8790 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 8791 default: return super.getProperty(hash, name, checkValid); 8792 } 8793 8794 } 8795 8796 @Override 8797 public Base setProperty(int hash, String name, Base value) throws FHIRException { 8798 switch (hash) { 8799 case 3373707: // name 8800 this.name = castToString(value); // StringType 8801 return value; 8802 case 111972721: // value 8803 this.value = castToString(value); // StringType 8804 return value; 8805 default: return super.setProperty(hash, name, value); 8806 } 8807 8808 } 8809 8810 @Override 8811 public Base setProperty(String name, Base value) throws FHIRException { 8812 if (name.equals("name")) { 8813 this.name = castToString(value); // StringType 8814 } else if (name.equals("value")) { 8815 this.value = castToString(value); // StringType 8816 } else 8817 return super.setProperty(name, value); 8818 return value; 8819 } 8820 8821 @Override 8822 public Base makeProperty(int hash, String name) throws FHIRException { 8823 switch (hash) { 8824 case 3373707: return getNameElement(); 8825 case 111972721: return getValueElement(); 8826 default: return super.makeProperty(hash, name); 8827 } 8828 8829 } 8830 8831 @Override 8832 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 8833 switch (hash) { 8834 case 3373707: /*name*/ return new String[] {"string"}; 8835 case 111972721: /*value*/ return new String[] {"string"}; 8836 default: return super.getTypesForProperty(hash, name); 8837 } 8838 8839 } 8840 8841 @Override 8842 public Base addChild(String name) throws FHIRException { 8843 if (name.equals("name")) { 8844 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 8845 } 8846 else if (name.equals("value")) { 8847 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 8848 } 8849 else 8850 return super.addChild(name); 8851 } 8852 8853 public ActionAssertRuleParamComponent copy() { 8854 ActionAssertRuleParamComponent dst = new ActionAssertRuleParamComponent(); 8855 copyValues(dst); 8856 dst.name = name == null ? null : name.copy(); 8857 dst.value = value == null ? null : value.copy(); 8858 return dst; 8859 } 8860 8861 @Override 8862 public boolean equalsDeep(Base other_) { 8863 if (!super.equalsDeep(other_)) 8864 return false; 8865 if (!(other_ instanceof ActionAssertRuleParamComponent)) 8866 return false; 8867 ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other_; 8868 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 8869 } 8870 8871 @Override 8872 public boolean equalsShallow(Base other_) { 8873 if (!super.equalsShallow(other_)) 8874 return false; 8875 if (!(other_ instanceof ActionAssertRuleParamComponent)) 8876 return false; 8877 ActionAssertRuleParamComponent o = (ActionAssertRuleParamComponent) other_; 8878 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 8879 } 8880 8881 public boolean isEmpty() { 8882 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 8883 } 8884 8885 public String fhirType() { 8886 return "TestScript.setup.action.assert.rule.param"; 8887 8888 } 8889 8890 } 8891 8892 @Block() 8893 public static class ActionAssertRulesetComponent extends BackboneElement implements IBaseBackboneElement { 8894 /** 8895 * The TestScript.ruleset id value this assert will evaluate. 8896 */ 8897 @Child(name = "rulesetId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8898 @Description(shortDefinition="Id of the TestScript.ruleset", formalDefinition="The TestScript.ruleset id value this assert will evaluate." ) 8899 protected IdType rulesetId; 8900 8901 /** 8902 * The referenced rule within the external ruleset template. 8903 */ 8904 @Child(name = "rule", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8905 @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." ) 8906 protected List<ActionAssertRulesetRuleComponent> rule; 8907 8908 private static final long serialVersionUID = -976736025L; 8909 8910 /** 8911 * Constructor 8912 */ 8913 public ActionAssertRulesetComponent() { 8914 super(); 8915 } 8916 8917 /** 8918 * Constructor 8919 */ 8920 public ActionAssertRulesetComponent(IdType rulesetId) { 8921 super(); 8922 this.rulesetId = rulesetId; 8923 } 8924 8925 /** 8926 * @return {@link #rulesetId} (The TestScript.ruleset id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRulesetId" gives direct access to the value 8927 */ 8928 public IdType getRulesetIdElement() { 8929 if (this.rulesetId == null) 8930 if (Configuration.errorOnAutoCreate()) 8931 throw new Error("Attempt to auto-create ActionAssertRulesetComponent.rulesetId"); 8932 else if (Configuration.doAutoCreate()) 8933 this.rulesetId = new IdType(); // bb 8934 return this.rulesetId; 8935 } 8936 8937 public boolean hasRulesetIdElement() { 8938 return this.rulesetId != null && !this.rulesetId.isEmpty(); 8939 } 8940 8941 public boolean hasRulesetId() { 8942 return this.rulesetId != null && !this.rulesetId.isEmpty(); 8943 } 8944 8945 /** 8946 * @param value {@link #rulesetId} (The TestScript.ruleset id value this assert will evaluate.). This is the underlying object with id, value and extensions. The accessor "getRulesetId" gives direct access to the value 8947 */ 8948 public ActionAssertRulesetComponent setRulesetIdElement(IdType value) { 8949 this.rulesetId = value; 8950 return this; 8951 } 8952 8953 /** 8954 * @return The TestScript.ruleset id value this assert will evaluate. 8955 */ 8956 public String getRulesetId() { 8957 return this.rulesetId == null ? null : this.rulesetId.getValue(); 8958 } 8959 8960 /** 8961 * @param value The TestScript.ruleset id value this assert will evaluate. 8962 */ 8963 public ActionAssertRulesetComponent setRulesetId(String value) { 8964 if (this.rulesetId == null) 8965 this.rulesetId = new IdType(); 8966 this.rulesetId.setValue(value); 8967 return this; 8968 } 8969 8970 /** 8971 * @return {@link #rule} (The referenced rule within the external ruleset template.) 8972 */ 8973 public List<ActionAssertRulesetRuleComponent> getRule() { 8974 if (this.rule == null) 8975 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 8976 return this.rule; 8977 } 8978 8979 /** 8980 * @return Returns a reference to <code>this</code> for easy method chaining 8981 */ 8982 public ActionAssertRulesetComponent setRule(List<ActionAssertRulesetRuleComponent> theRule) { 8983 this.rule = theRule; 8984 return this; 8985 } 8986 8987 public boolean hasRule() { 8988 if (this.rule == null) 8989 return false; 8990 for (ActionAssertRulesetRuleComponent item : this.rule) 8991 if (!item.isEmpty()) 8992 return true; 8993 return false; 8994 } 8995 8996 public ActionAssertRulesetRuleComponent addRule() { //3 8997 ActionAssertRulesetRuleComponent t = new ActionAssertRulesetRuleComponent(); 8998 if (this.rule == null) 8999 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 9000 this.rule.add(t); 9001 return t; 9002 } 9003 9004 public ActionAssertRulesetComponent addRule(ActionAssertRulesetRuleComponent t) { //3 9005 if (t == null) 9006 return this; 9007 if (this.rule == null) 9008 this.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 9009 this.rule.add(t); 9010 return this; 9011 } 9012 9013 /** 9014 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 9015 */ 9016 public ActionAssertRulesetRuleComponent getRuleFirstRep() { 9017 if (getRule().isEmpty()) { 9018 addRule(); 9019 } 9020 return getRule().get(0); 9021 } 9022 9023 protected void listChildren(List<Property> children) { 9024 super.listChildren(children); 9025 children.add(new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, 1, rulesetId)); 9026 children.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); 9027 } 9028 9029 @Override 9030 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9031 switch (_hash) { 9032 case -2073977951: /*rulesetId*/ return new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, 1, rulesetId); 9033 case 3512060: /*rule*/ return new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule); 9034 default: return super.getNamedProperty(_hash, _name, _checkValid); 9035 } 9036 9037 } 9038 9039 @Override 9040 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9041 switch (hash) { 9042 case -2073977951: /*rulesetId*/ return this.rulesetId == null ? new Base[0] : new Base[] {this.rulesetId}; // IdType 9043 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // ActionAssertRulesetRuleComponent 9044 default: return super.getProperty(hash, name, checkValid); 9045 } 9046 9047 } 9048 9049 @Override 9050 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9051 switch (hash) { 9052 case -2073977951: // rulesetId 9053 this.rulesetId = castToId(value); // IdType 9054 return value; 9055 case 3512060: // rule 9056 this.getRule().add((ActionAssertRulesetRuleComponent) value); // ActionAssertRulesetRuleComponent 9057 return value; 9058 default: return super.setProperty(hash, name, value); 9059 } 9060 9061 } 9062 9063 @Override 9064 public Base setProperty(String name, Base value) throws FHIRException { 9065 if (name.equals("rulesetId")) { 9066 this.rulesetId = castToId(value); // IdType 9067 } else if (name.equals("rule")) { 9068 this.getRule().add((ActionAssertRulesetRuleComponent) value); 9069 } else 9070 return super.setProperty(name, value); 9071 return value; 9072 } 9073 9074 @Override 9075 public Base makeProperty(int hash, String name) throws FHIRException { 9076 switch (hash) { 9077 case -2073977951: return getRulesetIdElement(); 9078 case 3512060: return addRule(); 9079 default: return super.makeProperty(hash, name); 9080 } 9081 9082 } 9083 9084 @Override 9085 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9086 switch (hash) { 9087 case -2073977951: /*rulesetId*/ return new String[] {"id"}; 9088 case 3512060: /*rule*/ return new String[] {}; 9089 default: return super.getTypesForProperty(hash, name); 9090 } 9091 9092 } 9093 9094 @Override 9095 public Base addChild(String name) throws FHIRException { 9096 if (name.equals("rulesetId")) { 9097 throw new FHIRException("Cannot call addChild on a primitive type TestScript.rulesetId"); 9098 } 9099 else if (name.equals("rule")) { 9100 return addRule(); 9101 } 9102 else 9103 return super.addChild(name); 9104 } 9105 9106 public ActionAssertRulesetComponent copy() { 9107 ActionAssertRulesetComponent dst = new ActionAssertRulesetComponent(); 9108 copyValues(dst); 9109 dst.rulesetId = rulesetId == null ? null : rulesetId.copy(); 9110 if (rule != null) { 9111 dst.rule = new ArrayList<ActionAssertRulesetRuleComponent>(); 9112 for (ActionAssertRulesetRuleComponent i : rule) 9113 dst.rule.add(i.copy()); 9114 }; 9115 return dst; 9116 } 9117 9118 @Override 9119 public boolean equalsDeep(Base other_) { 9120 if (!super.equalsDeep(other_)) 9121 return false; 9122 if (!(other_ instanceof ActionAssertRulesetComponent)) 9123 return false; 9124 ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other_; 9125 return compareDeep(rulesetId, o.rulesetId, true) && compareDeep(rule, o.rule, true); 9126 } 9127 9128 @Override 9129 public boolean equalsShallow(Base other_) { 9130 if (!super.equalsShallow(other_)) 9131 return false; 9132 if (!(other_ instanceof ActionAssertRulesetComponent)) 9133 return false; 9134 ActionAssertRulesetComponent o = (ActionAssertRulesetComponent) other_; 9135 return compareValues(rulesetId, o.rulesetId, true); 9136 } 9137 9138 public boolean isEmpty() { 9139 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(rulesetId, rule); 9140 } 9141 9142 public String fhirType() { 9143 return "TestScript.setup.action.assert.ruleset"; 9144 9145 } 9146 9147 } 9148 9149 @Block() 9150 public static class ActionAssertRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { 9151 /** 9152 * Id of the referenced rule within the external ruleset template. 9153 */ 9154 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 9155 @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) 9156 protected IdType ruleId; 9157 9158 /** 9159 * Each rule template can take one or more parameters for rule evaluation. 9160 */ 9161 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9162 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 9163 protected List<ActionAssertRulesetRuleParamComponent> param; 9164 9165 private static final long serialVersionUID = -1850698529L; 9166 9167 /** 9168 * Constructor 9169 */ 9170 public ActionAssertRulesetRuleComponent() { 9171 super(); 9172 } 9173 9174 /** 9175 * Constructor 9176 */ 9177 public ActionAssertRulesetRuleComponent(IdType ruleId) { 9178 super(); 9179 this.ruleId = ruleId; 9180 } 9181 9182 /** 9183 * @return {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 9184 */ 9185 public IdType getRuleIdElement() { 9186 if (this.ruleId == null) 9187 if (Configuration.errorOnAutoCreate()) 9188 throw new Error("Attempt to auto-create ActionAssertRulesetRuleComponent.ruleId"); 9189 else if (Configuration.doAutoCreate()) 9190 this.ruleId = new IdType(); // bb 9191 return this.ruleId; 9192 } 9193 9194 public boolean hasRuleIdElement() { 9195 return this.ruleId != null && !this.ruleId.isEmpty(); 9196 } 9197 9198 public boolean hasRuleId() { 9199 return this.ruleId != null && !this.ruleId.isEmpty(); 9200 } 9201 9202 /** 9203 * @param value {@link #ruleId} (Id of the referenced rule within the external ruleset template.). This is the underlying object with id, value and extensions. The accessor "getRuleId" gives direct access to the value 9204 */ 9205 public ActionAssertRulesetRuleComponent setRuleIdElement(IdType value) { 9206 this.ruleId = value; 9207 return this; 9208 } 9209 9210 /** 9211 * @return Id of the referenced rule within the external ruleset template. 9212 */ 9213 public String getRuleId() { 9214 return this.ruleId == null ? null : this.ruleId.getValue(); 9215 } 9216 9217 /** 9218 * @param value Id of the referenced rule within the external ruleset template. 9219 */ 9220 public ActionAssertRulesetRuleComponent setRuleId(String value) { 9221 if (this.ruleId == null) 9222 this.ruleId = new IdType(); 9223 this.ruleId.setValue(value); 9224 return this; 9225 } 9226 9227 /** 9228 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 9229 */ 9230 public List<ActionAssertRulesetRuleParamComponent> getParam() { 9231 if (this.param == null) 9232 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9233 return this.param; 9234 } 9235 9236 /** 9237 * @return Returns a reference to <code>this</code> for easy method chaining 9238 */ 9239 public ActionAssertRulesetRuleComponent setParam(List<ActionAssertRulesetRuleParamComponent> theParam) { 9240 this.param = theParam; 9241 return this; 9242 } 9243 9244 public boolean hasParam() { 9245 if (this.param == null) 9246 return false; 9247 for (ActionAssertRulesetRuleParamComponent item : this.param) 9248 if (!item.isEmpty()) 9249 return true; 9250 return false; 9251 } 9252 9253 public ActionAssertRulesetRuleParamComponent addParam() { //3 9254 ActionAssertRulesetRuleParamComponent t = new ActionAssertRulesetRuleParamComponent(); 9255 if (this.param == null) 9256 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9257 this.param.add(t); 9258 return t; 9259 } 9260 9261 public ActionAssertRulesetRuleComponent addParam(ActionAssertRulesetRuleParamComponent t) { //3 9262 if (t == null) 9263 return this; 9264 if (this.param == null) 9265 this.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9266 this.param.add(t); 9267 return this; 9268 } 9269 9270 /** 9271 * @return The first repetition of repeating field {@link #param}, creating it if it does not already exist 9272 */ 9273 public ActionAssertRulesetRuleParamComponent getParamFirstRep() { 9274 if (getParam().isEmpty()) { 9275 addParam(); 9276 } 9277 return getParam().get(0); 9278 } 9279 9280 protected void listChildren(List<Property> children) { 9281 super.listChildren(children); 9282 children.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId)); 9283 children.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 9284 } 9285 9286 @Override 9287 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9288 switch (_hash) { 9289 case -919875273: /*ruleId*/ return new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, 1, ruleId); 9290 case 106436749: /*param*/ return new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param); 9291 default: return super.getNamedProperty(_hash, _name, _checkValid); 9292 } 9293 9294 } 9295 9296 @Override 9297 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9298 switch (hash) { 9299 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 9300 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // ActionAssertRulesetRuleParamComponent 9301 default: return super.getProperty(hash, name, checkValid); 9302 } 9303 9304 } 9305 9306 @Override 9307 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9308 switch (hash) { 9309 case -919875273: // ruleId 9310 this.ruleId = castToId(value); // IdType 9311 return value; 9312 case 106436749: // param 9313 this.getParam().add((ActionAssertRulesetRuleParamComponent) value); // ActionAssertRulesetRuleParamComponent 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("ruleId")) { 9323 this.ruleId = castToId(value); // IdType 9324 } else if (name.equals("param")) { 9325 this.getParam().add((ActionAssertRulesetRuleParamComponent) value); 9326 } else 9327 return super.setProperty(name, value); 9328 return value; 9329 } 9330 9331 @Override 9332 public Base makeProperty(int hash, String name) throws FHIRException { 9333 switch (hash) { 9334 case -919875273: return getRuleIdElement(); 9335 case 106436749: return addParam(); 9336 default: return super.makeProperty(hash, name); 9337 } 9338 9339 } 9340 9341 @Override 9342 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9343 switch (hash) { 9344 case -919875273: /*ruleId*/ return new String[] {"id"}; 9345 case 106436749: /*param*/ return new String[] {}; 9346 default: return super.getTypesForProperty(hash, name); 9347 } 9348 9349 } 9350 9351 @Override 9352 public Base addChild(String name) throws FHIRException { 9353 if (name.equals("ruleId")) { 9354 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 9355 } 9356 else if (name.equals("param")) { 9357 return addParam(); 9358 } 9359 else 9360 return super.addChild(name); 9361 } 9362 9363 public ActionAssertRulesetRuleComponent copy() { 9364 ActionAssertRulesetRuleComponent dst = new ActionAssertRulesetRuleComponent(); 9365 copyValues(dst); 9366 dst.ruleId = ruleId == null ? null : ruleId.copy(); 9367 if (param != null) { 9368 dst.param = new ArrayList<ActionAssertRulesetRuleParamComponent>(); 9369 for (ActionAssertRulesetRuleParamComponent i : param) 9370 dst.param.add(i.copy()); 9371 }; 9372 return dst; 9373 } 9374 9375 @Override 9376 public boolean equalsDeep(Base other_) { 9377 if (!super.equalsDeep(other_)) 9378 return false; 9379 if (!(other_ instanceof ActionAssertRulesetRuleComponent)) 9380 return false; 9381 ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other_; 9382 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 9383 } 9384 9385 @Override 9386 public boolean equalsShallow(Base other_) { 9387 if (!super.equalsShallow(other_)) 9388 return false; 9389 if (!(other_ instanceof ActionAssertRulesetRuleComponent)) 9390 return false; 9391 ActionAssertRulesetRuleComponent o = (ActionAssertRulesetRuleComponent) other_; 9392 return compareValues(ruleId, o.ruleId, true); 9393 } 9394 9395 public boolean isEmpty() { 9396 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(ruleId, param); 9397 } 9398 9399 public String fhirType() { 9400 return "TestScript.setup.action.assert.ruleset.rule"; 9401 9402 } 9403 9404 } 9405 9406 @Block() 9407 public static class ActionAssertRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 9408 /** 9409 * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9410 */ 9411 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 9412 @Description(shortDefinition="Parameter name matching external assert ruleset rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert ruleset rule parameter name." ) 9413 protected StringType name; 9414 9415 /** 9416 * The value for the parameter that will be passed on to the external ruleset rule template. 9417 */ 9418 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 9419 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The value for the parameter that will be passed on to the external ruleset rule template." ) 9420 protected StringType value; 9421 9422 private static final long serialVersionUID = 395259392L; 9423 9424 /** 9425 * Constructor 9426 */ 9427 public ActionAssertRulesetRuleParamComponent() { 9428 super(); 9429 } 9430 9431 /** 9432 * Constructor 9433 */ 9434 public ActionAssertRulesetRuleParamComponent(StringType name, StringType value) { 9435 super(); 9436 this.name = name; 9437 this.value = value; 9438 } 9439 9440 /** 9441 * @return {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 9442 */ 9443 public StringType getNameElement() { 9444 if (this.name == null) 9445 if (Configuration.errorOnAutoCreate()) 9446 throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.name"); 9447 else if (Configuration.doAutoCreate()) 9448 this.name = new StringType(); // bb 9449 return this.name; 9450 } 9451 9452 public boolean hasNameElement() { 9453 return this.name != null && !this.name.isEmpty(); 9454 } 9455 9456 public boolean hasName() { 9457 return this.name != null && !this.name.isEmpty(); 9458 } 9459 9460 /** 9461 * @param value {@link #name} (Descriptive name for this parameter that matches the external assert ruleset rule parameter name.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 9462 */ 9463 public ActionAssertRulesetRuleParamComponent setNameElement(StringType value) { 9464 this.name = value; 9465 return this; 9466 } 9467 9468 /** 9469 * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9470 */ 9471 public String getName() { 9472 return this.name == null ? null : this.name.getValue(); 9473 } 9474 9475 /** 9476 * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 9477 */ 9478 public ActionAssertRulesetRuleParamComponent setName(String value) { 9479 if (this.name == null) 9480 this.name = new StringType(); 9481 this.name.setValue(value); 9482 return this; 9483 } 9484 9485 /** 9486 * @return {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 9487 */ 9488 public StringType getValueElement() { 9489 if (this.value == null) 9490 if (Configuration.errorOnAutoCreate()) 9491 throw new Error("Attempt to auto-create ActionAssertRulesetRuleParamComponent.value"); 9492 else if (Configuration.doAutoCreate()) 9493 this.value = new StringType(); // bb 9494 return this.value; 9495 } 9496 9497 public boolean hasValueElement() { 9498 return this.value != null && !this.value.isEmpty(); 9499 } 9500 9501 public boolean hasValue() { 9502 return this.value != null && !this.value.isEmpty(); 9503 } 9504 9505 /** 9506 * @param value {@link #value} (The value for the parameter that will be passed on to the external ruleset rule template.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 9507 */ 9508 public ActionAssertRulesetRuleParamComponent setValueElement(StringType value) { 9509 this.value = value; 9510 return this; 9511 } 9512 9513 /** 9514 * @return The value for the parameter that will be passed on to the external ruleset rule template. 9515 */ 9516 public String getValue() { 9517 return this.value == null ? null : this.value.getValue(); 9518 } 9519 9520 /** 9521 * @param value The value for the parameter that will be passed on to the external ruleset rule template. 9522 */ 9523 public ActionAssertRulesetRuleParamComponent setValue(String value) { 9524 if (this.value == null) 9525 this.value = new StringType(); 9526 this.value.setValue(value); 9527 return this; 9528 } 9529 9530 protected void listChildren(List<Property> children) { 9531 super.listChildren(children); 9532 children.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name)); 9533 children.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value)); 9534 } 9535 9536 @Override 9537 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9538 switch (_hash) { 9539 case 3373707: /*name*/ return new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, 1, name); 9540 case 111972721: /*value*/ return new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, 1, value); 9541 default: return super.getNamedProperty(_hash, _name, _checkValid); 9542 } 9543 9544 } 9545 9546 @Override 9547 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9548 switch (hash) { 9549 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 9550 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 9551 default: return super.getProperty(hash, name, checkValid); 9552 } 9553 9554 } 9555 9556 @Override 9557 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9558 switch (hash) { 9559 case 3373707: // name 9560 this.name = castToString(value); // StringType 9561 return value; 9562 case 111972721: // value 9563 this.value = castToString(value); // StringType 9564 return value; 9565 default: return super.setProperty(hash, name, value); 9566 } 9567 9568 } 9569 9570 @Override 9571 public Base setProperty(String name, Base value) throws FHIRException { 9572 if (name.equals("name")) { 9573 this.name = castToString(value); // StringType 9574 } else if (name.equals("value")) { 9575 this.value = castToString(value); // StringType 9576 } else 9577 return super.setProperty(name, value); 9578 return value; 9579 } 9580 9581 @Override 9582 public Base makeProperty(int hash, String name) throws FHIRException { 9583 switch (hash) { 9584 case 3373707: return getNameElement(); 9585 case 111972721: return getValueElement(); 9586 default: return super.makeProperty(hash, name); 9587 } 9588 9589 } 9590 9591 @Override 9592 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9593 switch (hash) { 9594 case 3373707: /*name*/ return new String[] {"string"}; 9595 case 111972721: /*value*/ return new String[] {"string"}; 9596 default: return super.getTypesForProperty(hash, name); 9597 } 9598 9599 } 9600 9601 @Override 9602 public Base addChild(String name) throws FHIRException { 9603 if (name.equals("name")) { 9604 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 9605 } 9606 else if (name.equals("value")) { 9607 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 9608 } 9609 else 9610 return super.addChild(name); 9611 } 9612 9613 public ActionAssertRulesetRuleParamComponent copy() { 9614 ActionAssertRulesetRuleParamComponent dst = new ActionAssertRulesetRuleParamComponent(); 9615 copyValues(dst); 9616 dst.name = name == null ? null : name.copy(); 9617 dst.value = value == null ? null : value.copy(); 9618 return dst; 9619 } 9620 9621 @Override 9622 public boolean equalsDeep(Base other_) { 9623 if (!super.equalsDeep(other_)) 9624 return false; 9625 if (!(other_ instanceof ActionAssertRulesetRuleParamComponent)) 9626 return false; 9627 ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other_; 9628 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 9629 } 9630 9631 @Override 9632 public boolean equalsShallow(Base other_) { 9633 if (!super.equalsShallow(other_)) 9634 return false; 9635 if (!(other_ instanceof ActionAssertRulesetRuleParamComponent)) 9636 return false; 9637 ActionAssertRulesetRuleParamComponent o = (ActionAssertRulesetRuleParamComponent) other_; 9638 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 9639 } 9640 9641 public boolean isEmpty() { 9642 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value); 9643 } 9644 9645 public String fhirType() { 9646 return "TestScript.setup.action.assert.ruleset.rule.param"; 9647 9648 } 9649 9650 } 9651 9652 @Block() 9653 public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement { 9654 /** 9655 * The name of this test used for tracking/logging purposes by test engines. 9656 */ 9657 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 9658 @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." ) 9659 protected StringType name; 9660 9661 /** 9662 * A short description of the test used by test engines for tracking and reporting purposes. 9663 */ 9664 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 9665 @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." ) 9666 protected StringType description; 9667 9668 /** 9669 * Action would contain either an operation or an assertion. 9670 */ 9671 @Child(name = "action", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9672 @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 9673 protected List<TestActionComponent> action; 9674 9675 private static final long serialVersionUID = -865006110L; 9676 9677 /** 9678 * Constructor 9679 */ 9680 public TestScriptTestComponent() { 9681 super(); 9682 } 9683 9684 /** 9685 * @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 9686 */ 9687 public StringType getNameElement() { 9688 if (this.name == null) 9689 if (Configuration.errorOnAutoCreate()) 9690 throw new Error("Attempt to auto-create TestScriptTestComponent.name"); 9691 else if (Configuration.doAutoCreate()) 9692 this.name = new StringType(); // bb 9693 return this.name; 9694 } 9695 9696 public boolean hasNameElement() { 9697 return this.name != null && !this.name.isEmpty(); 9698 } 9699 9700 public boolean hasName() { 9701 return this.name != null && !this.name.isEmpty(); 9702 } 9703 9704 /** 9705 * @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 9706 */ 9707 public TestScriptTestComponent setNameElement(StringType value) { 9708 this.name = value; 9709 return this; 9710 } 9711 9712 /** 9713 * @return The name of this test used for tracking/logging purposes by test engines. 9714 */ 9715 public String getName() { 9716 return this.name == null ? null : this.name.getValue(); 9717 } 9718 9719 /** 9720 * @param value The name of this test used for tracking/logging purposes by test engines. 9721 */ 9722 public TestScriptTestComponent setName(String value) { 9723 if (Utilities.noString(value)) 9724 this.name = null; 9725 else { 9726 if (this.name == null) 9727 this.name = new StringType(); 9728 this.name.setValue(value); 9729 } 9730 return this; 9731 } 9732 9733 /** 9734 * @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 9735 */ 9736 public StringType getDescriptionElement() { 9737 if (this.description == null) 9738 if (Configuration.errorOnAutoCreate()) 9739 throw new Error("Attempt to auto-create TestScriptTestComponent.description"); 9740 else if (Configuration.doAutoCreate()) 9741 this.description = new StringType(); // bb 9742 return this.description; 9743 } 9744 9745 public boolean hasDescriptionElement() { 9746 return this.description != null && !this.description.isEmpty(); 9747 } 9748 9749 public boolean hasDescription() { 9750 return this.description != null && !this.description.isEmpty(); 9751 } 9752 9753 /** 9754 * @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 9755 */ 9756 public TestScriptTestComponent setDescriptionElement(StringType value) { 9757 this.description = value; 9758 return this; 9759 } 9760 9761 /** 9762 * @return A short description of the test used by test engines for tracking and reporting purposes. 9763 */ 9764 public String getDescription() { 9765 return this.description == null ? null : this.description.getValue(); 9766 } 9767 9768 /** 9769 * @param value A short description of the test used by test engines for tracking and reporting purposes. 9770 */ 9771 public TestScriptTestComponent setDescription(String value) { 9772 if (Utilities.noString(value)) 9773 this.description = null; 9774 else { 9775 if (this.description == null) 9776 this.description = new StringType(); 9777 this.description.setValue(value); 9778 } 9779 return this; 9780 } 9781 9782 /** 9783 * @return {@link #action} (Action would contain either an operation or an assertion.) 9784 */ 9785 public List<TestActionComponent> getAction() { 9786 if (this.action == null) 9787 this.action = new ArrayList<TestActionComponent>(); 9788 return this.action; 9789 } 9790 9791 /** 9792 * @return Returns a reference to <code>this</code> for easy method chaining 9793 */ 9794 public TestScriptTestComponent setAction(List<TestActionComponent> theAction) { 9795 this.action = theAction; 9796 return this; 9797 } 9798 9799 public boolean hasAction() { 9800 if (this.action == null) 9801 return false; 9802 for (TestActionComponent item : this.action) 9803 if (!item.isEmpty()) 9804 return true; 9805 return false; 9806 } 9807 9808 public TestActionComponent addAction() { //3 9809 TestActionComponent t = new TestActionComponent(); 9810 if (this.action == null) 9811 this.action = new ArrayList<TestActionComponent>(); 9812 this.action.add(t); 9813 return t; 9814 } 9815 9816 public TestScriptTestComponent addAction(TestActionComponent t) { //3 9817 if (t == null) 9818 return this; 9819 if (this.action == null) 9820 this.action = new ArrayList<TestActionComponent>(); 9821 this.action.add(t); 9822 return this; 9823 } 9824 9825 /** 9826 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 9827 */ 9828 public TestActionComponent getActionFirstRep() { 9829 if (getAction().isEmpty()) { 9830 addAction(); 9831 } 9832 return getAction().get(0); 9833 } 9834 9835 protected void listChildren(List<Property> children) { 9836 super.listChildren(children); 9837 children.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name)); 9838 children.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, 1, description)); 9839 children.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 9840 } 9841 9842 @Override 9843 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 9844 switch (_hash) { 9845 case 3373707: /*name*/ return new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, 1, name); 9846 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); 9847 case -1422950858: /*action*/ return new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action); 9848 default: return super.getNamedProperty(_hash, _name, _checkValid); 9849 } 9850 9851 } 9852 9853 @Override 9854 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9855 switch (hash) { 9856 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 9857 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 9858 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent 9859 default: return super.getProperty(hash, name, checkValid); 9860 } 9861 9862 } 9863 9864 @Override 9865 public Base setProperty(int hash, String name, Base value) throws FHIRException { 9866 switch (hash) { 9867 case 3373707: // name 9868 this.name = castToString(value); // StringType 9869 return value; 9870 case -1724546052: // description 9871 this.description = castToString(value); // StringType 9872 return value; 9873 case -1422950858: // action 9874 this.getAction().add((TestActionComponent) value); // TestActionComponent 9875 return value; 9876 default: return super.setProperty(hash, name, value); 9877 } 9878 9879 } 9880 9881 @Override 9882 public Base setProperty(String name, Base value) throws FHIRException { 9883 if (name.equals("name")) { 9884 this.name = castToString(value); // StringType 9885 } else if (name.equals("description")) { 9886 this.description = castToString(value); // StringType 9887 } else if (name.equals("action")) { 9888 this.getAction().add((TestActionComponent) value); 9889 } else 9890 return super.setProperty(name, value); 9891 return value; 9892 } 9893 9894 @Override 9895 public Base makeProperty(int hash, String name) throws FHIRException { 9896 switch (hash) { 9897 case 3373707: return getNameElement(); 9898 case -1724546052: return getDescriptionElement(); 9899 case -1422950858: return addAction(); 9900 default: return super.makeProperty(hash, name); 9901 } 9902 9903 } 9904 9905 @Override 9906 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 9907 switch (hash) { 9908 case 3373707: /*name*/ return new String[] {"string"}; 9909 case -1724546052: /*description*/ return new String[] {"string"}; 9910 case -1422950858: /*action*/ return new String[] {}; 9911 default: return super.getTypesForProperty(hash, name); 9912 } 9913 9914 } 9915 9916 @Override 9917 public Base addChild(String name) throws FHIRException { 9918 if (name.equals("name")) { 9919 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 9920 } 9921 else if (name.equals("description")) { 9922 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 9923 } 9924 else if (name.equals("action")) { 9925 return addAction(); 9926 } 9927 else 9928 return super.addChild(name); 9929 } 9930 9931 public TestScriptTestComponent copy() { 9932 TestScriptTestComponent dst = new TestScriptTestComponent(); 9933 copyValues(dst); 9934 dst.name = name == null ? null : name.copy(); 9935 dst.description = description == null ? null : description.copy(); 9936 if (action != null) { 9937 dst.action = new ArrayList<TestActionComponent>(); 9938 for (TestActionComponent i : action) 9939 dst.action.add(i.copy()); 9940 }; 9941 return dst; 9942 } 9943 9944 @Override 9945 public boolean equalsDeep(Base other_) { 9946 if (!super.equalsDeep(other_)) 9947 return false; 9948 if (!(other_ instanceof TestScriptTestComponent)) 9949 return false; 9950 TestScriptTestComponent o = (TestScriptTestComponent) other_; 9951 return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(action, o.action, true) 9952 ; 9953 } 9954 9955 @Override 9956 public boolean equalsShallow(Base other_) { 9957 if (!super.equalsShallow(other_)) 9958 return false; 9959 if (!(other_ instanceof TestScriptTestComponent)) 9960 return false; 9961 TestScriptTestComponent o = (TestScriptTestComponent) other_; 9962 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 9963 } 9964 9965 public boolean isEmpty() { 9966 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description, action 9967 ); 9968 } 9969 9970 public String fhirType() { 9971 return "TestScript.test"; 9972 9973 } 9974 9975 } 9976 9977 @Block() 9978 public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement { 9979 /** 9980 * An operation would involve a REST request to a server. 9981 */ 9982 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 9983 @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 9984 protected SetupActionOperationComponent operation; 9985 9986 /** 9987 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 9988 */ 9989 @Child(name = "assert", type = {SetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false) 9990 @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 9991 protected SetupActionAssertComponent assert_; 9992 9993 private static final long serialVersionUID = -252088305L; 9994 9995 /** 9996 * Constructor 9997 */ 9998 public TestActionComponent() { 9999 super(); 10000 } 10001 10002 /** 10003 * @return {@link #operation} (An operation would involve a REST request to a server.) 10004 */ 10005 public SetupActionOperationComponent getOperation() { 10006 if (this.operation == null) 10007 if (Configuration.errorOnAutoCreate()) 10008 throw new Error("Attempt to auto-create TestActionComponent.operation"); 10009 else if (Configuration.doAutoCreate()) 10010 this.operation = new SetupActionOperationComponent(); // cc 10011 return this.operation; 10012 } 10013 10014 public boolean hasOperation() { 10015 return this.operation != null && !this.operation.isEmpty(); 10016 } 10017 10018 /** 10019 * @param value {@link #operation} (An operation would involve a REST request to a server.) 10020 */ 10021 public TestActionComponent setOperation(SetupActionOperationComponent value) { 10022 this.operation = value; 10023 return this; 10024 } 10025 10026 /** 10027 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 10028 */ 10029 public SetupActionAssertComponent getAssert() { 10030 if (this.assert_ == null) 10031 if (Configuration.errorOnAutoCreate()) 10032 throw new Error("Attempt to auto-create TestActionComponent.assert_"); 10033 else if (Configuration.doAutoCreate()) 10034 this.assert_ = new SetupActionAssertComponent(); // cc 10035 return this.assert_; 10036 } 10037 10038 public boolean hasAssert() { 10039 return this.assert_ != null && !this.assert_.isEmpty(); 10040 } 10041 10042 /** 10043 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 10044 */ 10045 public TestActionComponent setAssert(SetupActionAssertComponent value) { 10046 this.assert_ = value; 10047 return this; 10048 } 10049 10050 protected void listChildren(List<Property> children) { 10051 super.listChildren(children); 10052 children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation)); 10053 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_)); 10054 } 10055 10056 @Override 10057 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 10058 switch (_hash) { 10059 case 1662702951: /*operation*/ return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation); 10060 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_); 10061 default: return super.getNamedProperty(_hash, _name, _checkValid); 10062 } 10063 10064 } 10065 10066 @Override 10067 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10068 switch (hash) { 10069 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 10070 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 10071 default: return super.getProperty(hash, name, checkValid); 10072 } 10073 10074 } 10075 10076 @Override 10077 public Base setProperty(int hash, String name, Base value) throws FHIRException { 10078 switch (hash) { 10079 case 1662702951: // operation 10080 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10081 return value; 10082 case -1408208058: // assert 10083 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 10084 return value; 10085 default: return super.setProperty(hash, name, value); 10086 } 10087 10088 } 10089 10090 @Override 10091 public Base setProperty(String name, Base value) throws FHIRException { 10092 if (name.equals("operation")) { 10093 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10094 } else if (name.equals("assert")) { 10095 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 10096 } else 10097 return super.setProperty(name, value); 10098 return value; 10099 } 10100 10101 @Override 10102 public Base makeProperty(int hash, String name) throws FHIRException { 10103 switch (hash) { 10104 case 1662702951: return getOperation(); 10105 case -1408208058: return getAssert(); 10106 default: return super.makeProperty(hash, name); 10107 } 10108 10109 } 10110 10111 @Override 10112 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 10113 switch (hash) { 10114 case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"}; 10115 case -1408208058: /*assert*/ return new String[] {"@TestScript.setup.action.assert"}; 10116 default: return super.getTypesForProperty(hash, name); 10117 } 10118 10119 } 10120 10121 @Override 10122 public Base addChild(String name) throws FHIRException { 10123 if (name.equals("operation")) { 10124 this.operation = new SetupActionOperationComponent(); 10125 return this.operation; 10126 } 10127 else if (name.equals("assert")) { 10128 this.assert_ = new SetupActionAssertComponent(); 10129 return this.assert_; 10130 } 10131 else 10132 return super.addChild(name); 10133 } 10134 10135 public TestActionComponent copy() { 10136 TestActionComponent dst = new TestActionComponent(); 10137 copyValues(dst); 10138 dst.operation = operation == null ? null : operation.copy(); 10139 dst.assert_ = assert_ == null ? null : assert_.copy(); 10140 return dst; 10141 } 10142 10143 @Override 10144 public boolean equalsDeep(Base other_) { 10145 if (!super.equalsDeep(other_)) 10146 return false; 10147 if (!(other_ instanceof TestActionComponent)) 10148 return false; 10149 TestActionComponent o = (TestActionComponent) other_; 10150 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 10151 } 10152 10153 @Override 10154 public boolean equalsShallow(Base other_) { 10155 if (!super.equalsShallow(other_)) 10156 return false; 10157 if (!(other_ instanceof TestActionComponent)) 10158 return false; 10159 TestActionComponent o = (TestActionComponent) other_; 10160 return true; 10161 } 10162 10163 public boolean isEmpty() { 10164 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation, assert_); 10165 } 10166 10167 public String fhirType() { 10168 return "TestScript.test.action"; 10169 10170 } 10171 10172 } 10173 10174 @Block() 10175 public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement { 10176 /** 10177 * The teardown action will only contain an operation. 10178 */ 10179 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10180 @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." ) 10181 protected List<TeardownActionComponent> action; 10182 10183 private static final long serialVersionUID = 1168638089L; 10184 10185 /** 10186 * Constructor 10187 */ 10188 public TestScriptTeardownComponent() { 10189 super(); 10190 } 10191 10192 /** 10193 * @return {@link #action} (The teardown action will only contain an operation.) 10194 */ 10195 public List<TeardownActionComponent> getAction() { 10196 if (this.action == null) 10197 this.action = new ArrayList<TeardownActionComponent>(); 10198 return this.action; 10199 } 10200 10201 /** 10202 * @return Returns a reference to <code>this</code> for easy method chaining 10203 */ 10204 public TestScriptTeardownComponent setAction(List<TeardownActionComponent> theAction) { 10205 this.action = theAction; 10206 return this; 10207 } 10208 10209 public boolean hasAction() { 10210 if (this.action == null) 10211 return false; 10212 for (TeardownActionComponent item : this.action) 10213 if (!item.isEmpty()) 10214 return true; 10215 return false; 10216 } 10217 10218 public TeardownActionComponent addAction() { //3 10219 TeardownActionComponent t = new TeardownActionComponent(); 10220 if (this.action == null) 10221 this.action = new ArrayList<TeardownActionComponent>(); 10222 this.action.add(t); 10223 return t; 10224 } 10225 10226 public TestScriptTeardownComponent addAction(TeardownActionComponent t) { //3 10227 if (t == null) 10228 return this; 10229 if (this.action == null) 10230 this.action = new ArrayList<TeardownActionComponent>(); 10231 this.action.add(t); 10232 return this; 10233 } 10234 10235 /** 10236 * @return The first repetition of repeating field {@link #action}, creating it if it does not already exist 10237 */ 10238 public TeardownActionComponent getActionFirstRep() { 10239 if (getAction().isEmpty()) { 10240 addAction(); 10241 } 10242 return getAction().get(0); 10243 } 10244 10245 protected void listChildren(List<Property> children) { 10246 super.listChildren(children); 10247 children.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action)); 10248 } 10249 10250 @Override 10251 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 10252 switch (_hash) { 10253 case -1422950858: /*action*/ return new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action); 10254 default: return super.getNamedProperty(_hash, _name, _checkValid); 10255 } 10256 10257 } 10258 10259 @Override 10260 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10261 switch (hash) { 10262 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent 10263 default: return super.getProperty(hash, name, checkValid); 10264 } 10265 10266 } 10267 10268 @Override 10269 public Base setProperty(int hash, String name, Base value) throws FHIRException { 10270 switch (hash) { 10271 case -1422950858: // action 10272 this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent 10273 return value; 10274 default: return super.setProperty(hash, name, value); 10275 } 10276 10277 } 10278 10279 @Override 10280 public Base setProperty(String name, Base value) throws FHIRException { 10281 if (name.equals("action")) { 10282 this.getAction().add((TeardownActionComponent) value); 10283 } else 10284 return super.setProperty(name, value); 10285 return value; 10286 } 10287 10288 @Override 10289 public Base makeProperty(int hash, String name) throws FHIRException { 10290 switch (hash) { 10291 case -1422950858: return addAction(); 10292 default: return super.makeProperty(hash, name); 10293 } 10294 10295 } 10296 10297 @Override 10298 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 10299 switch (hash) { 10300 case -1422950858: /*action*/ return new String[] {}; 10301 default: return super.getTypesForProperty(hash, name); 10302 } 10303 10304 } 10305 10306 @Override 10307 public Base addChild(String name) throws FHIRException { 10308 if (name.equals("action")) { 10309 return addAction(); 10310 } 10311 else 10312 return super.addChild(name); 10313 } 10314 10315 public TestScriptTeardownComponent copy() { 10316 TestScriptTeardownComponent dst = new TestScriptTeardownComponent(); 10317 copyValues(dst); 10318 if (action != null) { 10319 dst.action = new ArrayList<TeardownActionComponent>(); 10320 for (TeardownActionComponent i : action) 10321 dst.action.add(i.copy()); 10322 }; 10323 return dst; 10324 } 10325 10326 @Override 10327 public boolean equalsDeep(Base other_) { 10328 if (!super.equalsDeep(other_)) 10329 return false; 10330 if (!(other_ instanceof TestScriptTeardownComponent)) 10331 return false; 10332 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_; 10333 return compareDeep(action, o.action, true); 10334 } 10335 10336 @Override 10337 public boolean equalsShallow(Base other_) { 10338 if (!super.equalsShallow(other_)) 10339 return false; 10340 if (!(other_ instanceof TestScriptTeardownComponent)) 10341 return false; 10342 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other_; 10343 return true; 10344 } 10345 10346 public boolean isEmpty() { 10347 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(action); 10348 } 10349 10350 public String fhirType() { 10351 return "TestScript.teardown"; 10352 10353 } 10354 10355 } 10356 10357 @Block() 10358 public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement { 10359 /** 10360 * An operation would involve a REST request to a server. 10361 */ 10362 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=1, max=1, modifier=false, summary=false) 10363 @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 10364 protected SetupActionOperationComponent operation; 10365 10366 private static final long serialVersionUID = -1099598054L; 10367 10368 /** 10369 * Constructor 10370 */ 10371 public TeardownActionComponent() { 10372 super(); 10373 } 10374 10375 /** 10376 * Constructor 10377 */ 10378 public TeardownActionComponent(SetupActionOperationComponent operation) { 10379 super(); 10380 this.operation = operation; 10381 } 10382 10383 /** 10384 * @return {@link #operation} (An operation would involve a REST request to a server.) 10385 */ 10386 public SetupActionOperationComponent getOperation() { 10387 if (this.operation == null) 10388 if (Configuration.errorOnAutoCreate()) 10389 throw new Error("Attempt to auto-create TeardownActionComponent.operation"); 10390 else if (Configuration.doAutoCreate()) 10391 this.operation = new SetupActionOperationComponent(); // cc 10392 return this.operation; 10393 } 10394 10395 public boolean hasOperation() { 10396 return this.operation != null && !this.operation.isEmpty(); 10397 } 10398 10399 /** 10400 * @param value {@link #operation} (An operation would involve a REST request to a server.) 10401 */ 10402 public TeardownActionComponent setOperation(SetupActionOperationComponent value) { 10403 this.operation = value; 10404 return this; 10405 } 10406 10407 protected void listChildren(List<Property> children) { 10408 super.listChildren(children); 10409 children.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation)); 10410 } 10411 10412 @Override 10413 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 10414 switch (_hash) { 10415 case 1662702951: /*operation*/ return new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, 1, operation); 10416 default: return super.getNamedProperty(_hash, _name, _checkValid); 10417 } 10418 10419 } 10420 10421 @Override 10422 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10423 switch (hash) { 10424 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 10425 default: return super.getProperty(hash, name, checkValid); 10426 } 10427 10428 } 10429 10430 @Override 10431 public Base setProperty(int hash, String name, Base value) throws FHIRException { 10432 switch (hash) { 10433 case 1662702951: // operation 10434 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10435 return value; 10436 default: return super.setProperty(hash, name, value); 10437 } 10438 10439 } 10440 10441 @Override 10442 public Base setProperty(String name, Base value) throws FHIRException { 10443 if (name.equals("operation")) { 10444 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 10445 } else 10446 return super.setProperty(name, value); 10447 return value; 10448 } 10449 10450 @Override 10451 public Base makeProperty(int hash, String name) throws FHIRException { 10452 switch (hash) { 10453 case 1662702951: return getOperation(); 10454 default: return super.makeProperty(hash, name); 10455 } 10456 10457 } 10458 10459 @Override 10460 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 10461 switch (hash) { 10462 case 1662702951: /*operation*/ return new String[] {"@TestScript.setup.action.operation"}; 10463 default: return super.getTypesForProperty(hash, name); 10464 } 10465 10466 } 10467 10468 @Override 10469 public Base addChild(String name) throws FHIRException { 10470 if (name.equals("operation")) { 10471 this.operation = new SetupActionOperationComponent(); 10472 return this.operation; 10473 } 10474 else 10475 return super.addChild(name); 10476 } 10477 10478 public TeardownActionComponent copy() { 10479 TeardownActionComponent dst = new TeardownActionComponent(); 10480 copyValues(dst); 10481 dst.operation = operation == null ? null : operation.copy(); 10482 return dst; 10483 } 10484 10485 @Override 10486 public boolean equalsDeep(Base other_) { 10487 if (!super.equalsDeep(other_)) 10488 return false; 10489 if (!(other_ instanceof TeardownActionComponent)) 10490 return false; 10491 TeardownActionComponent o = (TeardownActionComponent) other_; 10492 return compareDeep(operation, o.operation, true); 10493 } 10494 10495 @Override 10496 public boolean equalsShallow(Base other_) { 10497 if (!super.equalsShallow(other_)) 10498 return false; 10499 if (!(other_ instanceof TeardownActionComponent)) 10500 return false; 10501 TeardownActionComponent o = (TeardownActionComponent) other_; 10502 return true; 10503 } 10504 10505 public boolean isEmpty() { 10506 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(operation); 10507 } 10508 10509 public String fhirType() { 10510 return "TestScript.teardown.action"; 10511 10512 } 10513 10514 } 10515 10516 /** 10517 * 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. 10518 */ 10519 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 10520 @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." ) 10521 protected Identifier identifier; 10522 10523 /** 10524 * Explaination of why this test script is needed and why it has been designed as it has. 10525 */ 10526 @Child(name = "purpose", type = {MarkdownType.class}, order=1, min=0, max=1, modifier=false, summary=false) 10527 @Description(shortDefinition="Why this test script is defined", formalDefinition="Explaination of why this test script is needed and why it has been designed as it has." ) 10528 protected MarkdownType purpose; 10529 10530 /** 10531 * 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. 10532 */ 10533 @Child(name = "copyright", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false) 10534 @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." ) 10535 protected MarkdownType copyright; 10536 10537 /** 10538 * An abstract server used in operations within this test script in the origin element. 10539 */ 10540 @Child(name = "origin", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10541 @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." ) 10542 protected List<TestScriptOriginComponent> origin; 10543 10544 /** 10545 * An abstract server used in operations within this test script in the destination element. 10546 */ 10547 @Child(name = "destination", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10548 @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." ) 10549 protected List<TestScriptDestinationComponent> destination; 10550 10551 /** 10552 * The required capability must exist and are assumed to function correctly on the FHIR server being tested. 10553 */ 10554 @Child(name = "metadata", type = {}, order=5, min=0, max=1, modifier=false, summary=false) 10555 @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." ) 10556 protected TestScriptMetadataComponent metadata; 10557 10558 /** 10559 * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute. 10560 */ 10561 @Child(name = "fixture", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10562 @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." ) 10563 protected List<TestScriptFixtureComponent> fixture; 10564 10565 /** 10566 * Reference to the profile to be used for validation. 10567 */ 10568 @Child(name = "profile", type = {Reference.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10569 @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." ) 10570 protected List<Reference> profile; 10571 /** 10572 * The actual objects that are the target of the reference (Reference to the profile to be used for validation.) 10573 */ 10574 protected List<Resource> profileTarget; 10575 10576 10577 /** 10578 * Variable is set based either on element value in response body or on header field value in the response headers. 10579 */ 10580 @Child(name = "variable", type = {}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10581 @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." ) 10582 protected List<TestScriptVariableComponent> variable; 10583 10584 /** 10585 * Assert rule to be used in one or more asserts within the test script. 10586 */ 10587 @Child(name = "rule", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10588 @Description(shortDefinition="Assert rule used within the test script", formalDefinition="Assert rule to be used in one or more asserts within the test script." ) 10589 protected List<TestScriptRuleComponent> rule; 10590 10591 /** 10592 * Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied. 10593 */ 10594 @Child(name = "ruleset", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10595 @Description(shortDefinition="Assert ruleset used within the test script", formalDefinition="Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied." ) 10596 protected List<TestScriptRulesetComponent> ruleset; 10597 10598 /** 10599 * A series of required setup operations before tests are executed. 10600 */ 10601 @Child(name = "setup", type = {}, order=11, min=0, max=1, modifier=false, summary=false) 10602 @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." ) 10603 protected TestScriptSetupComponent setup; 10604 10605 /** 10606 * A test in this script. 10607 */ 10608 @Child(name = "test", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 10609 @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." ) 10610 protected List<TestScriptTestComponent> test; 10611 10612 /** 10613 * A series of operations required to clean up after the all the tests are executed (successfully or otherwise). 10614 */ 10615 @Child(name = "teardown", type = {}, order=13, min=0, max=1, modifier=false, summary=false) 10616 @Description(shortDefinition="A series of required clean up steps", formalDefinition="A series of operations required to clean up after the all the tests are executed (successfully or otherwise)." ) 10617 protected TestScriptTeardownComponent teardown; 10618 10619 private static final long serialVersionUID = 1164952373L; 10620 10621 /** 10622 * Constructor 10623 */ 10624 public TestScript() { 10625 super(); 10626 } 10627 10628 /** 10629 * Constructor 10630 */ 10631 public TestScript(UriType url, StringType name, Enumeration<PublicationStatus> status) { 10632 super(); 10633 this.url = url; 10634 this.name = name; 10635 this.status = status; 10636 } 10637 10638 /** 10639 * @return {@link #url} (An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 10640 */ 10641 public UriType getUrlElement() { 10642 if (this.url == null) 10643 if (Configuration.errorOnAutoCreate()) 10644 throw new Error("Attempt to auto-create TestScript.url"); 10645 else if (Configuration.doAutoCreate()) 10646 this.url = new UriType(); // bb 10647 return this.url; 10648 } 10649 10650 public boolean hasUrlElement() { 10651 return this.url != null && !this.url.isEmpty(); 10652 } 10653 10654 public boolean hasUrl() { 10655 return this.url != null && !this.url.isEmpty(); 10656 } 10657 10658 /** 10659 * @param value {@link #url} (An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 10660 */ 10661 public TestScript setUrlElement(UriType value) { 10662 this.url = value; 10663 return this; 10664 } 10665 10666 /** 10667 * @return An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions). 10668 */ 10669 public String getUrl() { 10670 return this.url == null ? null : this.url.getValue(); 10671 } 10672 10673 /** 10674 * @param value An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions). 10675 */ 10676 public TestScript setUrl(String value) { 10677 if (this.url == null) 10678 this.url = new UriType(); 10679 this.url.setValue(value); 10680 return this; 10681 } 10682 10683 /** 10684 * @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.) 10685 */ 10686 public Identifier getIdentifier() { 10687 if (this.identifier == null) 10688 if (Configuration.errorOnAutoCreate()) 10689 throw new Error("Attempt to auto-create TestScript.identifier"); 10690 else if (Configuration.doAutoCreate()) 10691 this.identifier = new Identifier(); // cc 10692 return this.identifier; 10693 } 10694 10695 public boolean hasIdentifier() { 10696 return this.identifier != null && !this.identifier.isEmpty(); 10697 } 10698 10699 /** 10700 * @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.) 10701 */ 10702 public TestScript setIdentifier(Identifier value) { 10703 this.identifier = value; 10704 return this; 10705 } 10706 10707 /** 10708 * @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 10709 */ 10710 public StringType getVersionElement() { 10711 if (this.version == null) 10712 if (Configuration.errorOnAutoCreate()) 10713 throw new Error("Attempt to auto-create TestScript.version"); 10714 else if (Configuration.doAutoCreate()) 10715 this.version = new StringType(); // bb 10716 return this.version; 10717 } 10718 10719 public boolean hasVersionElement() { 10720 return this.version != null && !this.version.isEmpty(); 10721 } 10722 10723 public boolean hasVersion() { 10724 return this.version != null && !this.version.isEmpty(); 10725 } 10726 10727 /** 10728 * @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 10729 */ 10730 public TestScript setVersionElement(StringType value) { 10731 this.version = value; 10732 return this; 10733 } 10734 10735 /** 10736 * @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. 10737 */ 10738 public String getVersion() { 10739 return this.version == null ? null : this.version.getValue(); 10740 } 10741 10742 /** 10743 * @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. 10744 */ 10745 public TestScript setVersion(String value) { 10746 if (Utilities.noString(value)) 10747 this.version = null; 10748 else { 10749 if (this.version == null) 10750 this.version = new StringType(); 10751 this.version.setValue(value); 10752 } 10753 return this; 10754 } 10755 10756 /** 10757 * @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 10758 */ 10759 public StringType getNameElement() { 10760 if (this.name == null) 10761 if (Configuration.errorOnAutoCreate()) 10762 throw new Error("Attempt to auto-create TestScript.name"); 10763 else if (Configuration.doAutoCreate()) 10764 this.name = new StringType(); // bb 10765 return this.name; 10766 } 10767 10768 public boolean hasNameElement() { 10769 return this.name != null && !this.name.isEmpty(); 10770 } 10771 10772 public boolean hasName() { 10773 return this.name != null && !this.name.isEmpty(); 10774 } 10775 10776 /** 10777 * @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 10778 */ 10779 public TestScript setNameElement(StringType value) { 10780 this.name = value; 10781 return this; 10782 } 10783 10784 /** 10785 * @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. 10786 */ 10787 public String getName() { 10788 return this.name == null ? null : this.name.getValue(); 10789 } 10790 10791 /** 10792 * @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. 10793 */ 10794 public TestScript setName(String value) { 10795 if (this.name == null) 10796 this.name = new StringType(); 10797 this.name.setValue(value); 10798 return this; 10799 } 10800 10801 /** 10802 * @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 10803 */ 10804 public StringType getTitleElement() { 10805 if (this.title == null) 10806 if (Configuration.errorOnAutoCreate()) 10807 throw new Error("Attempt to auto-create TestScript.title"); 10808 else if (Configuration.doAutoCreate()) 10809 this.title = new StringType(); // bb 10810 return this.title; 10811 } 10812 10813 public boolean hasTitleElement() { 10814 return this.title != null && !this.title.isEmpty(); 10815 } 10816 10817 public boolean hasTitle() { 10818 return this.title != null && !this.title.isEmpty(); 10819 } 10820 10821 /** 10822 * @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 10823 */ 10824 public TestScript setTitleElement(StringType value) { 10825 this.title = value; 10826 return this; 10827 } 10828 10829 /** 10830 * @return A short, descriptive, user-friendly title for the test script. 10831 */ 10832 public String getTitle() { 10833 return this.title == null ? null : this.title.getValue(); 10834 } 10835 10836 /** 10837 * @param value A short, descriptive, user-friendly title for the test script. 10838 */ 10839 public TestScript setTitle(String value) { 10840 if (Utilities.noString(value)) 10841 this.title = null; 10842 else { 10843 if (this.title == null) 10844 this.title = new StringType(); 10845 this.title.setValue(value); 10846 } 10847 return this; 10848 } 10849 10850 /** 10851 * @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 10852 */ 10853 public Enumeration<PublicationStatus> getStatusElement() { 10854 if (this.status == null) 10855 if (Configuration.errorOnAutoCreate()) 10856 throw new Error("Attempt to auto-create TestScript.status"); 10857 else if (Configuration.doAutoCreate()) 10858 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 10859 return this.status; 10860 } 10861 10862 public boolean hasStatusElement() { 10863 return this.status != null && !this.status.isEmpty(); 10864 } 10865 10866 public boolean hasStatus() { 10867 return this.status != null && !this.status.isEmpty(); 10868 } 10869 10870 /** 10871 * @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 10872 */ 10873 public TestScript setStatusElement(Enumeration<PublicationStatus> value) { 10874 this.status = value; 10875 return this; 10876 } 10877 10878 /** 10879 * @return The status of this test script. Enables tracking the life-cycle of the content. 10880 */ 10881 public PublicationStatus getStatus() { 10882 return this.status == null ? null : this.status.getValue(); 10883 } 10884 10885 /** 10886 * @param value The status of this test script. Enables tracking the life-cycle of the content. 10887 */ 10888 public TestScript setStatus(PublicationStatus value) { 10889 if (this.status == null) 10890 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 10891 this.status.setValue(value); 10892 return this; 10893 } 10894 10895 /** 10896 * @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 10897 */ 10898 public BooleanType getExperimentalElement() { 10899 if (this.experimental == null) 10900 if (Configuration.errorOnAutoCreate()) 10901 throw new Error("Attempt to auto-create TestScript.experimental"); 10902 else if (Configuration.doAutoCreate()) 10903 this.experimental = new BooleanType(); // bb 10904 return this.experimental; 10905 } 10906 10907 public boolean hasExperimentalElement() { 10908 return this.experimental != null && !this.experimental.isEmpty(); 10909 } 10910 10911 public boolean hasExperimental() { 10912 return this.experimental != null && !this.experimental.isEmpty(); 10913 } 10914 10915 /** 10916 * @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 10917 */ 10918 public TestScript setExperimentalElement(BooleanType value) { 10919 this.experimental = value; 10920 return this; 10921 } 10922 10923 /** 10924 * @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. 10925 */ 10926 public boolean getExperimental() { 10927 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 10928 } 10929 10930 /** 10931 * @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. 10932 */ 10933 public TestScript setExperimental(boolean value) { 10934 if (this.experimental == null) 10935 this.experimental = new BooleanType(); 10936 this.experimental.setValue(value); 10937 return this; 10938 } 10939 10940 /** 10941 * @return {@link #date} (The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 10942 */ 10943 public DateTimeType getDateElement() { 10944 if (this.date == null) 10945 if (Configuration.errorOnAutoCreate()) 10946 throw new Error("Attempt to auto-create TestScript.date"); 10947 else if (Configuration.doAutoCreate()) 10948 this.date = new DateTimeType(); // bb 10949 return this.date; 10950 } 10951 10952 public boolean hasDateElement() { 10953 return this.date != null && !this.date.isEmpty(); 10954 } 10955 10956 public boolean hasDate() { 10957 return this.date != null && !this.date.isEmpty(); 10958 } 10959 10960 /** 10961 * @param value {@link #date} (The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 10962 */ 10963 public TestScript setDateElement(DateTimeType value) { 10964 this.date = value; 10965 return this; 10966 } 10967 10968 /** 10969 * @return The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes. 10970 */ 10971 public Date getDate() { 10972 return this.date == null ? null : this.date.getValue(); 10973 } 10974 10975 /** 10976 * @param value The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes. 10977 */ 10978 public TestScript setDate(Date value) { 10979 if (value == null) 10980 this.date = null; 10981 else { 10982 if (this.date == null) 10983 this.date = new DateTimeType(); 10984 this.date.setValue(value); 10985 } 10986 return this; 10987 } 10988 10989 /** 10990 * @return {@link #publisher} (The name of the individual or organization that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 10991 */ 10992 public StringType getPublisherElement() { 10993 if (this.publisher == null) 10994 if (Configuration.errorOnAutoCreate()) 10995 throw new Error("Attempt to auto-create TestScript.publisher"); 10996 else if (Configuration.doAutoCreate()) 10997 this.publisher = new StringType(); // bb 10998 return this.publisher; 10999 } 11000 11001 public boolean hasPublisherElement() { 11002 return this.publisher != null && !this.publisher.isEmpty(); 11003 } 11004 11005 public boolean hasPublisher() { 11006 return this.publisher != null && !this.publisher.isEmpty(); 11007 } 11008 11009 /** 11010 * @param value {@link #publisher} (The name of the individual or organization that published the test script.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 11011 */ 11012 public TestScript setPublisherElement(StringType value) { 11013 this.publisher = value; 11014 return this; 11015 } 11016 11017 /** 11018 * @return The name of the individual or organization that published the test script. 11019 */ 11020 public String getPublisher() { 11021 return this.publisher == null ? null : this.publisher.getValue(); 11022 } 11023 11024 /** 11025 * @param value The name of the individual or organization that published the test script. 11026 */ 11027 public TestScript setPublisher(String value) { 11028 if (Utilities.noString(value)) 11029 this.publisher = null; 11030 else { 11031 if (this.publisher == null) 11032 this.publisher = new StringType(); 11033 this.publisher.setValue(value); 11034 } 11035 return this; 11036 } 11037 11038 /** 11039 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 11040 */ 11041 public List<ContactDetail> getContact() { 11042 if (this.contact == null) 11043 this.contact = new ArrayList<ContactDetail>(); 11044 return this.contact; 11045 } 11046 11047 /** 11048 * @return Returns a reference to <code>this</code> for easy method chaining 11049 */ 11050 public TestScript setContact(List<ContactDetail> theContact) { 11051 this.contact = theContact; 11052 return this; 11053 } 11054 11055 public boolean hasContact() { 11056 if (this.contact == null) 11057 return false; 11058 for (ContactDetail item : this.contact) 11059 if (!item.isEmpty()) 11060 return true; 11061 return false; 11062 } 11063 11064 public ContactDetail addContact() { //3 11065 ContactDetail t = new ContactDetail(); 11066 if (this.contact == null) 11067 this.contact = new ArrayList<ContactDetail>(); 11068 this.contact.add(t); 11069 return t; 11070 } 11071 11072 public TestScript addContact(ContactDetail t) { //3 11073 if (t == null) 11074 return this; 11075 if (this.contact == null) 11076 this.contact = new ArrayList<ContactDetail>(); 11077 this.contact.add(t); 11078 return this; 11079 } 11080 11081 /** 11082 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 11083 */ 11084 public ContactDetail getContactFirstRep() { 11085 if (getContact().isEmpty()) { 11086 addContact(); 11087 } 11088 return getContact().get(0); 11089 } 11090 11091 /** 11092 * @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 11093 */ 11094 public MarkdownType getDescriptionElement() { 11095 if (this.description == null) 11096 if (Configuration.errorOnAutoCreate()) 11097 throw new Error("Attempt to auto-create TestScript.description"); 11098 else if (Configuration.doAutoCreate()) 11099 this.description = new MarkdownType(); // bb 11100 return this.description; 11101 } 11102 11103 public boolean hasDescriptionElement() { 11104 return this.description != null && !this.description.isEmpty(); 11105 } 11106 11107 public boolean hasDescription() { 11108 return this.description != null && !this.description.isEmpty(); 11109 } 11110 11111 /** 11112 * @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 11113 */ 11114 public TestScript setDescriptionElement(MarkdownType value) { 11115 this.description = value; 11116 return this; 11117 } 11118 11119 /** 11120 * @return A free text natural language description of the test script from a consumer's perspective. 11121 */ 11122 public String getDescription() { 11123 return this.description == null ? null : this.description.getValue(); 11124 } 11125 11126 /** 11127 * @param value A free text natural language description of the test script from a consumer's perspective. 11128 */ 11129 public TestScript setDescription(String value) { 11130 if (value == null) 11131 this.description = null; 11132 else { 11133 if (this.description == null) 11134 this.description = new MarkdownType(); 11135 this.description.setValue(value); 11136 } 11137 return this; 11138 } 11139 11140 /** 11141 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.) 11142 */ 11143 public List<UsageContext> getUseContext() { 11144 if (this.useContext == null) 11145 this.useContext = new ArrayList<UsageContext>(); 11146 return this.useContext; 11147 } 11148 11149 /** 11150 * @return Returns a reference to <code>this</code> for easy method chaining 11151 */ 11152 public TestScript setUseContext(List<UsageContext> theUseContext) { 11153 this.useContext = theUseContext; 11154 return this; 11155 } 11156 11157 public boolean hasUseContext() { 11158 if (this.useContext == null) 11159 return false; 11160 for (UsageContext item : this.useContext) 11161 if (!item.isEmpty()) 11162 return true; 11163 return false; 11164 } 11165 11166 public UsageContext addUseContext() { //3 11167 UsageContext t = new UsageContext(); 11168 if (this.useContext == null) 11169 this.useContext = new ArrayList<UsageContext>(); 11170 this.useContext.add(t); 11171 return t; 11172 } 11173 11174 public TestScript addUseContext(UsageContext t) { //3 11175 if (t == null) 11176 return this; 11177 if (this.useContext == null) 11178 this.useContext = new ArrayList<UsageContext>(); 11179 this.useContext.add(t); 11180 return this; 11181 } 11182 11183 /** 11184 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 11185 */ 11186 public UsageContext getUseContextFirstRep() { 11187 if (getUseContext().isEmpty()) { 11188 addUseContext(); 11189 } 11190 return getUseContext().get(0); 11191 } 11192 11193 /** 11194 * @return {@link #jurisdiction} (A legal or geographic region in which the test script is intended to be used.) 11195 */ 11196 public List<CodeableConcept> getJurisdiction() { 11197 if (this.jurisdiction == null) 11198 this.jurisdiction = new ArrayList<CodeableConcept>(); 11199 return this.jurisdiction; 11200 } 11201 11202 /** 11203 * @return Returns a reference to <code>this</code> for easy method chaining 11204 */ 11205 public TestScript setJurisdiction(List<CodeableConcept> theJurisdiction) { 11206 this.jurisdiction = theJurisdiction; 11207 return this; 11208 } 11209 11210 public boolean hasJurisdiction() { 11211 if (this.jurisdiction == null) 11212 return false; 11213 for (CodeableConcept item : this.jurisdiction) 11214 if (!item.isEmpty()) 11215 return true; 11216 return false; 11217 } 11218 11219 public CodeableConcept addJurisdiction() { //3 11220 CodeableConcept t = new CodeableConcept(); 11221 if (this.jurisdiction == null) 11222 this.jurisdiction = new ArrayList<CodeableConcept>(); 11223 this.jurisdiction.add(t); 11224 return t; 11225 } 11226 11227 public TestScript addJurisdiction(CodeableConcept t) { //3 11228 if (t == null) 11229 return this; 11230 if (this.jurisdiction == null) 11231 this.jurisdiction = new ArrayList<CodeableConcept>(); 11232 this.jurisdiction.add(t); 11233 return this; 11234 } 11235 11236 /** 11237 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 11238 */ 11239 public CodeableConcept getJurisdictionFirstRep() { 11240 if (getJurisdiction().isEmpty()) { 11241 addJurisdiction(); 11242 } 11243 return getJurisdiction().get(0); 11244 } 11245 11246 /** 11247 * @return {@link #purpose} (Explaination of why this test script is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 11248 */ 11249 public MarkdownType getPurposeElement() { 11250 if (this.purpose == null) 11251 if (Configuration.errorOnAutoCreate()) 11252 throw new Error("Attempt to auto-create TestScript.purpose"); 11253 else if (Configuration.doAutoCreate()) 11254 this.purpose = new MarkdownType(); // bb 11255 return this.purpose; 11256 } 11257 11258 public boolean hasPurposeElement() { 11259 return this.purpose != null && !this.purpose.isEmpty(); 11260 } 11261 11262 public boolean hasPurpose() { 11263 return this.purpose != null && !this.purpose.isEmpty(); 11264 } 11265 11266 /** 11267 * @param value {@link #purpose} (Explaination of why this test script is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 11268 */ 11269 public TestScript setPurposeElement(MarkdownType value) { 11270 this.purpose = value; 11271 return this; 11272 } 11273 11274 /** 11275 * @return Explaination of why this test script is needed and why it has been designed as it has. 11276 */ 11277 public String getPurpose() { 11278 return this.purpose == null ? null : this.purpose.getValue(); 11279 } 11280 11281 /** 11282 * @param value Explaination of why this test script is needed and why it has been designed as it has. 11283 */ 11284 public TestScript setPurpose(String value) { 11285 if (value == null) 11286 this.purpose = null; 11287 else { 11288 if (this.purpose == null) 11289 this.purpose = new MarkdownType(); 11290 this.purpose.setValue(value); 11291 } 11292 return this; 11293 } 11294 11295 /** 11296 * @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 11297 */ 11298 public MarkdownType getCopyrightElement() { 11299 if (this.copyright == null) 11300 if (Configuration.errorOnAutoCreate()) 11301 throw new Error("Attempt to auto-create TestScript.copyright"); 11302 else if (Configuration.doAutoCreate()) 11303 this.copyright = new MarkdownType(); // bb 11304 return this.copyright; 11305 } 11306 11307 public boolean hasCopyrightElement() { 11308 return this.copyright != null && !this.copyright.isEmpty(); 11309 } 11310 11311 public boolean hasCopyright() { 11312 return this.copyright != null && !this.copyright.isEmpty(); 11313 } 11314 11315 /** 11316 * @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 11317 */ 11318 public TestScript setCopyrightElement(MarkdownType value) { 11319 this.copyright = value; 11320 return this; 11321 } 11322 11323 /** 11324 * @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. 11325 */ 11326 public String getCopyright() { 11327 return this.copyright == null ? null : this.copyright.getValue(); 11328 } 11329 11330 /** 11331 * @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. 11332 */ 11333 public TestScript setCopyright(String value) { 11334 if (value == null) 11335 this.copyright = null; 11336 else { 11337 if (this.copyright == null) 11338 this.copyright = new MarkdownType(); 11339 this.copyright.setValue(value); 11340 } 11341 return this; 11342 } 11343 11344 /** 11345 * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) 11346 */ 11347 public List<TestScriptOriginComponent> getOrigin() { 11348 if (this.origin == null) 11349 this.origin = new ArrayList<TestScriptOriginComponent>(); 11350 return this.origin; 11351 } 11352 11353 /** 11354 * @return Returns a reference to <code>this</code> for easy method chaining 11355 */ 11356 public TestScript setOrigin(List<TestScriptOriginComponent> theOrigin) { 11357 this.origin = theOrigin; 11358 return this; 11359 } 11360 11361 public boolean hasOrigin() { 11362 if (this.origin == null) 11363 return false; 11364 for (TestScriptOriginComponent item : this.origin) 11365 if (!item.isEmpty()) 11366 return true; 11367 return false; 11368 } 11369 11370 public TestScriptOriginComponent addOrigin() { //3 11371 TestScriptOriginComponent t = new TestScriptOriginComponent(); 11372 if (this.origin == null) 11373 this.origin = new ArrayList<TestScriptOriginComponent>(); 11374 this.origin.add(t); 11375 return t; 11376 } 11377 11378 public TestScript addOrigin(TestScriptOriginComponent t) { //3 11379 if (t == null) 11380 return this; 11381 if (this.origin == null) 11382 this.origin = new ArrayList<TestScriptOriginComponent>(); 11383 this.origin.add(t); 11384 return this; 11385 } 11386 11387 /** 11388 * @return The first repetition of repeating field {@link #origin}, creating it if it does not already exist 11389 */ 11390 public TestScriptOriginComponent getOriginFirstRep() { 11391 if (getOrigin().isEmpty()) { 11392 addOrigin(); 11393 } 11394 return getOrigin().get(0); 11395 } 11396 11397 /** 11398 * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.) 11399 */ 11400 public List<TestScriptDestinationComponent> getDestination() { 11401 if (this.destination == null) 11402 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11403 return this.destination; 11404 } 11405 11406 /** 11407 * @return Returns a reference to <code>this</code> for easy method chaining 11408 */ 11409 public TestScript setDestination(List<TestScriptDestinationComponent> theDestination) { 11410 this.destination = theDestination; 11411 return this; 11412 } 11413 11414 public boolean hasDestination() { 11415 if (this.destination == null) 11416 return false; 11417 for (TestScriptDestinationComponent item : this.destination) 11418 if (!item.isEmpty()) 11419 return true; 11420 return false; 11421 } 11422 11423 public TestScriptDestinationComponent addDestination() { //3 11424 TestScriptDestinationComponent t = new TestScriptDestinationComponent(); 11425 if (this.destination == null) 11426 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11427 this.destination.add(t); 11428 return t; 11429 } 11430 11431 public TestScript addDestination(TestScriptDestinationComponent t) { //3 11432 if (t == null) 11433 return this; 11434 if (this.destination == null) 11435 this.destination = new ArrayList<TestScriptDestinationComponent>(); 11436 this.destination.add(t); 11437 return this; 11438 } 11439 11440 /** 11441 * @return The first repetition of repeating field {@link #destination}, creating it if it does not already exist 11442 */ 11443 public TestScriptDestinationComponent getDestinationFirstRep() { 11444 if (getDestination().isEmpty()) { 11445 addDestination(); 11446 } 11447 return getDestination().get(0); 11448 } 11449 11450 /** 11451 * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 11452 */ 11453 public TestScriptMetadataComponent getMetadata() { 11454 if (this.metadata == null) 11455 if (Configuration.errorOnAutoCreate()) 11456 throw new Error("Attempt to auto-create TestScript.metadata"); 11457 else if (Configuration.doAutoCreate()) 11458 this.metadata = new TestScriptMetadataComponent(); // cc 11459 return this.metadata; 11460 } 11461 11462 public boolean hasMetadata() { 11463 return this.metadata != null && !this.metadata.isEmpty(); 11464 } 11465 11466 /** 11467 * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 11468 */ 11469 public TestScript setMetadata(TestScriptMetadataComponent value) { 11470 this.metadata = value; 11471 return this; 11472 } 11473 11474 /** 11475 * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) 11476 */ 11477 public List<TestScriptFixtureComponent> getFixture() { 11478 if (this.fixture == null) 11479 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11480 return this.fixture; 11481 } 11482 11483 /** 11484 * @return Returns a reference to <code>this</code> for easy method chaining 11485 */ 11486 public TestScript setFixture(List<TestScriptFixtureComponent> theFixture) { 11487 this.fixture = theFixture; 11488 return this; 11489 } 11490 11491 public boolean hasFixture() { 11492 if (this.fixture == null) 11493 return false; 11494 for (TestScriptFixtureComponent item : this.fixture) 11495 if (!item.isEmpty()) 11496 return true; 11497 return false; 11498 } 11499 11500 public TestScriptFixtureComponent addFixture() { //3 11501 TestScriptFixtureComponent t = new TestScriptFixtureComponent(); 11502 if (this.fixture == null) 11503 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11504 this.fixture.add(t); 11505 return t; 11506 } 11507 11508 public TestScript addFixture(TestScriptFixtureComponent t) { //3 11509 if (t == null) 11510 return this; 11511 if (this.fixture == null) 11512 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 11513 this.fixture.add(t); 11514 return this; 11515 } 11516 11517 /** 11518 * @return The first repetition of repeating field {@link #fixture}, creating it if it does not already exist 11519 */ 11520 public TestScriptFixtureComponent getFixtureFirstRep() { 11521 if (getFixture().isEmpty()) { 11522 addFixture(); 11523 } 11524 return getFixture().get(0); 11525 } 11526 11527 /** 11528 * @return {@link #profile} (Reference to the profile to be used for validation.) 11529 */ 11530 public List<Reference> getProfile() { 11531 if (this.profile == null) 11532 this.profile = new ArrayList<Reference>(); 11533 return this.profile; 11534 } 11535 11536 /** 11537 * @return Returns a reference to <code>this</code> for easy method chaining 11538 */ 11539 public TestScript setProfile(List<Reference> theProfile) { 11540 this.profile = theProfile; 11541 return this; 11542 } 11543 11544 public boolean hasProfile() { 11545 if (this.profile == null) 11546 return false; 11547 for (Reference item : this.profile) 11548 if (!item.isEmpty()) 11549 return true; 11550 return false; 11551 } 11552 11553 public Reference addProfile() { //3 11554 Reference t = new Reference(); 11555 if (this.profile == null) 11556 this.profile = new ArrayList<Reference>(); 11557 this.profile.add(t); 11558 return t; 11559 } 11560 11561 public TestScript addProfile(Reference t) { //3 11562 if (t == null) 11563 return this; 11564 if (this.profile == null) 11565 this.profile = new ArrayList<Reference>(); 11566 this.profile.add(t); 11567 return this; 11568 } 11569 11570 /** 11571 * @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist 11572 */ 11573 public Reference getProfileFirstRep() { 11574 if (getProfile().isEmpty()) { 11575 addProfile(); 11576 } 11577 return getProfile().get(0); 11578 } 11579 11580 /** 11581 * @deprecated Use Reference#setResource(IBaseResource) instead 11582 */ 11583 @Deprecated 11584 public List<Resource> getProfileTarget() { 11585 if (this.profileTarget == null) 11586 this.profileTarget = new ArrayList<Resource>(); 11587 return this.profileTarget; 11588 } 11589 11590 /** 11591 * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) 11592 */ 11593 public List<TestScriptVariableComponent> getVariable() { 11594 if (this.variable == null) 11595 this.variable = new ArrayList<TestScriptVariableComponent>(); 11596 return this.variable; 11597 } 11598 11599 /** 11600 * @return Returns a reference to <code>this</code> for easy method chaining 11601 */ 11602 public TestScript setVariable(List<TestScriptVariableComponent> theVariable) { 11603 this.variable = theVariable; 11604 return this; 11605 } 11606 11607 public boolean hasVariable() { 11608 if (this.variable == null) 11609 return false; 11610 for (TestScriptVariableComponent item : this.variable) 11611 if (!item.isEmpty()) 11612 return true; 11613 return false; 11614 } 11615 11616 public TestScriptVariableComponent addVariable() { //3 11617 TestScriptVariableComponent t = new TestScriptVariableComponent(); 11618 if (this.variable == null) 11619 this.variable = new ArrayList<TestScriptVariableComponent>(); 11620 this.variable.add(t); 11621 return t; 11622 } 11623 11624 public TestScript addVariable(TestScriptVariableComponent t) { //3 11625 if (t == null) 11626 return this; 11627 if (this.variable == null) 11628 this.variable = new ArrayList<TestScriptVariableComponent>(); 11629 this.variable.add(t); 11630 return this; 11631 } 11632 11633 /** 11634 * @return The first repetition of repeating field {@link #variable}, creating it if it does not already exist 11635 */ 11636 public TestScriptVariableComponent getVariableFirstRep() { 11637 if (getVariable().isEmpty()) { 11638 addVariable(); 11639 } 11640 return getVariable().get(0); 11641 } 11642 11643 /** 11644 * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.) 11645 */ 11646 public List<TestScriptRuleComponent> getRule() { 11647 if (this.rule == null) 11648 this.rule = new ArrayList<TestScriptRuleComponent>(); 11649 return this.rule; 11650 } 11651 11652 /** 11653 * @return Returns a reference to <code>this</code> for easy method chaining 11654 */ 11655 public TestScript setRule(List<TestScriptRuleComponent> theRule) { 11656 this.rule = theRule; 11657 return this; 11658 } 11659 11660 public boolean hasRule() { 11661 if (this.rule == null) 11662 return false; 11663 for (TestScriptRuleComponent item : this.rule) 11664 if (!item.isEmpty()) 11665 return true; 11666 return false; 11667 } 11668 11669 public TestScriptRuleComponent addRule() { //3 11670 TestScriptRuleComponent t = new TestScriptRuleComponent(); 11671 if (this.rule == null) 11672 this.rule = new ArrayList<TestScriptRuleComponent>(); 11673 this.rule.add(t); 11674 return t; 11675 } 11676 11677 public TestScript addRule(TestScriptRuleComponent t) { //3 11678 if (t == null) 11679 return this; 11680 if (this.rule == null) 11681 this.rule = new ArrayList<TestScriptRuleComponent>(); 11682 this.rule.add(t); 11683 return this; 11684 } 11685 11686 /** 11687 * @return The first repetition of repeating field {@link #rule}, creating it if it does not already exist 11688 */ 11689 public TestScriptRuleComponent getRuleFirstRep() { 11690 if (getRule().isEmpty()) { 11691 addRule(); 11692 } 11693 return getRule().get(0); 11694 } 11695 11696 /** 11697 * @return {@link #ruleset} (Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.) 11698 */ 11699 public List<TestScriptRulesetComponent> getRuleset() { 11700 if (this.ruleset == null) 11701 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11702 return this.ruleset; 11703 } 11704 11705 /** 11706 * @return Returns a reference to <code>this</code> for easy method chaining 11707 */ 11708 public TestScript setRuleset(List<TestScriptRulesetComponent> theRuleset) { 11709 this.ruleset = theRuleset; 11710 return this; 11711 } 11712 11713 public boolean hasRuleset() { 11714 if (this.ruleset == null) 11715 return false; 11716 for (TestScriptRulesetComponent item : this.ruleset) 11717 if (!item.isEmpty()) 11718 return true; 11719 return false; 11720 } 11721 11722 public TestScriptRulesetComponent addRuleset() { //3 11723 TestScriptRulesetComponent t = new TestScriptRulesetComponent(); 11724 if (this.ruleset == null) 11725 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11726 this.ruleset.add(t); 11727 return t; 11728 } 11729 11730 public TestScript addRuleset(TestScriptRulesetComponent t) { //3 11731 if (t == null) 11732 return this; 11733 if (this.ruleset == null) 11734 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 11735 this.ruleset.add(t); 11736 return this; 11737 } 11738 11739 /** 11740 * @return The first repetition of repeating field {@link #ruleset}, creating it if it does not already exist 11741 */ 11742 public TestScriptRulesetComponent getRulesetFirstRep() { 11743 if (getRuleset().isEmpty()) { 11744 addRuleset(); 11745 } 11746 return getRuleset().get(0); 11747 } 11748 11749 /** 11750 * @return {@link #setup} (A series of required setup operations before tests are executed.) 11751 */ 11752 public TestScriptSetupComponent getSetup() { 11753 if (this.setup == null) 11754 if (Configuration.errorOnAutoCreate()) 11755 throw new Error("Attempt to auto-create TestScript.setup"); 11756 else if (Configuration.doAutoCreate()) 11757 this.setup = new TestScriptSetupComponent(); // cc 11758 return this.setup; 11759 } 11760 11761 public boolean hasSetup() { 11762 return this.setup != null && !this.setup.isEmpty(); 11763 } 11764 11765 /** 11766 * @param value {@link #setup} (A series of required setup operations before tests are executed.) 11767 */ 11768 public TestScript setSetup(TestScriptSetupComponent value) { 11769 this.setup = value; 11770 return this; 11771 } 11772 11773 /** 11774 * @return {@link #test} (A test in this script.) 11775 */ 11776 public List<TestScriptTestComponent> getTest() { 11777 if (this.test == null) 11778 this.test = new ArrayList<TestScriptTestComponent>(); 11779 return this.test; 11780 } 11781 11782 /** 11783 * @return Returns a reference to <code>this</code> for easy method chaining 11784 */ 11785 public TestScript setTest(List<TestScriptTestComponent> theTest) { 11786 this.test = theTest; 11787 return this; 11788 } 11789 11790 public boolean hasTest() { 11791 if (this.test == null) 11792 return false; 11793 for (TestScriptTestComponent item : this.test) 11794 if (!item.isEmpty()) 11795 return true; 11796 return false; 11797 } 11798 11799 public TestScriptTestComponent addTest() { //3 11800 TestScriptTestComponent t = new TestScriptTestComponent(); 11801 if (this.test == null) 11802 this.test = new ArrayList<TestScriptTestComponent>(); 11803 this.test.add(t); 11804 return t; 11805 } 11806 11807 public TestScript addTest(TestScriptTestComponent t) { //3 11808 if (t == null) 11809 return this; 11810 if (this.test == null) 11811 this.test = new ArrayList<TestScriptTestComponent>(); 11812 this.test.add(t); 11813 return this; 11814 } 11815 11816 /** 11817 * @return The first repetition of repeating field {@link #test}, creating it if it does not already exist 11818 */ 11819 public TestScriptTestComponent getTestFirstRep() { 11820 if (getTest().isEmpty()) { 11821 addTest(); 11822 } 11823 return getTest().get(0); 11824 } 11825 11826 /** 11827 * @return {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 11828 */ 11829 public TestScriptTeardownComponent getTeardown() { 11830 if (this.teardown == null) 11831 if (Configuration.errorOnAutoCreate()) 11832 throw new Error("Attempt to auto-create TestScript.teardown"); 11833 else if (Configuration.doAutoCreate()) 11834 this.teardown = new TestScriptTeardownComponent(); // cc 11835 return this.teardown; 11836 } 11837 11838 public boolean hasTeardown() { 11839 return this.teardown != null && !this.teardown.isEmpty(); 11840 } 11841 11842 /** 11843 * @param value {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 11844 */ 11845 public TestScript setTeardown(TestScriptTeardownComponent value) { 11846 this.teardown = value; 11847 return this; 11848 } 11849 11850 protected void listChildren(List<Property> children) { 11851 super.listChildren(children); 11852 children.add(new Property("url", "uri", "An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url)); 11853 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)); 11854 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)); 11855 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)); 11856 children.add(new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title)); 11857 children.add(new Property("status", "code", "The status of this test script. Enables tracking the life-cycle of the content.", 0, 1, status)); 11858 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)); 11859 children.add(new Property("date", "dateTime", "The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.", 0, 1, date)); 11860 children.add(new Property("publisher", "string", "The name of the individual or organization that published the test script.", 0, 1, publisher)); 11861 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)); 11862 children.add(new Property("description", "markdown", "A free text natural language description of the test script from a consumer's perspective.", 0, 1, description)); 11863 children.add(new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.", 0, java.lang.Integer.MAX_VALUE, useContext)); 11864 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)); 11865 children.add(new Property("purpose", "markdown", "Explaination of why this test script is needed and why it has been designed as it has.", 0, 1, purpose)); 11866 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)); 11867 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)); 11868 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)); 11869 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)); 11870 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)); 11871 children.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile)); 11872 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)); 11873 children.add(new Property("rule", "", "Assert rule to be used in one or more asserts within the test script.", 0, java.lang.Integer.MAX_VALUE, rule)); 11874 children.add(new Property("ruleset", "", "Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.", 0, java.lang.Integer.MAX_VALUE, ruleset)); 11875 children.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup)); 11876 children.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test)); 11877 children.add(new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, 1, teardown)); 11878 } 11879 11880 @Override 11881 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 11882 switch (_hash) { 11883 case 116079: /*url*/ return new Property("url", "uri", "An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this test script is (or will be) published. The URL SHOULD include the major version of the test script. For more information see [Technical and Business Versions](resource.html#versions).", 0, 1, url); 11884 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); 11885 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); 11886 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); 11887 case 110371416: /*title*/ return new Property("title", "string", "A short, descriptive, user-friendly title for the test script.", 0, 1, title); 11888 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); 11889 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); 11890 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the test script was published. The date must change if and when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the test script changes.", 0, 1, date); 11891 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the individual or organization that published the test script.", 0, 1, publisher); 11892 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); 11893 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); 11894 case -669707736: /*useContext*/ return new Property("useContext", "UsageContext", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching for appropriate test script instances.", 0, java.lang.Integer.MAX_VALUE, useContext); 11895 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); 11896 case -220463842: /*purpose*/ return new Property("purpose", "markdown", "Explaination of why this test script is needed and why it has been designed as it has.", 0, 1, purpose); 11897 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); 11898 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); 11899 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); 11900 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); 11901 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); 11902 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); 11903 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); 11904 case 3512060: /*rule*/ return new Property("rule", "", "Assert rule to be used in one or more asserts within the test script.", 0, java.lang.Integer.MAX_VALUE, rule); 11905 case 1548678118: /*ruleset*/ return new Property("ruleset", "", "Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.", 0, java.lang.Integer.MAX_VALUE, ruleset); 11906 case 109329021: /*setup*/ return new Property("setup", "", "A series of required setup operations before tests are executed.", 0, 1, setup); 11907 case 3556498: /*test*/ return new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test); 11908 case -1663474172: /*teardown*/ return new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, 1, teardown); 11909 default: return super.getNamedProperty(_hash, _name, _checkValid); 11910 } 11911 11912 } 11913 11914 @Override 11915 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 11916 switch (hash) { 11917 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 11918 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 11919 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 11920 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 11921 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 11922 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 11923 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 11924 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 11925 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 11926 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 11927 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 11928 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 11929 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 11930 case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // MarkdownType 11931 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 11932 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent 11933 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent 11934 case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent 11935 case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent 11936 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference 11937 case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent 11938 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // TestScriptRuleComponent 11939 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : this.ruleset.toArray(new Base[this.ruleset.size()]); // TestScriptRulesetComponent 11940 case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent 11941 case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent 11942 case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent 11943 default: return super.getProperty(hash, name, checkValid); 11944 } 11945 11946 } 11947 11948 @Override 11949 public Base setProperty(int hash, String name, Base value) throws FHIRException { 11950 switch (hash) { 11951 case 116079: // url 11952 this.url = castToUri(value); // UriType 11953 return value; 11954 case -1618432855: // identifier 11955 this.identifier = castToIdentifier(value); // Identifier 11956 return value; 11957 case 351608024: // version 11958 this.version = castToString(value); // StringType 11959 return value; 11960 case 3373707: // name 11961 this.name = castToString(value); // StringType 11962 return value; 11963 case 110371416: // title 11964 this.title = castToString(value); // StringType 11965 return value; 11966 case -892481550: // status 11967 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 11968 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 11969 return value; 11970 case -404562712: // experimental 11971 this.experimental = castToBoolean(value); // BooleanType 11972 return value; 11973 case 3076014: // date 11974 this.date = castToDateTime(value); // DateTimeType 11975 return value; 11976 case 1447404028: // publisher 11977 this.publisher = castToString(value); // StringType 11978 return value; 11979 case 951526432: // contact 11980 this.getContact().add(castToContactDetail(value)); // ContactDetail 11981 return value; 11982 case -1724546052: // description 11983 this.description = castToMarkdown(value); // MarkdownType 11984 return value; 11985 case -669707736: // useContext 11986 this.getUseContext().add(castToUsageContext(value)); // UsageContext 11987 return value; 11988 case -507075711: // jurisdiction 11989 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 11990 return value; 11991 case -220463842: // purpose 11992 this.purpose = castToMarkdown(value); // MarkdownType 11993 return value; 11994 case 1522889671: // copyright 11995 this.copyright = castToMarkdown(value); // MarkdownType 11996 return value; 11997 case -1008619738: // origin 11998 this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent 11999 return value; 12000 case -1429847026: // destination 12001 this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent 12002 return value; 12003 case -450004177: // metadata 12004 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 12005 return value; 12006 case -843449847: // fixture 12007 this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent 12008 return value; 12009 case -309425751: // profile 12010 this.getProfile().add(castToReference(value)); // Reference 12011 return value; 12012 case -1249586564: // variable 12013 this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent 12014 return value; 12015 case 3512060: // rule 12016 this.getRule().add((TestScriptRuleComponent) value); // TestScriptRuleComponent 12017 return value; 12018 case 1548678118: // ruleset 12019 this.getRuleset().add((TestScriptRulesetComponent) value); // TestScriptRulesetComponent 12020 return value; 12021 case 109329021: // setup 12022 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 12023 return value; 12024 case 3556498: // test 12025 this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent 12026 return value; 12027 case -1663474172: // teardown 12028 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 12029 return value; 12030 default: return super.setProperty(hash, name, value); 12031 } 12032 12033 } 12034 12035 @Override 12036 public Base setProperty(String name, Base value) throws FHIRException { 12037 if (name.equals("url")) { 12038 this.url = castToUri(value); // UriType 12039 } else if (name.equals("identifier")) { 12040 this.identifier = castToIdentifier(value); // Identifier 12041 } else if (name.equals("version")) { 12042 this.version = castToString(value); // StringType 12043 } else if (name.equals("name")) { 12044 this.name = castToString(value); // StringType 12045 } else if (name.equals("title")) { 12046 this.title = castToString(value); // StringType 12047 } else if (name.equals("status")) { 12048 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 12049 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 12050 } else if (name.equals("experimental")) { 12051 this.experimental = castToBoolean(value); // BooleanType 12052 } else if (name.equals("date")) { 12053 this.date = castToDateTime(value); // DateTimeType 12054 } else if (name.equals("publisher")) { 12055 this.publisher = castToString(value); // StringType 12056 } else if (name.equals("contact")) { 12057 this.getContact().add(castToContactDetail(value)); 12058 } else if (name.equals("description")) { 12059 this.description = castToMarkdown(value); // MarkdownType 12060 } else if (name.equals("useContext")) { 12061 this.getUseContext().add(castToUsageContext(value)); 12062 } else if (name.equals("jurisdiction")) { 12063 this.getJurisdiction().add(castToCodeableConcept(value)); 12064 } else if (name.equals("purpose")) { 12065 this.purpose = castToMarkdown(value); // MarkdownType 12066 } else if (name.equals("copyright")) { 12067 this.copyright = castToMarkdown(value); // MarkdownType 12068 } else if (name.equals("origin")) { 12069 this.getOrigin().add((TestScriptOriginComponent) value); 12070 } else if (name.equals("destination")) { 12071 this.getDestination().add((TestScriptDestinationComponent) value); 12072 } else if (name.equals("metadata")) { 12073 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 12074 } else if (name.equals("fixture")) { 12075 this.getFixture().add((TestScriptFixtureComponent) value); 12076 } else if (name.equals("profile")) { 12077 this.getProfile().add(castToReference(value)); 12078 } else if (name.equals("variable")) { 12079 this.getVariable().add((TestScriptVariableComponent) value); 12080 } else if (name.equals("rule")) { 12081 this.getRule().add((TestScriptRuleComponent) value); 12082 } else if (name.equals("ruleset")) { 12083 this.getRuleset().add((TestScriptRulesetComponent) value); 12084 } else if (name.equals("setup")) { 12085 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 12086 } else if (name.equals("test")) { 12087 this.getTest().add((TestScriptTestComponent) value); 12088 } else if (name.equals("teardown")) { 12089 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 12090 } else 12091 return super.setProperty(name, value); 12092 return value; 12093 } 12094 12095 @Override 12096 public Base makeProperty(int hash, String name) throws FHIRException { 12097 switch (hash) { 12098 case 116079: return getUrlElement(); 12099 case -1618432855: return getIdentifier(); 12100 case 351608024: return getVersionElement(); 12101 case 3373707: return getNameElement(); 12102 case 110371416: return getTitleElement(); 12103 case -892481550: return getStatusElement(); 12104 case -404562712: return getExperimentalElement(); 12105 case 3076014: return getDateElement(); 12106 case 1447404028: return getPublisherElement(); 12107 case 951526432: return addContact(); 12108 case -1724546052: return getDescriptionElement(); 12109 case -669707736: return addUseContext(); 12110 case -507075711: return addJurisdiction(); 12111 case -220463842: return getPurposeElement(); 12112 case 1522889671: return getCopyrightElement(); 12113 case -1008619738: return addOrigin(); 12114 case -1429847026: return addDestination(); 12115 case -450004177: return getMetadata(); 12116 case -843449847: return addFixture(); 12117 case -309425751: return addProfile(); 12118 case -1249586564: return addVariable(); 12119 case 3512060: return addRule(); 12120 case 1548678118: return addRuleset(); 12121 case 109329021: return getSetup(); 12122 case 3556498: return addTest(); 12123 case -1663474172: return getTeardown(); 12124 default: return super.makeProperty(hash, name); 12125 } 12126 12127 } 12128 12129 @Override 12130 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 12131 switch (hash) { 12132 case 116079: /*url*/ return new String[] {"uri"}; 12133 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 12134 case 351608024: /*version*/ return new String[] {"string"}; 12135 case 3373707: /*name*/ return new String[] {"string"}; 12136 case 110371416: /*title*/ return new String[] {"string"}; 12137 case -892481550: /*status*/ return new String[] {"code"}; 12138 case -404562712: /*experimental*/ return new String[] {"boolean"}; 12139 case 3076014: /*date*/ return new String[] {"dateTime"}; 12140 case 1447404028: /*publisher*/ return new String[] {"string"}; 12141 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 12142 case -1724546052: /*description*/ return new String[] {"markdown"}; 12143 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 12144 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 12145 case -220463842: /*purpose*/ return new String[] {"markdown"}; 12146 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 12147 case -1008619738: /*origin*/ return new String[] {}; 12148 case -1429847026: /*destination*/ return new String[] {}; 12149 case -450004177: /*metadata*/ return new String[] {}; 12150 case -843449847: /*fixture*/ return new String[] {}; 12151 case -309425751: /*profile*/ return new String[] {"Reference"}; 12152 case -1249586564: /*variable*/ return new String[] {}; 12153 case 3512060: /*rule*/ return new String[] {}; 12154 case 1548678118: /*ruleset*/ return new String[] {}; 12155 case 109329021: /*setup*/ return new String[] {}; 12156 case 3556498: /*test*/ return new String[] {}; 12157 case -1663474172: /*teardown*/ return new String[] {}; 12158 default: return super.getTypesForProperty(hash, name); 12159 } 12160 12161 } 12162 12163 @Override 12164 public Base addChild(String name) throws FHIRException { 12165 if (name.equals("url")) { 12166 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 12167 } 12168 else if (name.equals("identifier")) { 12169 this.identifier = new Identifier(); 12170 return this.identifier; 12171 } 12172 else if (name.equals("version")) { 12173 throw new FHIRException("Cannot call addChild on a primitive type TestScript.version"); 12174 } 12175 else if (name.equals("name")) { 12176 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 12177 } 12178 else if (name.equals("title")) { 12179 throw new FHIRException("Cannot call addChild on a primitive type TestScript.title"); 12180 } 12181 else if (name.equals("status")) { 12182 throw new FHIRException("Cannot call addChild on a primitive type TestScript.status"); 12183 } 12184 else if (name.equals("experimental")) { 12185 throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental"); 12186 } 12187 else if (name.equals("date")) { 12188 throw new FHIRException("Cannot call addChild on a primitive type TestScript.date"); 12189 } 12190 else if (name.equals("publisher")) { 12191 throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher"); 12192 } 12193 else if (name.equals("contact")) { 12194 return addContact(); 12195 } 12196 else if (name.equals("description")) { 12197 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 12198 } 12199 else if (name.equals("useContext")) { 12200 return addUseContext(); 12201 } 12202 else if (name.equals("jurisdiction")) { 12203 return addJurisdiction(); 12204 } 12205 else if (name.equals("purpose")) { 12206 throw new FHIRException("Cannot call addChild on a primitive type TestScript.purpose"); 12207 } 12208 else if (name.equals("copyright")) { 12209 throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright"); 12210 } 12211 else if (name.equals("origin")) { 12212 return addOrigin(); 12213 } 12214 else if (name.equals("destination")) { 12215 return addDestination(); 12216 } 12217 else if (name.equals("metadata")) { 12218 this.metadata = new TestScriptMetadataComponent(); 12219 return this.metadata; 12220 } 12221 else if (name.equals("fixture")) { 12222 return addFixture(); 12223 } 12224 else if (name.equals("profile")) { 12225 return addProfile(); 12226 } 12227 else if (name.equals("variable")) { 12228 return addVariable(); 12229 } 12230 else if (name.equals("rule")) { 12231 return addRule(); 12232 } 12233 else if (name.equals("ruleset")) { 12234 return addRuleset(); 12235 } 12236 else if (name.equals("setup")) { 12237 this.setup = new TestScriptSetupComponent(); 12238 return this.setup; 12239 } 12240 else if (name.equals("test")) { 12241 return addTest(); 12242 } 12243 else if (name.equals("teardown")) { 12244 this.teardown = new TestScriptTeardownComponent(); 12245 return this.teardown; 12246 } 12247 else 12248 return super.addChild(name); 12249 } 12250 12251 public String fhirType() { 12252 return "TestScript"; 12253 12254 } 12255 12256 public TestScript copy() { 12257 TestScript dst = new TestScript(); 12258 copyValues(dst); 12259 dst.url = url == null ? null : url.copy(); 12260 dst.identifier = identifier == null ? null : identifier.copy(); 12261 dst.version = version == null ? null : version.copy(); 12262 dst.name = name == null ? null : name.copy(); 12263 dst.title = title == null ? null : title.copy(); 12264 dst.status = status == null ? null : status.copy(); 12265 dst.experimental = experimental == null ? null : experimental.copy(); 12266 dst.date = date == null ? null : date.copy(); 12267 dst.publisher = publisher == null ? null : publisher.copy(); 12268 if (contact != null) { 12269 dst.contact = new ArrayList<ContactDetail>(); 12270 for (ContactDetail i : contact) 12271 dst.contact.add(i.copy()); 12272 }; 12273 dst.description = description == null ? null : description.copy(); 12274 if (useContext != null) { 12275 dst.useContext = new ArrayList<UsageContext>(); 12276 for (UsageContext i : useContext) 12277 dst.useContext.add(i.copy()); 12278 }; 12279 if (jurisdiction != null) { 12280 dst.jurisdiction = new ArrayList<CodeableConcept>(); 12281 for (CodeableConcept i : jurisdiction) 12282 dst.jurisdiction.add(i.copy()); 12283 }; 12284 dst.purpose = purpose == null ? null : purpose.copy(); 12285 dst.copyright = copyright == null ? null : copyright.copy(); 12286 if (origin != null) { 12287 dst.origin = new ArrayList<TestScriptOriginComponent>(); 12288 for (TestScriptOriginComponent i : origin) 12289 dst.origin.add(i.copy()); 12290 }; 12291 if (destination != null) { 12292 dst.destination = new ArrayList<TestScriptDestinationComponent>(); 12293 for (TestScriptDestinationComponent i : destination) 12294 dst.destination.add(i.copy()); 12295 }; 12296 dst.metadata = metadata == null ? null : metadata.copy(); 12297 if (fixture != null) { 12298 dst.fixture = new ArrayList<TestScriptFixtureComponent>(); 12299 for (TestScriptFixtureComponent i : fixture) 12300 dst.fixture.add(i.copy()); 12301 }; 12302 if (profile != null) { 12303 dst.profile = new ArrayList<Reference>(); 12304 for (Reference i : profile) 12305 dst.profile.add(i.copy()); 12306 }; 12307 if (variable != null) { 12308 dst.variable = new ArrayList<TestScriptVariableComponent>(); 12309 for (TestScriptVariableComponent i : variable) 12310 dst.variable.add(i.copy()); 12311 }; 12312 if (rule != null) { 12313 dst.rule = new ArrayList<TestScriptRuleComponent>(); 12314 for (TestScriptRuleComponent i : rule) 12315 dst.rule.add(i.copy()); 12316 }; 12317 if (ruleset != null) { 12318 dst.ruleset = new ArrayList<TestScriptRulesetComponent>(); 12319 for (TestScriptRulesetComponent i : ruleset) 12320 dst.ruleset.add(i.copy()); 12321 }; 12322 dst.setup = setup == null ? null : setup.copy(); 12323 if (test != null) { 12324 dst.test = new ArrayList<TestScriptTestComponent>(); 12325 for (TestScriptTestComponent i : test) 12326 dst.test.add(i.copy()); 12327 }; 12328 dst.teardown = teardown == null ? null : teardown.copy(); 12329 return dst; 12330 } 12331 12332 protected TestScript typedCopy() { 12333 return copy(); 12334 } 12335 12336 @Override 12337 public boolean equalsDeep(Base other_) { 12338 if (!super.equalsDeep(other_)) 12339 return false; 12340 if (!(other_ instanceof TestScript)) 12341 return false; 12342 TestScript o = (TestScript) other_; 12343 return compareDeep(identifier, o.identifier, true) && compareDeep(purpose, o.purpose, true) && compareDeep(copyright, o.copyright, true) 12344 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true) 12345 && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true) 12346 && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(setup, o.setup, true) 12347 && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true); 12348 } 12349 12350 @Override 12351 public boolean equalsShallow(Base other_) { 12352 if (!super.equalsShallow(other_)) 12353 return false; 12354 if (!(other_ instanceof TestScript)) 12355 return false; 12356 TestScript o = (TestScript) other_; 12357 return compareValues(purpose, o.purpose, true) && compareValues(copyright, o.copyright, true); 12358 } 12359 12360 public boolean isEmpty() { 12361 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, purpose, copyright 12362 , origin, destination, metadata, fixture, profile, variable, rule, ruleset, setup 12363 , test, teardown); 12364 } 12365 12366 @Override 12367 public ResourceType getResourceType() { 12368 return ResourceType.TestScript; 12369 } 12370 12371 /** 12372 * Search parameter: <b>date</b> 12373 * <p> 12374 * Description: <b>The test script publication date</b><br> 12375 * Type: <b>date</b><br> 12376 * Path: <b>TestScript.date</b><br> 12377 * </p> 12378 */ 12379 @SearchParamDefinition(name="date", path="TestScript.date", description="The test script publication date", type="date" ) 12380 public static final String SP_DATE = "date"; 12381 /** 12382 * <b>Fluent Client</b> search parameter constant for <b>date</b> 12383 * <p> 12384 * Description: <b>The test script publication date</b><br> 12385 * Type: <b>date</b><br> 12386 * Path: <b>TestScript.date</b><br> 12387 * </p> 12388 */ 12389 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 12390 12391 /** 12392 * Search parameter: <b>identifier</b> 12393 * <p> 12394 * Description: <b>External identifier for the test script</b><br> 12395 * Type: <b>token</b><br> 12396 * Path: <b>TestScript.identifier</b><br> 12397 * </p> 12398 */ 12399 @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier for the test script", type="token" ) 12400 public static final String SP_IDENTIFIER = "identifier"; 12401 /** 12402 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 12403 * <p> 12404 * Description: <b>External identifier for the test script</b><br> 12405 * Type: <b>token</b><br> 12406 * Path: <b>TestScript.identifier</b><br> 12407 * </p> 12408 */ 12409 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 12410 12411 /** 12412 * Search parameter: <b>jurisdiction</b> 12413 * <p> 12414 * Description: <b>Intended jurisdiction for the test script</b><br> 12415 * Type: <b>token</b><br> 12416 * Path: <b>TestScript.jurisdiction</b><br> 12417 * </p> 12418 */ 12419 @SearchParamDefinition(name="jurisdiction", path="TestScript.jurisdiction", description="Intended jurisdiction for the test script", type="token" ) 12420 public static final String SP_JURISDICTION = "jurisdiction"; 12421 /** 12422 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 12423 * <p> 12424 * Description: <b>Intended jurisdiction for the test script</b><br> 12425 * Type: <b>token</b><br> 12426 * Path: <b>TestScript.jurisdiction</b><br> 12427 * </p> 12428 */ 12429 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 12430 12431 /** 12432 * Search parameter: <b>name</b> 12433 * <p> 12434 * Description: <b>Computationally friendly name of the test script</b><br> 12435 * Type: <b>string</b><br> 12436 * Path: <b>TestScript.name</b><br> 12437 * </p> 12438 */ 12439 @SearchParamDefinition(name="name", path="TestScript.name", description="Computationally friendly name of the test script", type="string" ) 12440 public static final String SP_NAME = "name"; 12441 /** 12442 * <b>Fluent Client</b> search parameter constant for <b>name</b> 12443 * <p> 12444 * Description: <b>Computationally friendly name of the test script</b><br> 12445 * Type: <b>string</b><br> 12446 * Path: <b>TestScript.name</b><br> 12447 * </p> 12448 */ 12449 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 12450 12451 /** 12452 * Search parameter: <b>description</b> 12453 * <p> 12454 * Description: <b>The description of the test script</b><br> 12455 * Type: <b>string</b><br> 12456 * Path: <b>TestScript.description</b><br> 12457 * </p> 12458 */ 12459 @SearchParamDefinition(name="description", path="TestScript.description", description="The description of the test script", type="string" ) 12460 public static final String SP_DESCRIPTION = "description"; 12461 /** 12462 * <b>Fluent Client</b> search parameter constant for <b>description</b> 12463 * <p> 12464 * Description: <b>The description of the test script</b><br> 12465 * Type: <b>string</b><br> 12466 * Path: <b>TestScript.description</b><br> 12467 * </p> 12468 */ 12469 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 12470 12471 /** 12472 * Search parameter: <b>publisher</b> 12473 * <p> 12474 * Description: <b>Name of the publisher of the test script</b><br> 12475 * Type: <b>string</b><br> 12476 * Path: <b>TestScript.publisher</b><br> 12477 * </p> 12478 */ 12479 @SearchParamDefinition(name="publisher", path="TestScript.publisher", description="Name of the publisher of the test script", type="string" ) 12480 public static final String SP_PUBLISHER = "publisher"; 12481 /** 12482 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 12483 * <p> 12484 * Description: <b>Name of the publisher of the test script</b><br> 12485 * Type: <b>string</b><br> 12486 * Path: <b>TestScript.publisher</b><br> 12487 * </p> 12488 */ 12489 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 12490 12491 /** 12492 * Search parameter: <b>testscript-capability</b> 12493 * <p> 12494 * Description: <b>TestScript required and validated capability</b><br> 12495 * Type: <b>string</b><br> 12496 * Path: <b>TestScript.metadata.capability.description</b><br> 12497 * </p> 12498 */ 12499 @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" ) 12500 public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability"; 12501 /** 12502 * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b> 12503 * <p> 12504 * Description: <b>TestScript required and validated capability</b><br> 12505 * Type: <b>string</b><br> 12506 * Path: <b>TestScript.metadata.capability.description</b><br> 12507 * </p> 12508 */ 12509 public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY); 12510 12511 /** 12512 * Search parameter: <b>title</b> 12513 * <p> 12514 * Description: <b>The human-friendly name of the test script</b><br> 12515 * Type: <b>string</b><br> 12516 * Path: <b>TestScript.title</b><br> 12517 * </p> 12518 */ 12519 @SearchParamDefinition(name="title", path="TestScript.title", description="The human-friendly name of the test script", type="string" ) 12520 public static final String SP_TITLE = "title"; 12521 /** 12522 * <b>Fluent Client</b> search parameter constant for <b>title</b> 12523 * <p> 12524 * Description: <b>The human-friendly name of the test script</b><br> 12525 * Type: <b>string</b><br> 12526 * Path: <b>TestScript.title</b><br> 12527 * </p> 12528 */ 12529 public static final ca.uhn.fhir.rest.gclient.StringClientParam TITLE = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TITLE); 12530 12531 /** 12532 * Search parameter: <b>version</b> 12533 * <p> 12534 * Description: <b>The business version of the test script</b><br> 12535 * Type: <b>token</b><br> 12536 * Path: <b>TestScript.version</b><br> 12537 * </p> 12538 */ 12539 @SearchParamDefinition(name="version", path="TestScript.version", description="The business version of the test script", type="token" ) 12540 public static final String SP_VERSION = "version"; 12541 /** 12542 * <b>Fluent Client</b> search parameter constant for <b>version</b> 12543 * <p> 12544 * Description: <b>The business version of the test script</b><br> 12545 * Type: <b>token</b><br> 12546 * Path: <b>TestScript.version</b><br> 12547 * </p> 12548 */ 12549 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 12550 12551 /** 12552 * Search parameter: <b>url</b> 12553 * <p> 12554 * Description: <b>The uri that identifies the test script</b><br> 12555 * Type: <b>uri</b><br> 12556 * Path: <b>TestScript.url</b><br> 12557 * </p> 12558 */ 12559 @SearchParamDefinition(name="url", path="TestScript.url", description="The uri that identifies the test script", type="uri" ) 12560 public static final String SP_URL = "url"; 12561 /** 12562 * <b>Fluent Client</b> search parameter constant for <b>url</b> 12563 * <p> 12564 * Description: <b>The uri that identifies the test script</b><br> 12565 * Type: <b>uri</b><br> 12566 * Path: <b>TestScript.url</b><br> 12567 * </p> 12568 */ 12569 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 12570 12571 /** 12572 * Search parameter: <b>status</b> 12573 * <p> 12574 * Description: <b>The current status of the test script</b><br> 12575 * Type: <b>token</b><br> 12576 * Path: <b>TestScript.status</b><br> 12577 * </p> 12578 */ 12579 @SearchParamDefinition(name="status", path="TestScript.status", description="The current status of the test script", type="token" ) 12580 public static final String SP_STATUS = "status"; 12581 /** 12582 * <b>Fluent Client</b> search parameter constant for <b>status</b> 12583 * <p> 12584 * Description: <b>The current status of the test script</b><br> 12585 * Type: <b>token</b><br> 12586 * Path: <b>TestScript.status</b><br> 12587 * </p> 12588 */ 12589 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 12590 12591 12592} 12593