001package org.hl7.fhir.dstu2016may.model; 002 003 004 005 006/* 007 Copyright (c) 2011+, HL7, Inc. 008 All rights reserved. 009 010 Redistribution and use in source and binary forms, with or without modification, 011 are permitted provided that the following conditions are met: 012 013 * Redistributions of source code must retain the above copyright notice, this 014 list of conditions and the following disclaimer. 015 * Redistributions in binary form must reproduce the above copyright notice, 016 this list of conditions and the following disclaimer in the documentation 017 and/or other materials provided with the distribution. 018 * Neither the name of HL7 nor the names of its contributors may be used to 019 endorse or promote products derived from this software without specific 020 prior written permission. 021 022 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 023 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 024 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 025 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 026 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 027 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 028 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 029 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 030 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 031 POSSIBILITY OF SUCH DAMAGE. 032 033*/ 034 035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 036import java.util.ArrayList; 037import java.util.Date; 038import java.util.List; 039 040import org.hl7.fhir.dstu2016may.model.Enumerations.ConformanceResourceStatus; 041import org.hl7.fhir.dstu2016may.model.Enumerations.ConformanceResourceStatusEnumFactory; 042import org.hl7.fhir.exceptions.FHIRException; 043import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 044import org.hl7.fhir.utilities.Utilities; 045 046import ca.uhn.fhir.model.api.annotation.Block; 047import ca.uhn.fhir.model.api.annotation.Child; 048import ca.uhn.fhir.model.api.annotation.Description; 049import ca.uhn.fhir.model.api.annotation.ResourceDef; 050import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 051/** 052 * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. 053 */ 054@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/Profile/TestScript") 055public class TestScript extends DomainResource { 056 057 public enum ContentType { 058 /** 059 * XML content-type corresponding to the application/xml+fhir mime-type. 060 */ 061 XML, 062 /** 063 * JSON content-type corresponding to the application/json+fhir mime-type. 064 */ 065 JSON, 066 /** 067 * added to help the parsers 068 */ 069 NULL; 070 public static ContentType fromCode(String codeString) throws FHIRException { 071 if (codeString == null || "".equals(codeString)) 072 return null; 073 if ("xml".equals(codeString)) 074 return XML; 075 if ("json".equals(codeString)) 076 return JSON; 077 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 078 } 079 public String toCode() { 080 switch (this) { 081 case XML: return "xml"; 082 case JSON: return "json"; 083 case NULL: return null; 084 default: return "?"; 085 } 086 } 087 public String getSystem() { 088 switch (this) { 089 case XML: return "http://hl7.org/fhir/content-type"; 090 case JSON: return "http://hl7.org/fhir/content-type"; 091 case NULL: return null; 092 default: return "?"; 093 } 094 } 095 public String getDefinition() { 096 switch (this) { 097 case XML: return "XML content-type corresponding to the application/xml+fhir mime-type."; 098 case JSON: return "JSON content-type corresponding to the application/json+fhir mime-type."; 099 case NULL: return null; 100 default: return "?"; 101 } 102 } 103 public String getDisplay() { 104 switch (this) { 105 case XML: return "xml"; 106 case JSON: return "json"; 107 case NULL: return null; 108 default: return "?"; 109 } 110 } 111 } 112 113 public static class ContentTypeEnumFactory implements EnumFactory<ContentType> { 114 public ContentType fromCode(String codeString) throws IllegalArgumentException { 115 if (codeString == null || "".equals(codeString)) 116 if (codeString == null || "".equals(codeString)) 117 return null; 118 if ("xml".equals(codeString)) 119 return ContentType.XML; 120 if ("json".equals(codeString)) 121 return ContentType.JSON; 122 throw new IllegalArgumentException("Unknown ContentType code '"+codeString+"'"); 123 } 124 public Enumeration<ContentType> fromType(Base code) throws FHIRException { 125 if (code == null || code.isEmpty()) 126 return null; 127 String codeString = ((PrimitiveType) code).asStringValue(); 128 if (codeString == null || "".equals(codeString)) 129 return null; 130 if ("xml".equals(codeString)) 131 return new Enumeration<ContentType>(this, ContentType.XML); 132 if ("json".equals(codeString)) 133 return new Enumeration<ContentType>(this, ContentType.JSON); 134 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 135 } 136 public String toCode(ContentType code) { 137 if (code == ContentType.XML) 138 return "xml"; 139 if (code == ContentType.JSON) 140 return "json"; 141 return "?"; 142 } 143 public String toSystem(ContentType code) { 144 return code.getSystem(); 145 } 146 } 147 148 public enum AssertionDirectionType { 149 /** 150 * The assertion is evaluated on the response. This is the default value. 151 */ 152 RESPONSE, 153 /** 154 * The assertion is evaluated on the request. 155 */ 156 REQUEST, 157 /** 158 * added to help the parsers 159 */ 160 NULL; 161 public static AssertionDirectionType fromCode(String codeString) throws FHIRException { 162 if (codeString == null || "".equals(codeString)) 163 return null; 164 if ("response".equals(codeString)) 165 return RESPONSE; 166 if ("request".equals(codeString)) 167 return REQUEST; 168 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 169 } 170 public String toCode() { 171 switch (this) { 172 case RESPONSE: return "response"; 173 case REQUEST: return "request"; 174 case NULL: return null; 175 default: return "?"; 176 } 177 } 178 public String getSystem() { 179 switch (this) { 180 case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes"; 181 case REQUEST: return "http://hl7.org/fhir/assert-direction-codes"; 182 case NULL: return null; 183 default: return "?"; 184 } 185 } 186 public String getDefinition() { 187 switch (this) { 188 case RESPONSE: return "The assertion is evaluated on the response. This is the default value."; 189 case REQUEST: return "The assertion is evaluated on the request."; 190 case NULL: return null; 191 default: return "?"; 192 } 193 } 194 public String getDisplay() { 195 switch (this) { 196 case RESPONSE: return "response"; 197 case REQUEST: return "request"; 198 case NULL: return null; 199 default: return "?"; 200 } 201 } 202 } 203 204 public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> { 205 public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException { 206 if (codeString == null || "".equals(codeString)) 207 if (codeString == null || "".equals(codeString)) 208 return null; 209 if ("response".equals(codeString)) 210 return AssertionDirectionType.RESPONSE; 211 if ("request".equals(codeString)) 212 return AssertionDirectionType.REQUEST; 213 throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'"); 214 } 215 public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException { 216 if (code == null || code.isEmpty()) 217 return null; 218 String codeString = ((PrimitiveType) code).asStringValue(); 219 if (codeString == null || "".equals(codeString)) 220 return null; 221 if ("response".equals(codeString)) 222 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE); 223 if ("request".equals(codeString)) 224 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST); 225 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 226 } 227 public String toCode(AssertionDirectionType code) { 228 if (code == AssertionDirectionType.RESPONSE) 229 return "response"; 230 if (code == AssertionDirectionType.REQUEST) 231 return "request"; 232 return "?"; 233 } 234 public String toSystem(AssertionDirectionType code) { 235 return code.getSystem(); 236 } 237 } 238 239 public enum AssertionOperatorType { 240 /** 241 * Default value. Equals comparison. 242 */ 243 EQUALS, 244 /** 245 * Not equals comparison. 246 */ 247 NOTEQUALS, 248 /** 249 * Compare value within a known set of values. 250 */ 251 IN, 252 /** 253 * Compare value not within a known set of values. 254 */ 255 NOTIN, 256 /** 257 * Compare value to be greater than a known value. 258 */ 259 GREATERTHAN, 260 /** 261 * Compare value to be less than a known value. 262 */ 263 LESSTHAN, 264 /** 265 * Compare value is empty. 266 */ 267 EMPTY, 268 /** 269 * Compare value is not empty. 270 */ 271 NOTEMPTY, 272 /** 273 * Compare value string contains a known value. 274 */ 275 CONTAINS, 276 /** 277 * Compare value string does not contain a known value. 278 */ 279 NOTCONTAINS, 280 /** 281 * added to help the parsers 282 */ 283 NULL; 284 public static AssertionOperatorType fromCode(String codeString) throws FHIRException { 285 if (codeString == null || "".equals(codeString)) 286 return null; 287 if ("equals".equals(codeString)) 288 return EQUALS; 289 if ("notEquals".equals(codeString)) 290 return NOTEQUALS; 291 if ("in".equals(codeString)) 292 return IN; 293 if ("notIn".equals(codeString)) 294 return NOTIN; 295 if ("greaterThan".equals(codeString)) 296 return GREATERTHAN; 297 if ("lessThan".equals(codeString)) 298 return LESSTHAN; 299 if ("empty".equals(codeString)) 300 return EMPTY; 301 if ("notEmpty".equals(codeString)) 302 return NOTEMPTY; 303 if ("contains".equals(codeString)) 304 return CONTAINS; 305 if ("notContains".equals(codeString)) 306 return NOTCONTAINS; 307 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 308 } 309 public String toCode() { 310 switch (this) { 311 case EQUALS: return "equals"; 312 case NOTEQUALS: return "notEquals"; 313 case IN: return "in"; 314 case NOTIN: return "notIn"; 315 case GREATERTHAN: return "greaterThan"; 316 case LESSTHAN: return "lessThan"; 317 case EMPTY: return "empty"; 318 case NOTEMPTY: return "notEmpty"; 319 case CONTAINS: return "contains"; 320 case NOTCONTAINS: return "notContains"; 321 case NULL: return null; 322 default: return "?"; 323 } 324 } 325 public String getSystem() { 326 switch (this) { 327 case EQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 328 case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 329 case IN: return "http://hl7.org/fhir/assert-operator-codes"; 330 case NOTIN: return "http://hl7.org/fhir/assert-operator-codes"; 331 case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 332 case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 333 case EMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 334 case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 335 case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 336 case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 337 case NULL: return null; 338 default: return "?"; 339 } 340 } 341 public String getDefinition() { 342 switch (this) { 343 case EQUALS: return "Default value. Equals comparison."; 344 case NOTEQUALS: return "Not equals comparison."; 345 case IN: return "Compare value within a known set of values."; 346 case NOTIN: return "Compare value not within a known set of values."; 347 case GREATERTHAN: return "Compare value to be greater than a known value."; 348 case LESSTHAN: return "Compare value to be less than a known value."; 349 case EMPTY: return "Compare value is empty."; 350 case NOTEMPTY: return "Compare value is not empty."; 351 case CONTAINS: return "Compare value string contains a known value."; 352 case NOTCONTAINS: return "Compare value string does not contain a known value."; 353 case NULL: return null; 354 default: return "?"; 355 } 356 } 357 public String getDisplay() { 358 switch (this) { 359 case EQUALS: return "equals"; 360 case NOTEQUALS: return "notEquals"; 361 case IN: return "in"; 362 case NOTIN: return "notIn"; 363 case GREATERTHAN: return "greaterThan"; 364 case LESSTHAN: return "lessThan"; 365 case EMPTY: return "empty"; 366 case NOTEMPTY: return "notEmpty"; 367 case CONTAINS: return "contains"; 368 case NOTCONTAINS: return "notContains"; 369 case NULL: return null; 370 default: return "?"; 371 } 372 } 373 } 374 375 public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> { 376 public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException { 377 if (codeString == null || "".equals(codeString)) 378 if (codeString == null || "".equals(codeString)) 379 return null; 380 if ("equals".equals(codeString)) 381 return AssertionOperatorType.EQUALS; 382 if ("notEquals".equals(codeString)) 383 return AssertionOperatorType.NOTEQUALS; 384 if ("in".equals(codeString)) 385 return AssertionOperatorType.IN; 386 if ("notIn".equals(codeString)) 387 return AssertionOperatorType.NOTIN; 388 if ("greaterThan".equals(codeString)) 389 return AssertionOperatorType.GREATERTHAN; 390 if ("lessThan".equals(codeString)) 391 return AssertionOperatorType.LESSTHAN; 392 if ("empty".equals(codeString)) 393 return AssertionOperatorType.EMPTY; 394 if ("notEmpty".equals(codeString)) 395 return AssertionOperatorType.NOTEMPTY; 396 if ("contains".equals(codeString)) 397 return AssertionOperatorType.CONTAINS; 398 if ("notContains".equals(codeString)) 399 return AssertionOperatorType.NOTCONTAINS; 400 throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'"); 401 } 402 public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException { 403 if (code == null || code.isEmpty()) 404 return null; 405 String codeString = ((PrimitiveType) code).asStringValue(); 406 if (codeString == null || "".equals(codeString)) 407 return null; 408 if ("equals".equals(codeString)) 409 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS); 410 if ("notEquals".equals(codeString)) 411 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS); 412 if ("in".equals(codeString)) 413 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN); 414 if ("notIn".equals(codeString)) 415 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN); 416 if ("greaterThan".equals(codeString)) 417 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN); 418 if ("lessThan".equals(codeString)) 419 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN); 420 if ("empty".equals(codeString)) 421 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY); 422 if ("notEmpty".equals(codeString)) 423 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY); 424 if ("contains".equals(codeString)) 425 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS); 426 if ("notContains".equals(codeString)) 427 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS); 428 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 429 } 430 public String toCode(AssertionOperatorType code) { 431 if (code == AssertionOperatorType.EQUALS) 432 return "equals"; 433 if (code == AssertionOperatorType.NOTEQUALS) 434 return "notEquals"; 435 if (code == AssertionOperatorType.IN) 436 return "in"; 437 if (code == AssertionOperatorType.NOTIN) 438 return "notIn"; 439 if (code == AssertionOperatorType.GREATERTHAN) 440 return "greaterThan"; 441 if (code == AssertionOperatorType.LESSTHAN) 442 return "lessThan"; 443 if (code == AssertionOperatorType.EMPTY) 444 return "empty"; 445 if (code == AssertionOperatorType.NOTEMPTY) 446 return "notEmpty"; 447 if (code == AssertionOperatorType.CONTAINS) 448 return "contains"; 449 if (code == AssertionOperatorType.NOTCONTAINS) 450 return "notContains"; 451 return "?"; 452 } 453 public String toSystem(AssertionOperatorType code) { 454 return code.getSystem(); 455 } 456 } 457 458 public enum AssertionResponseTypes { 459 /** 460 * Response code is 200. 461 */ 462 OKAY, 463 /** 464 * Response code is 201. 465 */ 466 CREATED, 467 /** 468 * Response code is 204. 469 */ 470 NOCONTENT, 471 /** 472 * Response code is 304. 473 */ 474 NOTMODIFIED, 475 /** 476 * Response code is 400. 477 */ 478 BAD, 479 /** 480 * Response code is 403. 481 */ 482 FORBIDDEN, 483 /** 484 * Response code is 404. 485 */ 486 NOTFOUND, 487 /** 488 * Response code is 405. 489 */ 490 METHODNOTALLOWED, 491 /** 492 * Response code is 409. 493 */ 494 CONFLICT, 495 /** 496 * Response code is 410. 497 */ 498 GONE, 499 /** 500 * Response code is 412. 501 */ 502 PRECONDITIONFAILED, 503 /** 504 * Response code is 422. 505 */ 506 UNPROCESSABLE, 507 /** 508 * added to help the parsers 509 */ 510 NULL; 511 public static AssertionResponseTypes fromCode(String codeString) throws FHIRException { 512 if (codeString == null || "".equals(codeString)) 513 return null; 514 if ("okay".equals(codeString)) 515 return OKAY; 516 if ("created".equals(codeString)) 517 return CREATED; 518 if ("noContent".equals(codeString)) 519 return NOCONTENT; 520 if ("notModified".equals(codeString)) 521 return NOTMODIFIED; 522 if ("bad".equals(codeString)) 523 return BAD; 524 if ("forbidden".equals(codeString)) 525 return FORBIDDEN; 526 if ("notFound".equals(codeString)) 527 return NOTFOUND; 528 if ("methodNotAllowed".equals(codeString)) 529 return METHODNOTALLOWED; 530 if ("conflict".equals(codeString)) 531 return CONFLICT; 532 if ("gone".equals(codeString)) 533 return GONE; 534 if ("preconditionFailed".equals(codeString)) 535 return PRECONDITIONFAILED; 536 if ("unprocessable".equals(codeString)) 537 return UNPROCESSABLE; 538 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 539 } 540 public String toCode() { 541 switch (this) { 542 case OKAY: return "okay"; 543 case CREATED: return "created"; 544 case NOCONTENT: return "noContent"; 545 case NOTMODIFIED: return "notModified"; 546 case BAD: return "bad"; 547 case FORBIDDEN: return "forbidden"; 548 case NOTFOUND: return "notFound"; 549 case METHODNOTALLOWED: return "methodNotAllowed"; 550 case CONFLICT: return "conflict"; 551 case GONE: return "gone"; 552 case PRECONDITIONFAILED: return "preconditionFailed"; 553 case UNPROCESSABLE: return "unprocessable"; 554 case NULL: return null; 555 default: return "?"; 556 } 557 } 558 public String getSystem() { 559 switch (this) { 560 case OKAY: return "http://hl7.org/fhir/assert-response-code-types"; 561 case CREATED: return "http://hl7.org/fhir/assert-response-code-types"; 562 case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types"; 563 case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types"; 564 case BAD: return "http://hl7.org/fhir/assert-response-code-types"; 565 case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types"; 566 case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types"; 567 case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types"; 568 case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types"; 569 case GONE: return "http://hl7.org/fhir/assert-response-code-types"; 570 case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types"; 571 case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types"; 572 case NULL: return null; 573 default: return "?"; 574 } 575 } 576 public String getDefinition() { 577 switch (this) { 578 case OKAY: return "Response code is 200."; 579 case CREATED: return "Response code is 201."; 580 case NOCONTENT: return "Response code is 204."; 581 case NOTMODIFIED: return "Response code is 304."; 582 case BAD: return "Response code is 400."; 583 case FORBIDDEN: return "Response code is 403."; 584 case NOTFOUND: return "Response code is 404."; 585 case METHODNOTALLOWED: return "Response code is 405."; 586 case CONFLICT: return "Response code is 409."; 587 case GONE: return "Response code is 410."; 588 case PRECONDITIONFAILED: return "Response code is 412."; 589 case UNPROCESSABLE: return "Response code is 422."; 590 case NULL: return null; 591 default: return "?"; 592 } 593 } 594 public String getDisplay() { 595 switch (this) { 596 case OKAY: return "okay"; 597 case CREATED: return "created"; 598 case NOCONTENT: return "noContent"; 599 case NOTMODIFIED: return "notModified"; 600 case BAD: return "bad"; 601 case FORBIDDEN: return "forbidden"; 602 case NOTFOUND: return "notFound"; 603 case METHODNOTALLOWED: return "methodNotAllowed"; 604 case CONFLICT: return "conflict"; 605 case GONE: return "gone"; 606 case PRECONDITIONFAILED: return "preconditionFailed"; 607 case UNPROCESSABLE: return "unprocessable"; 608 case NULL: return null; 609 default: return "?"; 610 } 611 } 612 } 613 614 public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> { 615 public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException { 616 if (codeString == null || "".equals(codeString)) 617 if (codeString == null || "".equals(codeString)) 618 return null; 619 if ("okay".equals(codeString)) 620 return AssertionResponseTypes.OKAY; 621 if ("created".equals(codeString)) 622 return AssertionResponseTypes.CREATED; 623 if ("noContent".equals(codeString)) 624 return AssertionResponseTypes.NOCONTENT; 625 if ("notModified".equals(codeString)) 626 return AssertionResponseTypes.NOTMODIFIED; 627 if ("bad".equals(codeString)) 628 return AssertionResponseTypes.BAD; 629 if ("forbidden".equals(codeString)) 630 return AssertionResponseTypes.FORBIDDEN; 631 if ("notFound".equals(codeString)) 632 return AssertionResponseTypes.NOTFOUND; 633 if ("methodNotAllowed".equals(codeString)) 634 return AssertionResponseTypes.METHODNOTALLOWED; 635 if ("conflict".equals(codeString)) 636 return AssertionResponseTypes.CONFLICT; 637 if ("gone".equals(codeString)) 638 return AssertionResponseTypes.GONE; 639 if ("preconditionFailed".equals(codeString)) 640 return AssertionResponseTypes.PRECONDITIONFAILED; 641 if ("unprocessable".equals(codeString)) 642 return AssertionResponseTypes.UNPROCESSABLE; 643 throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'"); 644 } 645 public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException { 646 if (code == null || code.isEmpty()) 647 return null; 648 String codeString = ((PrimitiveType) code).asStringValue(); 649 if (codeString == null || "".equals(codeString)) 650 return null; 651 if ("okay".equals(codeString)) 652 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY); 653 if ("created".equals(codeString)) 654 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED); 655 if ("noContent".equals(codeString)) 656 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT); 657 if ("notModified".equals(codeString)) 658 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED); 659 if ("bad".equals(codeString)) 660 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD); 661 if ("forbidden".equals(codeString)) 662 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN); 663 if ("notFound".equals(codeString)) 664 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND); 665 if ("methodNotAllowed".equals(codeString)) 666 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED); 667 if ("conflict".equals(codeString)) 668 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT); 669 if ("gone".equals(codeString)) 670 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE); 671 if ("preconditionFailed".equals(codeString)) 672 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED); 673 if ("unprocessable".equals(codeString)) 674 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE); 675 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 676 } 677 public String toCode(AssertionResponseTypes code) { 678 if (code == AssertionResponseTypes.OKAY) 679 return "okay"; 680 if (code == AssertionResponseTypes.CREATED) 681 return "created"; 682 if (code == AssertionResponseTypes.NOCONTENT) 683 return "noContent"; 684 if (code == AssertionResponseTypes.NOTMODIFIED) 685 return "notModified"; 686 if (code == AssertionResponseTypes.BAD) 687 return "bad"; 688 if (code == AssertionResponseTypes.FORBIDDEN) 689 return "forbidden"; 690 if (code == AssertionResponseTypes.NOTFOUND) 691 return "notFound"; 692 if (code == AssertionResponseTypes.METHODNOTALLOWED) 693 return "methodNotAllowed"; 694 if (code == AssertionResponseTypes.CONFLICT) 695 return "conflict"; 696 if (code == AssertionResponseTypes.GONE) 697 return "gone"; 698 if (code == AssertionResponseTypes.PRECONDITIONFAILED) 699 return "preconditionFailed"; 700 if (code == AssertionResponseTypes.UNPROCESSABLE) 701 return "unprocessable"; 702 return "?"; 703 } 704 public String toSystem(AssertionResponseTypes code) { 705 return code.getSystem(); 706 } 707 } 708 709 @Block() 710 public static class TestScriptContactComponent extends BackboneElement implements IBaseBackboneElement { 711 /** 712 * The name of an individual to contact regarding the Test Script. 713 */ 714 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 715 @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the Test Script." ) 716 protected StringType name; 717 718 /** 719 * Contact details for individual (if a name was provided) or the publisher. 720 */ 721 @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 722 @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) 723 protected List<ContactPoint> telecom; 724 725 private static final long serialVersionUID = -1179697803L; 726 727 /** 728 * Constructor 729 */ 730 public TestScriptContactComponent() { 731 super(); 732 } 733 734 /** 735 * @return {@link #name} (The name of an individual to contact regarding the Test Script.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 736 */ 737 public StringType getNameElement() { 738 if (this.name == null) 739 if (Configuration.errorOnAutoCreate()) 740 throw new Error("Attempt to auto-create TestScriptContactComponent.name"); 741 else if (Configuration.doAutoCreate()) 742 this.name = new StringType(); // bb 743 return this.name; 744 } 745 746 public boolean hasNameElement() { 747 return this.name != null && !this.name.isEmpty(); 748 } 749 750 public boolean hasName() { 751 return this.name != null && !this.name.isEmpty(); 752 } 753 754 /** 755 * @param value {@link #name} (The name of an individual to contact regarding the Test Script.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 756 */ 757 public TestScriptContactComponent setNameElement(StringType value) { 758 this.name = value; 759 return this; 760 } 761 762 /** 763 * @return The name of an individual to contact regarding the Test Script. 764 */ 765 public String getName() { 766 return this.name == null ? null : this.name.getValue(); 767 } 768 769 /** 770 * @param value The name of an individual to contact regarding the Test Script. 771 */ 772 public TestScriptContactComponent setName(String value) { 773 if (Utilities.noString(value)) 774 this.name = null; 775 else { 776 if (this.name == null) 777 this.name = new StringType(); 778 this.name.setValue(value); 779 } 780 return this; 781 } 782 783 /** 784 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 785 */ 786 public List<ContactPoint> getTelecom() { 787 if (this.telecom == null) 788 this.telecom = new ArrayList<ContactPoint>(); 789 return this.telecom; 790 } 791 792 public boolean hasTelecom() { 793 if (this.telecom == null) 794 return false; 795 for (ContactPoint item : this.telecom) 796 if (!item.isEmpty()) 797 return true; 798 return false; 799 } 800 801 /** 802 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 803 */ 804 // syntactic sugar 805 public ContactPoint addTelecom() { //3 806 ContactPoint t = new ContactPoint(); 807 if (this.telecom == null) 808 this.telecom = new ArrayList<ContactPoint>(); 809 this.telecom.add(t); 810 return t; 811 } 812 813 // syntactic sugar 814 public TestScriptContactComponent addTelecom(ContactPoint t) { //3 815 if (t == null) 816 return this; 817 if (this.telecom == null) 818 this.telecom = new ArrayList<ContactPoint>(); 819 this.telecom.add(t); 820 return this; 821 } 822 823 protected void listChildren(List<Property> childrenList) { 824 super.listChildren(childrenList); 825 childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the Test Script.", 0, java.lang.Integer.MAX_VALUE, name)); 826 childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); 827 } 828 829 @Override 830 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 831 switch (hash) { 832 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 833 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 834 default: return super.getProperty(hash, name, checkValid); 835 } 836 837 } 838 839 @Override 840 public void setProperty(int hash, String name, Base value) throws FHIRException { 841 switch (hash) { 842 case 3373707: // name 843 this.name = castToString(value); // StringType 844 break; 845 case -1429363305: // telecom 846 this.getTelecom().add(castToContactPoint(value)); // ContactPoint 847 break; 848 default: super.setProperty(hash, name, value); 849 } 850 851 } 852 853 @Override 854 public void setProperty(String name, Base value) throws FHIRException { 855 if (name.equals("name")) 856 this.name = castToString(value); // StringType 857 else if (name.equals("telecom")) 858 this.getTelecom().add(castToContactPoint(value)); 859 else 860 super.setProperty(name, value); 861 } 862 863 @Override 864 public Base makeProperty(int hash, String name) throws FHIRException { 865 switch (hash) { 866 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 867 case -1429363305: return addTelecom(); // ContactPoint 868 default: return super.makeProperty(hash, name); 869 } 870 871 } 872 873 @Override 874 public Base addChild(String name) throws FHIRException { 875 if (name.equals("name")) { 876 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 877 } 878 else if (name.equals("telecom")) { 879 return addTelecom(); 880 } 881 else 882 return super.addChild(name); 883 } 884 885 public TestScriptContactComponent copy() { 886 TestScriptContactComponent dst = new TestScriptContactComponent(); 887 copyValues(dst); 888 dst.name = name == null ? null : name.copy(); 889 if (telecom != null) { 890 dst.telecom = new ArrayList<ContactPoint>(); 891 for (ContactPoint i : telecom) 892 dst.telecom.add(i.copy()); 893 }; 894 return dst; 895 } 896 897 @Override 898 public boolean equalsDeep(Base other) { 899 if (!super.equalsDeep(other)) 900 return false; 901 if (!(other instanceof TestScriptContactComponent)) 902 return false; 903 TestScriptContactComponent o = (TestScriptContactComponent) other; 904 return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); 905 } 906 907 @Override 908 public boolean equalsShallow(Base other) { 909 if (!super.equalsShallow(other)) 910 return false; 911 if (!(other instanceof TestScriptContactComponent)) 912 return false; 913 TestScriptContactComponent o = (TestScriptContactComponent) other; 914 return compareValues(name, o.name, true); 915 } 916 917 public boolean isEmpty() { 918 return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) 919 ; 920 } 921 922 public String fhirType() { 923 return "TestScript.contact"; 924 925 } 926 927 } 928 929 @Block() 930 public static class TestScriptOriginComponent extends BackboneElement implements IBaseBackboneElement { 931 /** 932 * Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 933 */ 934 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 935 @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." ) 936 protected IntegerType index; 937 938 /** 939 * The type of origin profile the test system supports. 940 */ 941 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 942 @Description(shortDefinition="FHIR-Client | FHIR-SDC-FormFiller", formalDefinition="The type of origin profile the test system supports." ) 943 protected Coding profile; 944 945 private static final long serialVersionUID = -1239935149L; 946 947 /** 948 * Constructor 949 */ 950 public TestScriptOriginComponent() { 951 super(); 952 } 953 954 /** 955 * Constructor 956 */ 957 public TestScriptOriginComponent(IntegerType index, Coding profile) { 958 super(); 959 this.index = index; 960 this.profile = profile; 961 } 962 963 /** 964 * @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 965 */ 966 public IntegerType getIndexElement() { 967 if (this.index == null) 968 if (Configuration.errorOnAutoCreate()) 969 throw new Error("Attempt to auto-create TestScriptOriginComponent.index"); 970 else if (Configuration.doAutoCreate()) 971 this.index = new IntegerType(); // bb 972 return this.index; 973 } 974 975 public boolean hasIndexElement() { 976 return this.index != null && !this.index.isEmpty(); 977 } 978 979 public boolean hasIndex() { 980 return this.index != null && !this.index.isEmpty(); 981 } 982 983 /** 984 * @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 985 */ 986 public TestScriptOriginComponent setIndexElement(IntegerType value) { 987 this.index = value; 988 return this; 989 } 990 991 /** 992 * @return Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 993 */ 994 public int getIndex() { 995 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 996 } 997 998 /** 999 * @param value Abstract name given to an origin server in this test script. The name is provided as a number starting at 1. 1000 */ 1001 public TestScriptOriginComponent setIndex(int value) { 1002 if (this.index == null) 1003 this.index = new IntegerType(); 1004 this.index.setValue(value); 1005 return this; 1006 } 1007 1008 /** 1009 * @return {@link #profile} (The type of origin profile the test system supports.) 1010 */ 1011 public Coding getProfile() { 1012 if (this.profile == null) 1013 if (Configuration.errorOnAutoCreate()) 1014 throw new Error("Attempt to auto-create TestScriptOriginComponent.profile"); 1015 else if (Configuration.doAutoCreate()) 1016 this.profile = new Coding(); // cc 1017 return this.profile; 1018 } 1019 1020 public boolean hasProfile() { 1021 return this.profile != null && !this.profile.isEmpty(); 1022 } 1023 1024 /** 1025 * @param value {@link #profile} (The type of origin profile the test system supports.) 1026 */ 1027 public TestScriptOriginComponent setProfile(Coding value) { 1028 this.profile = value; 1029 return this; 1030 } 1031 1032 protected void listChildren(List<Property> childrenList) { 1033 super.listChildren(childrenList); 1034 childrenList.add(new Property("index", "integer", "Abstract name given to an origin server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); 1035 childrenList.add(new Property("profile", "Coding", "The type of origin profile the test system supports.", 0, java.lang.Integer.MAX_VALUE, profile)); 1036 } 1037 1038 @Override 1039 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1040 switch (hash) { 1041 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1042 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1043 default: return super.getProperty(hash, name, checkValid); 1044 } 1045 1046 } 1047 1048 @Override 1049 public void setProperty(int hash, String name, Base value) throws FHIRException { 1050 switch (hash) { 1051 case 100346066: // index 1052 this.index = castToInteger(value); // IntegerType 1053 break; 1054 case -309425751: // profile 1055 this.profile = castToCoding(value); // Coding 1056 break; 1057 default: super.setProperty(hash, name, value); 1058 } 1059 1060 } 1061 1062 @Override 1063 public void setProperty(String name, Base value) throws FHIRException { 1064 if (name.equals("index")) 1065 this.index = castToInteger(value); // IntegerType 1066 else if (name.equals("profile")) 1067 this.profile = castToCoding(value); // Coding 1068 else 1069 super.setProperty(name, value); 1070 } 1071 1072 @Override 1073 public Base makeProperty(int hash, String name) throws FHIRException { 1074 switch (hash) { 1075 case 100346066: throw new FHIRException("Cannot make property index as it is not a complex type"); // IntegerType 1076 case -309425751: return getProfile(); // Coding 1077 default: return super.makeProperty(hash, name); 1078 } 1079 1080 } 1081 1082 @Override 1083 public Base addChild(String name) throws FHIRException { 1084 if (name.equals("index")) { 1085 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1086 } 1087 else if (name.equals("profile")) { 1088 this.profile = new Coding(); 1089 return this.profile; 1090 } 1091 else 1092 return super.addChild(name); 1093 } 1094 1095 public TestScriptOriginComponent copy() { 1096 TestScriptOriginComponent dst = new TestScriptOriginComponent(); 1097 copyValues(dst); 1098 dst.index = index == null ? null : index.copy(); 1099 dst.profile = profile == null ? null : profile.copy(); 1100 return dst; 1101 } 1102 1103 @Override 1104 public boolean equalsDeep(Base other) { 1105 if (!super.equalsDeep(other)) 1106 return false; 1107 if (!(other instanceof TestScriptOriginComponent)) 1108 return false; 1109 TestScriptOriginComponent o = (TestScriptOriginComponent) other; 1110 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1111 } 1112 1113 @Override 1114 public boolean equalsShallow(Base other) { 1115 if (!super.equalsShallow(other)) 1116 return false; 1117 if (!(other instanceof TestScriptOriginComponent)) 1118 return false; 1119 TestScriptOriginComponent o = (TestScriptOriginComponent) other; 1120 return compareValues(index, o.index, true); 1121 } 1122 1123 public boolean isEmpty() { 1124 return super.isEmpty() && (index == null || index.isEmpty()) && (profile == null || profile.isEmpty()) 1125 ; 1126 } 1127 1128 public String fhirType() { 1129 return "TestScript.origin"; 1130 1131 } 1132 1133 } 1134 1135 @Block() 1136 public static class TestScriptDestinationComponent extends BackboneElement implements IBaseBackboneElement { 1137 /** 1138 * Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1139 */ 1140 @Child(name = "index", type = {IntegerType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1141 @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." ) 1142 protected IntegerType index; 1143 1144 /** 1145 * The type of destination profile the test system supports. 1146 */ 1147 @Child(name = "profile", type = {Coding.class}, order=2, min=1, max=1, modifier=false, summary=false) 1148 @Description(shortDefinition="FHIR-Server | FHIR-SDC-FormManager | FHIR-SDC-FormReceiver | FHIR-SDC-FormProcessor", formalDefinition="The type of destination profile the test system supports." ) 1149 protected Coding profile; 1150 1151 private static final long serialVersionUID = -1239935149L; 1152 1153 /** 1154 * Constructor 1155 */ 1156 public TestScriptDestinationComponent() { 1157 super(); 1158 } 1159 1160 /** 1161 * Constructor 1162 */ 1163 public TestScriptDestinationComponent(IntegerType index, Coding profile) { 1164 super(); 1165 this.index = index; 1166 this.profile = profile; 1167 } 1168 1169 /** 1170 * @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 1171 */ 1172 public IntegerType getIndexElement() { 1173 if (this.index == null) 1174 if (Configuration.errorOnAutoCreate()) 1175 throw new Error("Attempt to auto-create TestScriptDestinationComponent.index"); 1176 else if (Configuration.doAutoCreate()) 1177 this.index = new IntegerType(); // bb 1178 return this.index; 1179 } 1180 1181 public boolean hasIndexElement() { 1182 return this.index != null && !this.index.isEmpty(); 1183 } 1184 1185 public boolean hasIndex() { 1186 return this.index != null && !this.index.isEmpty(); 1187 } 1188 1189 /** 1190 * @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 1191 */ 1192 public TestScriptDestinationComponent setIndexElement(IntegerType value) { 1193 this.index = value; 1194 return this; 1195 } 1196 1197 /** 1198 * @return Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1199 */ 1200 public int getIndex() { 1201 return this.index == null || this.index.isEmpty() ? 0 : this.index.getValue(); 1202 } 1203 1204 /** 1205 * @param value Abstract name given to a destination server in this test script. The name is provided as a number starting at 1. 1206 */ 1207 public TestScriptDestinationComponent setIndex(int value) { 1208 if (this.index == null) 1209 this.index = new IntegerType(); 1210 this.index.setValue(value); 1211 return this; 1212 } 1213 1214 /** 1215 * @return {@link #profile} (The type of destination profile the test system supports.) 1216 */ 1217 public Coding getProfile() { 1218 if (this.profile == null) 1219 if (Configuration.errorOnAutoCreate()) 1220 throw new Error("Attempt to auto-create TestScriptDestinationComponent.profile"); 1221 else if (Configuration.doAutoCreate()) 1222 this.profile = new Coding(); // cc 1223 return this.profile; 1224 } 1225 1226 public boolean hasProfile() { 1227 return this.profile != null && !this.profile.isEmpty(); 1228 } 1229 1230 /** 1231 * @param value {@link #profile} (The type of destination profile the test system supports.) 1232 */ 1233 public TestScriptDestinationComponent setProfile(Coding value) { 1234 this.profile = value; 1235 return this; 1236 } 1237 1238 protected void listChildren(List<Property> childrenList) { 1239 super.listChildren(childrenList); 1240 childrenList.add(new Property("index", "integer", "Abstract name given to a destination server in this test script. The name is provided as a number starting at 1.", 0, java.lang.Integer.MAX_VALUE, index)); 1241 childrenList.add(new Property("profile", "Coding", "The type of destination profile the test system supports.", 0, java.lang.Integer.MAX_VALUE, profile)); 1242 } 1243 1244 @Override 1245 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1246 switch (hash) { 1247 case 100346066: /*index*/ return this.index == null ? new Base[0] : new Base[] {this.index}; // IntegerType 1248 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Coding 1249 default: return super.getProperty(hash, name, checkValid); 1250 } 1251 1252 } 1253 1254 @Override 1255 public void setProperty(int hash, String name, Base value) throws FHIRException { 1256 switch (hash) { 1257 case 100346066: // index 1258 this.index = castToInteger(value); // IntegerType 1259 break; 1260 case -309425751: // profile 1261 this.profile = castToCoding(value); // Coding 1262 break; 1263 default: super.setProperty(hash, name, value); 1264 } 1265 1266 } 1267 1268 @Override 1269 public void setProperty(String name, Base value) throws FHIRException { 1270 if (name.equals("index")) 1271 this.index = castToInteger(value); // IntegerType 1272 else if (name.equals("profile")) 1273 this.profile = castToCoding(value); // Coding 1274 else 1275 super.setProperty(name, value); 1276 } 1277 1278 @Override 1279 public Base makeProperty(int hash, String name) throws FHIRException { 1280 switch (hash) { 1281 case 100346066: throw new FHIRException("Cannot make property index as it is not a complex type"); // IntegerType 1282 case -309425751: return getProfile(); // Coding 1283 default: return super.makeProperty(hash, name); 1284 } 1285 1286 } 1287 1288 @Override 1289 public Base addChild(String name) throws FHIRException { 1290 if (name.equals("index")) { 1291 throw new FHIRException("Cannot call addChild on a primitive type TestScript.index"); 1292 } 1293 else if (name.equals("profile")) { 1294 this.profile = new Coding(); 1295 return this.profile; 1296 } 1297 else 1298 return super.addChild(name); 1299 } 1300 1301 public TestScriptDestinationComponent copy() { 1302 TestScriptDestinationComponent dst = new TestScriptDestinationComponent(); 1303 copyValues(dst); 1304 dst.index = index == null ? null : index.copy(); 1305 dst.profile = profile == null ? null : profile.copy(); 1306 return dst; 1307 } 1308 1309 @Override 1310 public boolean equalsDeep(Base other) { 1311 if (!super.equalsDeep(other)) 1312 return false; 1313 if (!(other instanceof TestScriptDestinationComponent)) 1314 return false; 1315 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; 1316 return compareDeep(index, o.index, true) && compareDeep(profile, o.profile, true); 1317 } 1318 1319 @Override 1320 public boolean equalsShallow(Base other) { 1321 if (!super.equalsShallow(other)) 1322 return false; 1323 if (!(other instanceof TestScriptDestinationComponent)) 1324 return false; 1325 TestScriptDestinationComponent o = (TestScriptDestinationComponent) other; 1326 return compareValues(index, o.index, true); 1327 } 1328 1329 public boolean isEmpty() { 1330 return super.isEmpty() && (index == null || index.isEmpty()) && (profile == null || profile.isEmpty()) 1331 ; 1332 } 1333 1334 public String fhirType() { 1335 return "TestScript.destination"; 1336 1337 } 1338 1339 } 1340 1341 @Block() 1342 public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement { 1343 /** 1344 * A link to the FHIR specification that this test is covering. 1345 */ 1346 @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1347 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." ) 1348 protected List<TestScriptMetadataLinkComponent> link; 1349 1350 /** 1351 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 1352 */ 1353 @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1354 @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." ) 1355 protected List<TestScriptMetadataCapabilityComponent> capability; 1356 1357 private static final long serialVersionUID = 745183328L; 1358 1359 /** 1360 * Constructor 1361 */ 1362 public TestScriptMetadataComponent() { 1363 super(); 1364 } 1365 1366 /** 1367 * @return {@link #link} (A link to the FHIR specification that this test is covering.) 1368 */ 1369 public List<TestScriptMetadataLinkComponent> getLink() { 1370 if (this.link == null) 1371 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1372 return this.link; 1373 } 1374 1375 public boolean hasLink() { 1376 if (this.link == null) 1377 return false; 1378 for (TestScriptMetadataLinkComponent item : this.link) 1379 if (!item.isEmpty()) 1380 return true; 1381 return false; 1382 } 1383 1384 /** 1385 * @return {@link #link} (A link to the FHIR specification that this test is covering.) 1386 */ 1387 // syntactic sugar 1388 public TestScriptMetadataLinkComponent addLink() { //3 1389 TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent(); 1390 if (this.link == null) 1391 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1392 this.link.add(t); 1393 return t; 1394 } 1395 1396 // syntactic sugar 1397 public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3 1398 if (t == null) 1399 return this; 1400 if (this.link == null) 1401 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1402 this.link.add(t); 1403 return this; 1404 } 1405 1406 /** 1407 * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 1408 */ 1409 public List<TestScriptMetadataCapabilityComponent> getCapability() { 1410 if (this.capability == null) 1411 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1412 return this.capability; 1413 } 1414 1415 public boolean hasCapability() { 1416 if (this.capability == null) 1417 return false; 1418 for (TestScriptMetadataCapabilityComponent item : this.capability) 1419 if (!item.isEmpty()) 1420 return true; 1421 return false; 1422 } 1423 1424 /** 1425 * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 1426 */ 1427 // syntactic sugar 1428 public TestScriptMetadataCapabilityComponent addCapability() { //3 1429 TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent(); 1430 if (this.capability == null) 1431 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1432 this.capability.add(t); 1433 return t; 1434 } 1435 1436 // syntactic sugar 1437 public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3 1438 if (t == null) 1439 return this; 1440 if (this.capability == null) 1441 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1442 this.capability.add(t); 1443 return this; 1444 } 1445 1446 protected void listChildren(List<Property> childrenList) { 1447 super.listChildren(childrenList); 1448 childrenList.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link)); 1449 childrenList.add(new Property("capability", "", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, capability)); 1450 } 1451 1452 @Override 1453 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1454 switch (hash) { 1455 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // TestScriptMetadataLinkComponent 1456 case -783669992: /*capability*/ return this.capability == null ? new Base[0] : this.capability.toArray(new Base[this.capability.size()]); // TestScriptMetadataCapabilityComponent 1457 default: return super.getProperty(hash, name, checkValid); 1458 } 1459 1460 } 1461 1462 @Override 1463 public void setProperty(int hash, String name, Base value) throws FHIRException { 1464 switch (hash) { 1465 case 3321850: // link 1466 this.getLink().add((TestScriptMetadataLinkComponent) value); // TestScriptMetadataLinkComponent 1467 break; 1468 case -783669992: // capability 1469 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); // TestScriptMetadataCapabilityComponent 1470 break; 1471 default: super.setProperty(hash, name, value); 1472 } 1473 1474 } 1475 1476 @Override 1477 public void setProperty(String name, Base value) throws FHIRException { 1478 if (name.equals("link")) 1479 this.getLink().add((TestScriptMetadataLinkComponent) value); 1480 else if (name.equals("capability")) 1481 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); 1482 else 1483 super.setProperty(name, value); 1484 } 1485 1486 @Override 1487 public Base makeProperty(int hash, String name) throws FHIRException { 1488 switch (hash) { 1489 case 3321850: return addLink(); // TestScriptMetadataLinkComponent 1490 case -783669992: return addCapability(); // TestScriptMetadataCapabilityComponent 1491 default: return super.makeProperty(hash, name); 1492 } 1493 1494 } 1495 1496 @Override 1497 public Base addChild(String name) throws FHIRException { 1498 if (name.equals("link")) { 1499 return addLink(); 1500 } 1501 else if (name.equals("capability")) { 1502 return addCapability(); 1503 } 1504 else 1505 return super.addChild(name); 1506 } 1507 1508 public TestScriptMetadataComponent copy() { 1509 TestScriptMetadataComponent dst = new TestScriptMetadataComponent(); 1510 copyValues(dst); 1511 if (link != null) { 1512 dst.link = new ArrayList<TestScriptMetadataLinkComponent>(); 1513 for (TestScriptMetadataLinkComponent i : link) 1514 dst.link.add(i.copy()); 1515 }; 1516 if (capability != null) { 1517 dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1518 for (TestScriptMetadataCapabilityComponent i : capability) 1519 dst.capability.add(i.copy()); 1520 }; 1521 return dst; 1522 } 1523 1524 @Override 1525 public boolean equalsDeep(Base other) { 1526 if (!super.equalsDeep(other)) 1527 return false; 1528 if (!(other instanceof TestScriptMetadataComponent)) 1529 return false; 1530 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other; 1531 return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true); 1532 } 1533 1534 @Override 1535 public boolean equalsShallow(Base other) { 1536 if (!super.equalsShallow(other)) 1537 return false; 1538 if (!(other instanceof TestScriptMetadataComponent)) 1539 return false; 1540 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other; 1541 return true; 1542 } 1543 1544 public boolean isEmpty() { 1545 return super.isEmpty() && (link == null || link.isEmpty()) && (capability == null || capability.isEmpty()) 1546 ; 1547 } 1548 1549 public String fhirType() { 1550 return "TestScript.metadata"; 1551 1552 } 1553 1554 } 1555 1556 @Block() 1557 public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement { 1558 /** 1559 * URL to a particular requirement or feature within the FHIR specification. 1560 */ 1561 @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1562 @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." ) 1563 protected UriType url; 1564 1565 /** 1566 * Short description of the link. 1567 */ 1568 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1569 @Description(shortDefinition="Short description", formalDefinition="Short description of the link." ) 1570 protected StringType description; 1571 1572 private static final long serialVersionUID = 213372298L; 1573 1574 /** 1575 * Constructor 1576 */ 1577 public TestScriptMetadataLinkComponent() { 1578 super(); 1579 } 1580 1581 /** 1582 * Constructor 1583 */ 1584 public TestScriptMetadataLinkComponent(UriType url) { 1585 super(); 1586 this.url = url; 1587 } 1588 1589 /** 1590 * @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 1591 */ 1592 public UriType getUrlElement() { 1593 if (this.url == null) 1594 if (Configuration.errorOnAutoCreate()) 1595 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url"); 1596 else if (Configuration.doAutoCreate()) 1597 this.url = new UriType(); // bb 1598 return this.url; 1599 } 1600 1601 public boolean hasUrlElement() { 1602 return this.url != null && !this.url.isEmpty(); 1603 } 1604 1605 public boolean hasUrl() { 1606 return this.url != null && !this.url.isEmpty(); 1607 } 1608 1609 /** 1610 * @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 1611 */ 1612 public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 1613 this.url = value; 1614 return this; 1615 } 1616 1617 /** 1618 * @return URL to a particular requirement or feature within the FHIR specification. 1619 */ 1620 public String getUrl() { 1621 return this.url == null ? null : this.url.getValue(); 1622 } 1623 1624 /** 1625 * @param value URL to a particular requirement or feature within the FHIR specification. 1626 */ 1627 public TestScriptMetadataLinkComponent setUrl(String value) { 1628 if (this.url == null) 1629 this.url = new UriType(); 1630 this.url.setValue(value); 1631 return this; 1632 } 1633 1634 /** 1635 * @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 1636 */ 1637 public StringType getDescriptionElement() { 1638 if (this.description == null) 1639 if (Configuration.errorOnAutoCreate()) 1640 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description"); 1641 else if (Configuration.doAutoCreate()) 1642 this.description = new StringType(); // bb 1643 return this.description; 1644 } 1645 1646 public boolean hasDescriptionElement() { 1647 return this.description != null && !this.description.isEmpty(); 1648 } 1649 1650 public boolean hasDescription() { 1651 return this.description != null && !this.description.isEmpty(); 1652 } 1653 1654 /** 1655 * @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 1656 */ 1657 public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 1658 this.description = value; 1659 return this; 1660 } 1661 1662 /** 1663 * @return Short description of the link. 1664 */ 1665 public String getDescription() { 1666 return this.description == null ? null : this.description.getValue(); 1667 } 1668 1669 /** 1670 * @param value Short description of the link. 1671 */ 1672 public TestScriptMetadataLinkComponent setDescription(String value) { 1673 if (Utilities.noString(value)) 1674 this.description = null; 1675 else { 1676 if (this.description == null) 1677 this.description = new StringType(); 1678 this.description.setValue(value); 1679 } 1680 return this; 1681 } 1682 1683 protected void listChildren(List<Property> childrenList) { 1684 super.listChildren(childrenList); 1685 childrenList.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, java.lang.Integer.MAX_VALUE, url)); 1686 childrenList.add(new Property("description", "string", "Short description of the link.", 0, java.lang.Integer.MAX_VALUE, description)); 1687 } 1688 1689 @Override 1690 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1691 switch (hash) { 1692 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 1693 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1694 default: return super.getProperty(hash, name, checkValid); 1695 } 1696 1697 } 1698 1699 @Override 1700 public void setProperty(int hash, String name, Base value) throws FHIRException { 1701 switch (hash) { 1702 case 116079: // url 1703 this.url = castToUri(value); // UriType 1704 break; 1705 case -1724546052: // description 1706 this.description = castToString(value); // StringType 1707 break; 1708 default: super.setProperty(hash, name, value); 1709 } 1710 1711 } 1712 1713 @Override 1714 public void setProperty(String name, Base value) throws FHIRException { 1715 if (name.equals("url")) 1716 this.url = castToUri(value); // UriType 1717 else if (name.equals("description")) 1718 this.description = castToString(value); // StringType 1719 else 1720 super.setProperty(name, value); 1721 } 1722 1723 @Override 1724 public Base makeProperty(int hash, String name) throws FHIRException { 1725 switch (hash) { 1726 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 1727 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 1728 default: return super.makeProperty(hash, name); 1729 } 1730 1731 } 1732 1733 @Override 1734 public Base addChild(String name) throws FHIRException { 1735 if (name.equals("url")) { 1736 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 1737 } 1738 else if (name.equals("description")) { 1739 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 1740 } 1741 else 1742 return super.addChild(name); 1743 } 1744 1745 public TestScriptMetadataLinkComponent copy() { 1746 TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent(); 1747 copyValues(dst); 1748 dst.url = url == null ? null : url.copy(); 1749 dst.description = description == null ? null : description.copy(); 1750 return dst; 1751 } 1752 1753 @Override 1754 public boolean equalsDeep(Base other) { 1755 if (!super.equalsDeep(other)) 1756 return false; 1757 if (!(other instanceof TestScriptMetadataLinkComponent)) 1758 return false; 1759 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other; 1760 return compareDeep(url, o.url, true) && compareDeep(description, o.description, true); 1761 } 1762 1763 @Override 1764 public boolean equalsShallow(Base other) { 1765 if (!super.equalsShallow(other)) 1766 return false; 1767 if (!(other instanceof TestScriptMetadataLinkComponent)) 1768 return false; 1769 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other; 1770 return compareValues(url, o.url, true) && compareValues(description, o.description, true); 1771 } 1772 1773 public boolean isEmpty() { 1774 return super.isEmpty() && (url == null || url.isEmpty()) && (description == null || description.isEmpty()) 1775 ; 1776 } 1777 1778 public String fhirType() { 1779 return "TestScript.metadata.link"; 1780 1781 } 1782 1783 } 1784 1785 @Block() 1786 public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement { 1787 /** 1788 * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1789 */ 1790 @Child(name = "required", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1791 @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." ) 1792 protected BooleanType required; 1793 1794 /** 1795 * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1796 */ 1797 @Child(name = "validated", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1798 @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." ) 1799 protected BooleanType validated; 1800 1801 /** 1802 * Description of the capabilities that this test script is requiring the server to support. 1803 */ 1804 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1805 @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." ) 1806 protected StringType description; 1807 1808 /** 1809 * Which origin server these requirements apply to. 1810 */ 1811 @Child(name = "origin", type = {IntegerType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1812 @Description(shortDefinition="Which origin server these requirements apply to", formalDefinition="Which origin server these requirements apply to." ) 1813 protected List<IntegerType> origin; 1814 1815 /** 1816 * Which server these requirements apply to. 1817 */ 1818 @Child(name = "destination", type = {IntegerType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1819 @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." ) 1820 protected IntegerType destination; 1821 1822 /** 1823 * Links to the FHIR specification that describes this interaction and the resources involved in more detail. 1824 */ 1825 @Child(name = "link", type = {UriType.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1826 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." ) 1827 protected List<UriType> link; 1828 1829 /** 1830 * Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped. 1831 */ 1832 @Child(name = "conformance", type = {Conformance.class}, order=7, min=1, max=1, modifier=false, summary=false) 1833 @Description(shortDefinition="Required Conformance", formalDefinition="Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped." ) 1834 protected Reference conformance; 1835 1836 /** 1837 * The actual object that is the target of the reference (Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) 1838 */ 1839 protected Conformance conformanceTarget; 1840 1841 private static final long serialVersionUID = 500671983L; 1842 1843 /** 1844 * Constructor 1845 */ 1846 public TestScriptMetadataCapabilityComponent() { 1847 super(); 1848 } 1849 1850 /** 1851 * Constructor 1852 */ 1853 public TestScriptMetadataCapabilityComponent(Reference conformance) { 1854 super(); 1855 this.conformance = conformance; 1856 } 1857 1858 /** 1859 * @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 1860 */ 1861 public BooleanType getRequiredElement() { 1862 if (this.required == null) 1863 if (Configuration.errorOnAutoCreate()) 1864 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required"); 1865 else if (Configuration.doAutoCreate()) 1866 this.required = new BooleanType(); // bb 1867 return this.required; 1868 } 1869 1870 public boolean hasRequiredElement() { 1871 return this.required != null && !this.required.isEmpty(); 1872 } 1873 1874 public boolean hasRequired() { 1875 return this.required != null && !this.required.isEmpty(); 1876 } 1877 1878 /** 1879 * @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 1880 */ 1881 public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 1882 this.required = value; 1883 return this; 1884 } 1885 1886 /** 1887 * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1888 */ 1889 public boolean getRequired() { 1890 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 1891 } 1892 1893 /** 1894 * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1895 */ 1896 public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 1897 if (this.required == null) 1898 this.required = new BooleanType(); 1899 this.required.setValue(value); 1900 return this; 1901 } 1902 1903 /** 1904 * @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 1905 */ 1906 public BooleanType getValidatedElement() { 1907 if (this.validated == null) 1908 if (Configuration.errorOnAutoCreate()) 1909 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated"); 1910 else if (Configuration.doAutoCreate()) 1911 this.validated = new BooleanType(); // bb 1912 return this.validated; 1913 } 1914 1915 public boolean hasValidatedElement() { 1916 return this.validated != null && !this.validated.isEmpty(); 1917 } 1918 1919 public boolean hasValidated() { 1920 return this.validated != null && !this.validated.isEmpty(); 1921 } 1922 1923 /** 1924 * @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 1925 */ 1926 public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 1927 this.validated = value; 1928 return this; 1929 } 1930 1931 /** 1932 * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1933 */ 1934 public boolean getValidated() { 1935 return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue(); 1936 } 1937 1938 /** 1939 * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1940 */ 1941 public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 1942 if (this.validated == null) 1943 this.validated = new BooleanType(); 1944 this.validated.setValue(value); 1945 return this; 1946 } 1947 1948 /** 1949 * @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 1950 */ 1951 public StringType getDescriptionElement() { 1952 if (this.description == null) 1953 if (Configuration.errorOnAutoCreate()) 1954 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description"); 1955 else if (Configuration.doAutoCreate()) 1956 this.description = new StringType(); // bb 1957 return this.description; 1958 } 1959 1960 public boolean hasDescriptionElement() { 1961 return this.description != null && !this.description.isEmpty(); 1962 } 1963 1964 public boolean hasDescription() { 1965 return this.description != null && !this.description.isEmpty(); 1966 } 1967 1968 /** 1969 * @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 1970 */ 1971 public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 1972 this.description = value; 1973 return this; 1974 } 1975 1976 /** 1977 * @return Description of the capabilities that this test script is requiring the server to support. 1978 */ 1979 public String getDescription() { 1980 return this.description == null ? null : this.description.getValue(); 1981 } 1982 1983 /** 1984 * @param value Description of the capabilities that this test script is requiring the server to support. 1985 */ 1986 public TestScriptMetadataCapabilityComponent setDescription(String value) { 1987 if (Utilities.noString(value)) 1988 this.description = null; 1989 else { 1990 if (this.description == null) 1991 this.description = new StringType(); 1992 this.description.setValue(value); 1993 } 1994 return this; 1995 } 1996 1997 /** 1998 * @return {@link #origin} (Which origin server these requirements apply to.) 1999 */ 2000 public List<IntegerType> getOrigin() { 2001 if (this.origin == null) 2002 this.origin = new ArrayList<IntegerType>(); 2003 return this.origin; 2004 } 2005 2006 public boolean hasOrigin() { 2007 if (this.origin == null) 2008 return false; 2009 for (IntegerType item : this.origin) 2010 if (!item.isEmpty()) 2011 return true; 2012 return false; 2013 } 2014 2015 /** 2016 * @return {@link #origin} (Which origin server these requirements apply to.) 2017 */ 2018 // syntactic sugar 2019 public IntegerType addOriginElement() {//2 2020 IntegerType t = new IntegerType(); 2021 if (this.origin == null) 2022 this.origin = new ArrayList<IntegerType>(); 2023 this.origin.add(t); 2024 return t; 2025 } 2026 2027 /** 2028 * @param value {@link #origin} (Which origin server these requirements apply to.) 2029 */ 2030 public TestScriptMetadataCapabilityComponent addOrigin(int value) { //1 2031 IntegerType t = new IntegerType(); 2032 t.setValue(value); 2033 if (this.origin == null) 2034 this.origin = new ArrayList<IntegerType>(); 2035 this.origin.add(t); 2036 return this; 2037 } 2038 2039 /** 2040 * @param value {@link #origin} (Which origin server these requirements apply to.) 2041 */ 2042 public boolean hasOrigin(int value) { 2043 if (this.origin == null) 2044 return false; 2045 for (IntegerType v : this.origin) 2046 if (v.equals(value)) // integer 2047 return true; 2048 return false; 2049 } 2050 2051 /** 2052 * @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 2053 */ 2054 public IntegerType getDestinationElement() { 2055 if (this.destination == null) 2056 if (Configuration.errorOnAutoCreate()) 2057 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination"); 2058 else if (Configuration.doAutoCreate()) 2059 this.destination = new IntegerType(); // bb 2060 return this.destination; 2061 } 2062 2063 public boolean hasDestinationElement() { 2064 return this.destination != null && !this.destination.isEmpty(); 2065 } 2066 2067 public boolean hasDestination() { 2068 return this.destination != null && !this.destination.isEmpty(); 2069 } 2070 2071 /** 2072 * @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 2073 */ 2074 public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 2075 this.destination = value; 2076 return this; 2077 } 2078 2079 /** 2080 * @return Which server these requirements apply to. 2081 */ 2082 public int getDestination() { 2083 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 2084 } 2085 2086 /** 2087 * @param value Which server these requirements apply to. 2088 */ 2089 public TestScriptMetadataCapabilityComponent setDestination(int value) { 2090 if (this.destination == null) 2091 this.destination = new IntegerType(); 2092 this.destination.setValue(value); 2093 return this; 2094 } 2095 2096 /** 2097 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2098 */ 2099 public List<UriType> getLink() { 2100 if (this.link == null) 2101 this.link = new ArrayList<UriType>(); 2102 return this.link; 2103 } 2104 2105 public boolean hasLink() { 2106 if (this.link == null) 2107 return false; 2108 for (UriType item : this.link) 2109 if (!item.isEmpty()) 2110 return true; 2111 return false; 2112 } 2113 2114 /** 2115 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2116 */ 2117 // syntactic sugar 2118 public UriType addLinkElement() {//2 2119 UriType t = new UriType(); 2120 if (this.link == null) 2121 this.link = new ArrayList<UriType>(); 2122 this.link.add(t); 2123 return t; 2124 } 2125 2126 /** 2127 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2128 */ 2129 public TestScriptMetadataCapabilityComponent addLink(String value) { //1 2130 UriType t = new UriType(); 2131 t.setValue(value); 2132 if (this.link == null) 2133 this.link = new ArrayList<UriType>(); 2134 this.link.add(t); 2135 return this; 2136 } 2137 2138 /** 2139 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 2140 */ 2141 public boolean hasLink(String value) { 2142 if (this.link == null) 2143 return false; 2144 for (UriType v : this.link) 2145 if (v.equals(value)) // uri 2146 return true; 2147 return false; 2148 } 2149 2150 /** 2151 * @return {@link #conformance} (Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) 2152 */ 2153 public Reference getConformance() { 2154 if (this.conformance == null) 2155 if (Configuration.errorOnAutoCreate()) 2156 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.conformance"); 2157 else if (Configuration.doAutoCreate()) 2158 this.conformance = new Reference(); // cc 2159 return this.conformance; 2160 } 2161 2162 public boolean hasConformance() { 2163 return this.conformance != null && !this.conformance.isEmpty(); 2164 } 2165 2166 /** 2167 * @param value {@link #conformance} (Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) 2168 */ 2169 public TestScriptMetadataCapabilityComponent setConformance(Reference value) { 2170 this.conformance = value; 2171 return this; 2172 } 2173 2174 /** 2175 * @return {@link #conformance} 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 conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) 2176 */ 2177 public Conformance getConformanceTarget() { 2178 if (this.conformanceTarget == null) 2179 if (Configuration.errorOnAutoCreate()) 2180 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.conformance"); 2181 else if (Configuration.doAutoCreate()) 2182 this.conformanceTarget = new Conformance(); // aa 2183 return this.conformanceTarget; 2184 } 2185 2186 /** 2187 * @param value {@link #conformance} 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 conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.) 2188 */ 2189 public TestScriptMetadataCapabilityComponent setConformanceTarget(Conformance value) { 2190 this.conformanceTarget = value; 2191 return this; 2192 } 2193 2194 protected void listChildren(List<Property> childrenList) { 2195 super.listChildren(childrenList); 2196 childrenList.add(new Property("required", "boolean", "Whether or not the test execution will require the given capabilities of the server in order for this test script to execute.", 0, java.lang.Integer.MAX_VALUE, required)); 2197 childrenList.add(new Property("validated", "boolean", "Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute.", 0, java.lang.Integer.MAX_VALUE, validated)); 2198 childrenList.add(new Property("description", "string", "Description of the capabilities that this test script is requiring the server to support.", 0, java.lang.Integer.MAX_VALUE, description)); 2199 childrenList.add(new Property("origin", "integer", "Which origin server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, origin)); 2200 childrenList.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, destination)); 2201 childrenList.add(new Property("link", "uri", "Links to the FHIR specification that describes this interaction and the resources involved in more detail.", 0, java.lang.Integer.MAX_VALUE, link)); 2202 childrenList.add(new Property("conformance", "Reference(Conformance)", "Minimum conformance required of server for test script to execute successfully. If server does not meet at a minimum the reference conformance definition, then all tests in this script are skipped.", 0, java.lang.Integer.MAX_VALUE, conformance)); 2203 } 2204 2205 @Override 2206 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2207 switch (hash) { 2208 case -393139297: /*required*/ return this.required == null ? new Base[0] : new Base[] {this.required}; // BooleanType 2209 case -1109784050: /*validated*/ return this.validated == null ? new Base[0] : new Base[] {this.validated}; // BooleanType 2210 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 2211 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // IntegerType 2212 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 2213 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // UriType 2214 case 1374858133: /*conformance*/ return this.conformance == null ? new Base[0] : new Base[] {this.conformance}; // Reference 2215 default: return super.getProperty(hash, name, checkValid); 2216 } 2217 2218 } 2219 2220 @Override 2221 public void setProperty(int hash, String name, Base value) throws FHIRException { 2222 switch (hash) { 2223 case -393139297: // required 2224 this.required = castToBoolean(value); // BooleanType 2225 break; 2226 case -1109784050: // validated 2227 this.validated = castToBoolean(value); // BooleanType 2228 break; 2229 case -1724546052: // description 2230 this.description = castToString(value); // StringType 2231 break; 2232 case -1008619738: // origin 2233 this.getOrigin().add(castToInteger(value)); // IntegerType 2234 break; 2235 case -1429847026: // destination 2236 this.destination = castToInteger(value); // IntegerType 2237 break; 2238 case 3321850: // link 2239 this.getLink().add(castToUri(value)); // UriType 2240 break; 2241 case 1374858133: // conformance 2242 this.conformance = castToReference(value); // Reference 2243 break; 2244 default: super.setProperty(hash, name, value); 2245 } 2246 2247 } 2248 2249 @Override 2250 public void setProperty(String name, Base value) throws FHIRException { 2251 if (name.equals("required")) 2252 this.required = castToBoolean(value); // BooleanType 2253 else if (name.equals("validated")) 2254 this.validated = castToBoolean(value); // BooleanType 2255 else if (name.equals("description")) 2256 this.description = castToString(value); // StringType 2257 else if (name.equals("origin")) 2258 this.getOrigin().add(castToInteger(value)); 2259 else if (name.equals("destination")) 2260 this.destination = castToInteger(value); // IntegerType 2261 else if (name.equals("link")) 2262 this.getLink().add(castToUri(value)); 2263 else if (name.equals("conformance")) 2264 this.conformance = castToReference(value); // Reference 2265 else 2266 super.setProperty(name, value); 2267 } 2268 2269 @Override 2270 public Base makeProperty(int hash, String name) throws FHIRException { 2271 switch (hash) { 2272 case -393139297: throw new FHIRException("Cannot make property required as it is not a complex type"); // BooleanType 2273 case -1109784050: throw new FHIRException("Cannot make property validated as it is not a complex type"); // BooleanType 2274 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 2275 case -1008619738: throw new FHIRException("Cannot make property origin as it is not a complex type"); // IntegerType 2276 case -1429847026: throw new FHIRException("Cannot make property destination as it is not a complex type"); // IntegerType 2277 case 3321850: throw new FHIRException("Cannot make property link as it is not a complex type"); // UriType 2278 case 1374858133: return getConformance(); // Reference 2279 default: return super.makeProperty(hash, name); 2280 } 2281 2282 } 2283 2284 @Override 2285 public Base addChild(String name) throws FHIRException { 2286 if (name.equals("required")) { 2287 throw new FHIRException("Cannot call addChild on a primitive type TestScript.required"); 2288 } 2289 else if (name.equals("validated")) { 2290 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated"); 2291 } 2292 else if (name.equals("description")) { 2293 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 2294 } 2295 else if (name.equals("origin")) { 2296 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 2297 } 2298 else if (name.equals("destination")) { 2299 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 2300 } 2301 else if (name.equals("link")) { 2302 throw new FHIRException("Cannot call addChild on a primitive type TestScript.link"); 2303 } 2304 else if (name.equals("conformance")) { 2305 this.conformance = new Reference(); 2306 return this.conformance; 2307 } 2308 else 2309 return super.addChild(name); 2310 } 2311 2312 public TestScriptMetadataCapabilityComponent copy() { 2313 TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent(); 2314 copyValues(dst); 2315 dst.required = required == null ? null : required.copy(); 2316 dst.validated = validated == null ? null : validated.copy(); 2317 dst.description = description == null ? null : description.copy(); 2318 if (origin != null) { 2319 dst.origin = new ArrayList<IntegerType>(); 2320 for (IntegerType i : origin) 2321 dst.origin.add(i.copy()); 2322 }; 2323 dst.destination = destination == null ? null : destination.copy(); 2324 if (link != null) { 2325 dst.link = new ArrayList<UriType>(); 2326 for (UriType i : link) 2327 dst.link.add(i.copy()); 2328 }; 2329 dst.conformance = conformance == null ? null : conformance.copy(); 2330 return dst; 2331 } 2332 2333 @Override 2334 public boolean equalsDeep(Base other) { 2335 if (!super.equalsDeep(other)) 2336 return false; 2337 if (!(other instanceof TestScriptMetadataCapabilityComponent)) 2338 return false; 2339 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other; 2340 return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true) 2341 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true) 2342 && compareDeep(conformance, o.conformance, true); 2343 } 2344 2345 @Override 2346 public boolean equalsShallow(Base other) { 2347 if (!super.equalsShallow(other)) 2348 return false; 2349 if (!(other instanceof TestScriptMetadataCapabilityComponent)) 2350 return false; 2351 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other; 2352 return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true) 2353 && compareValues(origin, o.origin, true) && compareValues(destination, o.destination, true) && compareValues(link, o.link, true) 2354 ; 2355 } 2356 2357 public boolean isEmpty() { 2358 return super.isEmpty() && (required == null || required.isEmpty()) && (validated == null || validated.isEmpty()) 2359 && (description == null || description.isEmpty()) && (origin == null || origin.isEmpty()) 2360 && (destination == null || destination.isEmpty()) && (link == null || link.isEmpty()) && (conformance == null || conformance.isEmpty()) 2361 ; 2362 } 2363 2364 public String fhirType() { 2365 return "TestScript.metadata.capability"; 2366 2367 } 2368 2369 } 2370 2371 @Block() 2372 public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement { 2373 /** 2374 * 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. 2375 */ 2376 @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 2377 @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." ) 2378 protected BooleanType autocreate; 2379 2380 /** 2381 * 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. 2382 */ 2383 @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2384 @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." ) 2385 protected BooleanType autodelete; 2386 2387 /** 2388 * Reference to the resource (containing the contents of the resource needed for operations). 2389 */ 2390 @Child(name = "resource", type = {}, order=3, min=0, max=1, modifier=false, summary=false) 2391 @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." ) 2392 protected Reference resource; 2393 2394 /** 2395 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).) 2396 */ 2397 protected Resource resourceTarget; 2398 2399 private static final long serialVersionUID = 1110683307L; 2400 2401 /** 2402 * Constructor 2403 */ 2404 public TestScriptFixtureComponent() { 2405 super(); 2406 } 2407 2408 /** 2409 * @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 2410 */ 2411 public BooleanType getAutocreateElement() { 2412 if (this.autocreate == null) 2413 if (Configuration.errorOnAutoCreate()) 2414 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate"); 2415 else if (Configuration.doAutoCreate()) 2416 this.autocreate = new BooleanType(); // bb 2417 return this.autocreate; 2418 } 2419 2420 public boolean hasAutocreateElement() { 2421 return this.autocreate != null && !this.autocreate.isEmpty(); 2422 } 2423 2424 public boolean hasAutocreate() { 2425 return this.autocreate != null && !this.autocreate.isEmpty(); 2426 } 2427 2428 /** 2429 * @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 2430 */ 2431 public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 2432 this.autocreate = value; 2433 return this; 2434 } 2435 2436 /** 2437 * @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. 2438 */ 2439 public boolean getAutocreate() { 2440 return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue(); 2441 } 2442 2443 /** 2444 * @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. 2445 */ 2446 public TestScriptFixtureComponent setAutocreate(boolean value) { 2447 if (this.autocreate == null) 2448 this.autocreate = new BooleanType(); 2449 this.autocreate.setValue(value); 2450 return this; 2451 } 2452 2453 /** 2454 * @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 2455 */ 2456 public BooleanType getAutodeleteElement() { 2457 if (this.autodelete == null) 2458 if (Configuration.errorOnAutoCreate()) 2459 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete"); 2460 else if (Configuration.doAutoCreate()) 2461 this.autodelete = new BooleanType(); // bb 2462 return this.autodelete; 2463 } 2464 2465 public boolean hasAutodeleteElement() { 2466 return this.autodelete != null && !this.autodelete.isEmpty(); 2467 } 2468 2469 public boolean hasAutodelete() { 2470 return this.autodelete != null && !this.autodelete.isEmpty(); 2471 } 2472 2473 /** 2474 * @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 2475 */ 2476 public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 2477 this.autodelete = value; 2478 return this; 2479 } 2480 2481 /** 2482 * @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. 2483 */ 2484 public boolean getAutodelete() { 2485 return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue(); 2486 } 2487 2488 /** 2489 * @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. 2490 */ 2491 public TestScriptFixtureComponent setAutodelete(boolean value) { 2492 if (this.autodelete == null) 2493 this.autodelete = new BooleanType(); 2494 this.autodelete.setValue(value); 2495 return this; 2496 } 2497 2498 /** 2499 * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2500 */ 2501 public Reference getResource() { 2502 if (this.resource == null) 2503 if (Configuration.errorOnAutoCreate()) 2504 throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource"); 2505 else if (Configuration.doAutoCreate()) 2506 this.resource = new Reference(); // cc 2507 return this.resource; 2508 } 2509 2510 public boolean hasResource() { 2511 return this.resource != null && !this.resource.isEmpty(); 2512 } 2513 2514 /** 2515 * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 2516 */ 2517 public TestScriptFixtureComponent setResource(Reference value) { 2518 this.resource = value; 2519 return this; 2520 } 2521 2522 /** 2523 * @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).) 2524 */ 2525 public Resource getResourceTarget() { 2526 return this.resourceTarget; 2527 } 2528 2529 /** 2530 * @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).) 2531 */ 2532 public TestScriptFixtureComponent setResourceTarget(Resource value) { 2533 this.resourceTarget = value; 2534 return this; 2535 } 2536 2537 protected void listChildren(List<Property> childrenList) { 2538 super.listChildren(childrenList); 2539 childrenList.add(new Property("autocreate", "boolean", "Whether or not to implicitly create the fixture during setup. If true, the fixture is automatically created on each server being tested during setup, therefore no create operation is required for this fixture in the TestScript.setup section.", 0, java.lang.Integer.MAX_VALUE, autocreate)); 2540 childrenList.add(new Property("autodelete", "boolean", "Whether or not to implicitly delete the fixture during teardown If true, the fixture is automatically deleted on each server being tested during teardown, therefore no delete operation is required for this fixture in the TestScript.teardown section.", 0, java.lang.Integer.MAX_VALUE, autodelete)); 2541 childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the resource needed for operations).", 0, java.lang.Integer.MAX_VALUE, resource)); 2542 } 2543 2544 @Override 2545 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2546 switch (hash) { 2547 case 73154411: /*autocreate*/ return this.autocreate == null ? new Base[0] : new Base[] {this.autocreate}; // BooleanType 2548 case 89990170: /*autodelete*/ return this.autodelete == null ? new Base[0] : new Base[] {this.autodelete}; // BooleanType 2549 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 2550 default: return super.getProperty(hash, name, checkValid); 2551 } 2552 2553 } 2554 2555 @Override 2556 public void setProperty(int hash, String name, Base value) throws FHIRException { 2557 switch (hash) { 2558 case 73154411: // autocreate 2559 this.autocreate = castToBoolean(value); // BooleanType 2560 break; 2561 case 89990170: // autodelete 2562 this.autodelete = castToBoolean(value); // BooleanType 2563 break; 2564 case -341064690: // resource 2565 this.resource = castToReference(value); // Reference 2566 break; 2567 default: super.setProperty(hash, name, value); 2568 } 2569 2570 } 2571 2572 @Override 2573 public void setProperty(String name, Base value) throws FHIRException { 2574 if (name.equals("autocreate")) 2575 this.autocreate = castToBoolean(value); // BooleanType 2576 else if (name.equals("autodelete")) 2577 this.autodelete = castToBoolean(value); // BooleanType 2578 else if (name.equals("resource")) 2579 this.resource = castToReference(value); // Reference 2580 else 2581 super.setProperty(name, value); 2582 } 2583 2584 @Override 2585 public Base makeProperty(int hash, String name) throws FHIRException { 2586 switch (hash) { 2587 case 73154411: throw new FHIRException("Cannot make property autocreate as it is not a complex type"); // BooleanType 2588 case 89990170: throw new FHIRException("Cannot make property autodelete as it is not a complex type"); // BooleanType 2589 case -341064690: return getResource(); // Reference 2590 default: return super.makeProperty(hash, name); 2591 } 2592 2593 } 2594 2595 @Override 2596 public Base addChild(String name) throws FHIRException { 2597 if (name.equals("autocreate")) { 2598 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate"); 2599 } 2600 else if (name.equals("autodelete")) { 2601 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete"); 2602 } 2603 else if (name.equals("resource")) { 2604 this.resource = new Reference(); 2605 return this.resource; 2606 } 2607 else 2608 return super.addChild(name); 2609 } 2610 2611 public TestScriptFixtureComponent copy() { 2612 TestScriptFixtureComponent dst = new TestScriptFixtureComponent(); 2613 copyValues(dst); 2614 dst.autocreate = autocreate == null ? null : autocreate.copy(); 2615 dst.autodelete = autodelete == null ? null : autodelete.copy(); 2616 dst.resource = resource == null ? null : resource.copy(); 2617 return dst; 2618 } 2619 2620 @Override 2621 public boolean equalsDeep(Base other) { 2622 if (!super.equalsDeep(other)) 2623 return false; 2624 if (!(other instanceof TestScriptFixtureComponent)) 2625 return false; 2626 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other; 2627 return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true) 2628 && compareDeep(resource, o.resource, true); 2629 } 2630 2631 @Override 2632 public boolean equalsShallow(Base other) { 2633 if (!super.equalsShallow(other)) 2634 return false; 2635 if (!(other instanceof TestScriptFixtureComponent)) 2636 return false; 2637 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other; 2638 return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true) 2639 ; 2640 } 2641 2642 public boolean isEmpty() { 2643 return super.isEmpty() && (autocreate == null || autocreate.isEmpty()) && (autodelete == null || autodelete.isEmpty()) 2644 && (resource == null || resource.isEmpty()); 2645 } 2646 2647 public String fhirType() { 2648 return "TestScript.fixture"; 2649 2650 } 2651 2652 } 2653 2654 @Block() 2655 public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement { 2656 /** 2657 * Descriptive name for this variable. 2658 */ 2659 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2660 @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." ) 2661 protected StringType name; 2662 2663 /** 2664 * A default, hard-coded, or user-defined value for this variable. 2665 */ 2666 @Child(name = "defaultValue", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2667 @Description(shortDefinition="Default, hard-coded, or user-defined value for this variable", formalDefinition="A default, hard-coded, or user-defined value for this variable." ) 2668 protected StringType defaultValue; 2669 2670 /** 2671 * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2672 */ 2673 @Child(name = "headerField", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2674 @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." ) 2675 protected StringType headerField; 2676 2677 /** 2678 * XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. 2679 */ 2680 @Child(name = "path", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 2681 @Description(shortDefinition="XPath or JSONPath against the fixture body", formalDefinition="XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both." ) 2682 protected StringType path; 2683 2684 /** 2685 * Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2686 */ 2687 @Child(name = "sourceId", type = {IdType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2688 @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." ) 2689 protected IdType sourceId; 2690 2691 private static final long serialVersionUID = 1821729272L; 2692 2693 /** 2694 * Constructor 2695 */ 2696 public TestScriptVariableComponent() { 2697 super(); 2698 } 2699 2700 /** 2701 * Constructor 2702 */ 2703 public TestScriptVariableComponent(StringType name) { 2704 super(); 2705 this.name = name; 2706 } 2707 2708 /** 2709 * @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 2710 */ 2711 public StringType getNameElement() { 2712 if (this.name == null) 2713 if (Configuration.errorOnAutoCreate()) 2714 throw new Error("Attempt to auto-create TestScriptVariableComponent.name"); 2715 else if (Configuration.doAutoCreate()) 2716 this.name = new StringType(); // bb 2717 return this.name; 2718 } 2719 2720 public boolean hasNameElement() { 2721 return this.name != null && !this.name.isEmpty(); 2722 } 2723 2724 public boolean hasName() { 2725 return this.name != null && !this.name.isEmpty(); 2726 } 2727 2728 /** 2729 * @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 2730 */ 2731 public TestScriptVariableComponent setNameElement(StringType value) { 2732 this.name = value; 2733 return this; 2734 } 2735 2736 /** 2737 * @return Descriptive name for this variable. 2738 */ 2739 public String getName() { 2740 return this.name == null ? null : this.name.getValue(); 2741 } 2742 2743 /** 2744 * @param value Descriptive name for this variable. 2745 */ 2746 public TestScriptVariableComponent setName(String value) { 2747 if (this.name == null) 2748 this.name = new StringType(); 2749 this.name.setValue(value); 2750 return this; 2751 } 2752 2753 /** 2754 * @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 2755 */ 2756 public StringType getDefaultValueElement() { 2757 if (this.defaultValue == null) 2758 if (Configuration.errorOnAutoCreate()) 2759 throw new Error("Attempt to auto-create TestScriptVariableComponent.defaultValue"); 2760 else if (Configuration.doAutoCreate()) 2761 this.defaultValue = new StringType(); // bb 2762 return this.defaultValue; 2763 } 2764 2765 public boolean hasDefaultValueElement() { 2766 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2767 } 2768 2769 public boolean hasDefaultValue() { 2770 return this.defaultValue != null && !this.defaultValue.isEmpty(); 2771 } 2772 2773 /** 2774 * @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 2775 */ 2776 public TestScriptVariableComponent setDefaultValueElement(StringType value) { 2777 this.defaultValue = value; 2778 return this; 2779 } 2780 2781 /** 2782 * @return A default, hard-coded, or user-defined value for this variable. 2783 */ 2784 public String getDefaultValue() { 2785 return this.defaultValue == null ? null : this.defaultValue.getValue(); 2786 } 2787 2788 /** 2789 * @param value A default, hard-coded, or user-defined value for this variable. 2790 */ 2791 public TestScriptVariableComponent setDefaultValue(String value) { 2792 if (Utilities.noString(value)) 2793 this.defaultValue = null; 2794 else { 2795 if (this.defaultValue == null) 2796 this.defaultValue = new StringType(); 2797 this.defaultValue.setValue(value); 2798 } 2799 return this; 2800 } 2801 2802 /** 2803 * @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 2804 */ 2805 public StringType getHeaderFieldElement() { 2806 if (this.headerField == null) 2807 if (Configuration.errorOnAutoCreate()) 2808 throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField"); 2809 else if (Configuration.doAutoCreate()) 2810 this.headerField = new StringType(); // bb 2811 return this.headerField; 2812 } 2813 2814 public boolean hasHeaderFieldElement() { 2815 return this.headerField != null && !this.headerField.isEmpty(); 2816 } 2817 2818 public boolean hasHeaderField() { 2819 return this.headerField != null && !this.headerField.isEmpty(); 2820 } 2821 2822 /** 2823 * @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 2824 */ 2825 public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 2826 this.headerField = value; 2827 return this; 2828 } 2829 2830 /** 2831 * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2832 */ 2833 public String getHeaderField() { 2834 return this.headerField == null ? null : this.headerField.getValue(); 2835 } 2836 2837 /** 2838 * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2839 */ 2840 public TestScriptVariableComponent setHeaderField(String value) { 2841 if (Utilities.noString(value)) 2842 this.headerField = null; 2843 else { 2844 if (this.headerField == null) 2845 this.headerField = new StringType(); 2846 this.headerField.setValue(value); 2847 } 2848 return this; 2849 } 2850 2851 /** 2852 * @return {@link #path} (XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 2853 */ 2854 public StringType getPathElement() { 2855 if (this.path == null) 2856 if (Configuration.errorOnAutoCreate()) 2857 throw new Error("Attempt to auto-create TestScriptVariableComponent.path"); 2858 else if (Configuration.doAutoCreate()) 2859 this.path = new StringType(); // bb 2860 return this.path; 2861 } 2862 2863 public boolean hasPathElement() { 2864 return this.path != null && !this.path.isEmpty(); 2865 } 2866 2867 public boolean hasPath() { 2868 return this.path != null && !this.path.isEmpty(); 2869 } 2870 2871 /** 2872 * @param value {@link #path} (XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value 2873 */ 2874 public TestScriptVariableComponent setPathElement(StringType value) { 2875 this.path = value; 2876 return this; 2877 } 2878 2879 /** 2880 * @return XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. 2881 */ 2882 public String getPath() { 2883 return this.path == null ? null : this.path.getValue(); 2884 } 2885 2886 /** 2887 * @param value XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. 2888 */ 2889 public TestScriptVariableComponent setPath(String value) { 2890 if (Utilities.noString(value)) 2891 this.path = null; 2892 else { 2893 if (this.path == null) 2894 this.path = new StringType(); 2895 this.path.setValue(value); 2896 } 2897 return this; 2898 } 2899 2900 /** 2901 * @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 2902 */ 2903 public IdType getSourceIdElement() { 2904 if (this.sourceId == null) 2905 if (Configuration.errorOnAutoCreate()) 2906 throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId"); 2907 else if (Configuration.doAutoCreate()) 2908 this.sourceId = new IdType(); // bb 2909 return this.sourceId; 2910 } 2911 2912 public boolean hasSourceIdElement() { 2913 return this.sourceId != null && !this.sourceId.isEmpty(); 2914 } 2915 2916 public boolean hasSourceId() { 2917 return this.sourceId != null && !this.sourceId.isEmpty(); 2918 } 2919 2920 /** 2921 * @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 2922 */ 2923 public TestScriptVariableComponent setSourceIdElement(IdType value) { 2924 this.sourceId = value; 2925 return this; 2926 } 2927 2928 /** 2929 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2930 */ 2931 public String getSourceId() { 2932 return this.sourceId == null ? null : this.sourceId.getValue(); 2933 } 2934 2935 /** 2936 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2937 */ 2938 public TestScriptVariableComponent setSourceId(String value) { 2939 if (Utilities.noString(value)) 2940 this.sourceId = null; 2941 else { 2942 if (this.sourceId == null) 2943 this.sourceId = new IdType(); 2944 this.sourceId.setValue(value); 2945 } 2946 return this; 2947 } 2948 2949 protected void listChildren(List<Property> childrenList) { 2950 super.listChildren(childrenList); 2951 childrenList.add(new Property("name", "string", "Descriptive name for this variable.", 0, java.lang.Integer.MAX_VALUE, name)); 2952 childrenList.add(new Property("defaultValue", "string", "A default, hard-coded, or user-defined value for this variable.", 0, java.lang.Integer.MAX_VALUE, defaultValue)); 2953 childrenList.add(new Property("headerField", "string", "Will be used to grab the HTTP header field value from the headers that sourceId is pointing to.", 0, java.lang.Integer.MAX_VALUE, headerField)); 2954 childrenList.add(new Property("path", "string", "XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both.", 0, java.lang.Integer.MAX_VALUE, path)); 2955 childrenList.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable.", 0, java.lang.Integer.MAX_VALUE, sourceId)); 2956 } 2957 2958 @Override 2959 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2960 switch (hash) { 2961 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2962 case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // StringType 2963 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 2964 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 2965 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 2966 default: return super.getProperty(hash, name, checkValid); 2967 } 2968 2969 } 2970 2971 @Override 2972 public void setProperty(int hash, String name, Base value) throws FHIRException { 2973 switch (hash) { 2974 case 3373707: // name 2975 this.name = castToString(value); // StringType 2976 break; 2977 case -659125328: // defaultValue 2978 this.defaultValue = castToString(value); // StringType 2979 break; 2980 case 1160732269: // headerField 2981 this.headerField = castToString(value); // StringType 2982 break; 2983 case 3433509: // path 2984 this.path = castToString(value); // StringType 2985 break; 2986 case 1746327190: // sourceId 2987 this.sourceId = castToId(value); // IdType 2988 break; 2989 default: super.setProperty(hash, name, value); 2990 } 2991 2992 } 2993 2994 @Override 2995 public void setProperty(String name, Base value) throws FHIRException { 2996 if (name.equals("name")) 2997 this.name = castToString(value); // StringType 2998 else if (name.equals("defaultValue")) 2999 this.defaultValue = castToString(value); // StringType 3000 else if (name.equals("headerField")) 3001 this.headerField = castToString(value); // StringType 3002 else if (name.equals("path")) 3003 this.path = castToString(value); // StringType 3004 else if (name.equals("sourceId")) 3005 this.sourceId = castToId(value); // IdType 3006 else 3007 super.setProperty(name, value); 3008 } 3009 3010 @Override 3011 public Base makeProperty(int hash, String name) throws FHIRException { 3012 switch (hash) { 3013 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 3014 case -659125328: throw new FHIRException("Cannot make property defaultValue as it is not a complex type"); // StringType 3015 case 1160732269: throw new FHIRException("Cannot make property headerField as it is not a complex type"); // StringType 3016 case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType 3017 case 1746327190: throw new FHIRException("Cannot make property sourceId as it is not a complex type"); // IdType 3018 default: return super.makeProperty(hash, name); 3019 } 3020 3021 } 3022 3023 @Override 3024 public Base addChild(String name) throws FHIRException { 3025 if (name.equals("name")) { 3026 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3027 } 3028 else if (name.equals("defaultValue")) { 3029 throw new FHIRException("Cannot call addChild on a primitive type TestScript.defaultValue"); 3030 } 3031 else if (name.equals("headerField")) { 3032 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 3033 } 3034 else if (name.equals("path")) { 3035 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 3036 } 3037 else if (name.equals("sourceId")) { 3038 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 3039 } 3040 else 3041 return super.addChild(name); 3042 } 3043 3044 public TestScriptVariableComponent copy() { 3045 TestScriptVariableComponent dst = new TestScriptVariableComponent(); 3046 copyValues(dst); 3047 dst.name = name == null ? null : name.copy(); 3048 dst.defaultValue = defaultValue == null ? null : defaultValue.copy(); 3049 dst.headerField = headerField == null ? null : headerField.copy(); 3050 dst.path = path == null ? null : path.copy(); 3051 dst.sourceId = sourceId == null ? null : sourceId.copy(); 3052 return dst; 3053 } 3054 3055 @Override 3056 public boolean equalsDeep(Base other) { 3057 if (!super.equalsDeep(other)) 3058 return false; 3059 if (!(other instanceof TestScriptVariableComponent)) 3060 return false; 3061 TestScriptVariableComponent o = (TestScriptVariableComponent) other; 3062 return compareDeep(name, o.name, true) && compareDeep(defaultValue, o.defaultValue, true) && compareDeep(headerField, o.headerField, true) 3063 && compareDeep(path, o.path, true) && compareDeep(sourceId, o.sourceId, true); 3064 } 3065 3066 @Override 3067 public boolean equalsShallow(Base other) { 3068 if (!super.equalsShallow(other)) 3069 return false; 3070 if (!(other instanceof TestScriptVariableComponent)) 3071 return false; 3072 TestScriptVariableComponent o = (TestScriptVariableComponent) other; 3073 return compareValues(name, o.name, true) && compareValues(defaultValue, o.defaultValue, true) && compareValues(headerField, o.headerField, true) 3074 && compareValues(path, o.path, true) && compareValues(sourceId, o.sourceId, true); 3075 } 3076 3077 public boolean isEmpty() { 3078 return super.isEmpty() && (name == null || name.isEmpty()) && (defaultValue == null || defaultValue.isEmpty()) 3079 && (headerField == null || headerField.isEmpty()) && (path == null || path.isEmpty()) && (sourceId == null || sourceId.isEmpty()) 3080 ; 3081 } 3082 3083 public String fhirType() { 3084 return "TestScript.variable"; 3085 3086 } 3087 3088 } 3089 3090 @Block() 3091 public static class TestScriptRuleComponent extends BackboneElement implements IBaseBackboneElement { 3092 /** 3093 * Reference to the resource (containing the contents of the rule needed for assertions). 3094 */ 3095 @Child(name = "resource", type = {}, order=1, min=1, max=1, modifier=false, summary=false) 3096 @Description(shortDefinition="Assert rule resource reference", formalDefinition="Reference to the resource (containing the contents of the rule needed for assertions)." ) 3097 protected Reference resource; 3098 3099 /** 3100 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the rule needed for assertions).) 3101 */ 3102 protected Resource resourceTarget; 3103 3104 /** 3105 * Each rule template can take one or more parameters for rule evaluation. 3106 */ 3107 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3108 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 3109 protected List<TestScriptRuleParamComponent> param; 3110 3111 private static final long serialVersionUID = -524260474L; 3112 3113 /** 3114 * Constructor 3115 */ 3116 public TestScriptRuleComponent() { 3117 super(); 3118 } 3119 3120 /** 3121 * Constructor 3122 */ 3123 public TestScriptRuleComponent(Reference resource) { 3124 super(); 3125 this.resource = resource; 3126 } 3127 3128 /** 3129 * @return {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) 3130 */ 3131 public Reference getResource() { 3132 if (this.resource == null) 3133 if (Configuration.errorOnAutoCreate()) 3134 throw new Error("Attempt to auto-create TestScriptRuleComponent.resource"); 3135 else if (Configuration.doAutoCreate()) 3136 this.resource = new Reference(); // cc 3137 return this.resource; 3138 } 3139 3140 public boolean hasResource() { 3141 return this.resource != null && !this.resource.isEmpty(); 3142 } 3143 3144 /** 3145 * @param value {@link #resource} (Reference to the resource (containing the contents of the rule needed for assertions).) 3146 */ 3147 public TestScriptRuleComponent setResource(Reference value) { 3148 this.resource = value; 3149 return this; 3150 } 3151 3152 /** 3153 * @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).) 3154 */ 3155 public Resource getResourceTarget() { 3156 return this.resourceTarget; 3157 } 3158 3159 /** 3160 * @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).) 3161 */ 3162 public TestScriptRuleComponent setResourceTarget(Resource value) { 3163 this.resourceTarget = value; 3164 return this; 3165 } 3166 3167 /** 3168 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 3169 */ 3170 public List<TestScriptRuleParamComponent> getParam() { 3171 if (this.param == null) 3172 this.param = new ArrayList<TestScriptRuleParamComponent>(); 3173 return this.param; 3174 } 3175 3176 public boolean hasParam() { 3177 if (this.param == null) 3178 return false; 3179 for (TestScriptRuleParamComponent item : this.param) 3180 if (!item.isEmpty()) 3181 return true; 3182 return false; 3183 } 3184 3185 /** 3186 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 3187 */ 3188 // syntactic sugar 3189 public TestScriptRuleParamComponent addParam() { //3 3190 TestScriptRuleParamComponent t = new TestScriptRuleParamComponent(); 3191 if (this.param == null) 3192 this.param = new ArrayList<TestScriptRuleParamComponent>(); 3193 this.param.add(t); 3194 return t; 3195 } 3196 3197 // syntactic sugar 3198 public TestScriptRuleComponent addParam(TestScriptRuleParamComponent t) { //3 3199 if (t == null) 3200 return this; 3201 if (this.param == null) 3202 this.param = new ArrayList<TestScriptRuleParamComponent>(); 3203 this.param.add(t); 3204 return this; 3205 } 3206 3207 protected void listChildren(List<Property> childrenList) { 3208 super.listChildren(childrenList); 3209 childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the rule needed for assertions).", 0, java.lang.Integer.MAX_VALUE, resource)); 3210 childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 3211 } 3212 3213 @Override 3214 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3215 switch (hash) { 3216 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 3217 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // TestScriptRuleParamComponent 3218 default: return super.getProperty(hash, name, checkValid); 3219 } 3220 3221 } 3222 3223 @Override 3224 public void setProperty(int hash, String name, Base value) throws FHIRException { 3225 switch (hash) { 3226 case -341064690: // resource 3227 this.resource = castToReference(value); // Reference 3228 break; 3229 case 106436749: // param 3230 this.getParam().add((TestScriptRuleParamComponent) value); // TestScriptRuleParamComponent 3231 break; 3232 default: super.setProperty(hash, name, value); 3233 } 3234 3235 } 3236 3237 @Override 3238 public void setProperty(String name, Base value) throws FHIRException { 3239 if (name.equals("resource")) 3240 this.resource = castToReference(value); // Reference 3241 else if (name.equals("param")) 3242 this.getParam().add((TestScriptRuleParamComponent) value); 3243 else 3244 super.setProperty(name, value); 3245 } 3246 3247 @Override 3248 public Base makeProperty(int hash, String name) throws FHIRException { 3249 switch (hash) { 3250 case -341064690: return getResource(); // Reference 3251 case 106436749: return addParam(); // TestScriptRuleParamComponent 3252 default: return super.makeProperty(hash, name); 3253 } 3254 3255 } 3256 3257 @Override 3258 public Base addChild(String name) throws FHIRException { 3259 if (name.equals("resource")) { 3260 this.resource = new Reference(); 3261 return this.resource; 3262 } 3263 else if (name.equals("param")) { 3264 return addParam(); 3265 } 3266 else 3267 return super.addChild(name); 3268 } 3269 3270 public TestScriptRuleComponent copy() { 3271 TestScriptRuleComponent dst = new TestScriptRuleComponent(); 3272 copyValues(dst); 3273 dst.resource = resource == null ? null : resource.copy(); 3274 if (param != null) { 3275 dst.param = new ArrayList<TestScriptRuleParamComponent>(); 3276 for (TestScriptRuleParamComponent i : param) 3277 dst.param.add(i.copy()); 3278 }; 3279 return dst; 3280 } 3281 3282 @Override 3283 public boolean equalsDeep(Base other) { 3284 if (!super.equalsDeep(other)) 3285 return false; 3286 if (!(other instanceof TestScriptRuleComponent)) 3287 return false; 3288 TestScriptRuleComponent o = (TestScriptRuleComponent) other; 3289 return compareDeep(resource, o.resource, true) && compareDeep(param, o.param, true); 3290 } 3291 3292 @Override 3293 public boolean equalsShallow(Base other) { 3294 if (!super.equalsShallow(other)) 3295 return false; 3296 if (!(other instanceof TestScriptRuleComponent)) 3297 return false; 3298 TestScriptRuleComponent o = (TestScriptRuleComponent) other; 3299 return true; 3300 } 3301 3302 public boolean isEmpty() { 3303 return super.isEmpty() && (resource == null || resource.isEmpty()) && (param == null || param.isEmpty()) 3304 ; 3305 } 3306 3307 public String fhirType() { 3308 return "TestScript.rule"; 3309 3310 } 3311 3312 } 3313 3314 @Block() 3315 public static class TestScriptRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 3316 /** 3317 * Descriptive name for this parameter that matches the external assert rule parameter name. 3318 */ 3319 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3320 @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) 3321 protected StringType name; 3322 3323 /** 3324 * The explict or dynamic value for the parameter that will be passed on to the external rule template. 3325 */ 3326 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 3327 @Description(shortDefinition="Parameter value defined either explicitly or dynamically", formalDefinition="The explict or dynamic value for the parameter that will be passed on to the external rule template." ) 3328 protected StringType value; 3329 3330 private static final long serialVersionUID = 395259392L; 3331 3332 /** 3333 * Constructor 3334 */ 3335 public TestScriptRuleParamComponent() { 3336 super(); 3337 } 3338 3339 /** 3340 * Constructor 3341 */ 3342 public TestScriptRuleParamComponent(StringType name, StringType value) { 3343 super(); 3344 this.name = name; 3345 this.value = value; 3346 } 3347 3348 /** 3349 * @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 3350 */ 3351 public StringType getNameElement() { 3352 if (this.name == null) 3353 if (Configuration.errorOnAutoCreate()) 3354 throw new Error("Attempt to auto-create TestScriptRuleParamComponent.name"); 3355 else if (Configuration.doAutoCreate()) 3356 this.name = new StringType(); // bb 3357 return this.name; 3358 } 3359 3360 public boolean hasNameElement() { 3361 return this.name != null && !this.name.isEmpty(); 3362 } 3363 3364 public boolean hasName() { 3365 return this.name != null && !this.name.isEmpty(); 3366 } 3367 3368 /** 3369 * @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 3370 */ 3371 public TestScriptRuleParamComponent setNameElement(StringType value) { 3372 this.name = value; 3373 return this; 3374 } 3375 3376 /** 3377 * @return Descriptive name for this parameter that matches the external assert rule parameter name. 3378 */ 3379 public String getName() { 3380 return this.name == null ? null : this.name.getValue(); 3381 } 3382 3383 /** 3384 * @param value Descriptive name for this parameter that matches the external assert rule parameter name. 3385 */ 3386 public TestScriptRuleParamComponent setName(String value) { 3387 if (this.name == null) 3388 this.name = new StringType(); 3389 this.name.setValue(value); 3390 return this; 3391 } 3392 3393 /** 3394 * @return {@link #value} (The explict 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 3395 */ 3396 public StringType getValueElement() { 3397 if (this.value == null) 3398 if (Configuration.errorOnAutoCreate()) 3399 throw new Error("Attempt to auto-create TestScriptRuleParamComponent.value"); 3400 else if (Configuration.doAutoCreate()) 3401 this.value = new StringType(); // bb 3402 return this.value; 3403 } 3404 3405 public boolean hasValueElement() { 3406 return this.value != null && !this.value.isEmpty(); 3407 } 3408 3409 public boolean hasValue() { 3410 return this.value != null && !this.value.isEmpty(); 3411 } 3412 3413 /** 3414 * @param value {@link #value} (The explict 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 3415 */ 3416 public TestScriptRuleParamComponent setValueElement(StringType value) { 3417 this.value = value; 3418 return this; 3419 } 3420 3421 /** 3422 * @return The explict or dynamic value for the parameter that will be passed on to the external rule template. 3423 */ 3424 public String getValue() { 3425 return this.value == null ? null : this.value.getValue(); 3426 } 3427 3428 /** 3429 * @param value The explict or dynamic value for the parameter that will be passed on to the external rule template. 3430 */ 3431 public TestScriptRuleParamComponent setValue(String value) { 3432 if (this.value == null) 3433 this.value = new StringType(); 3434 this.value.setValue(value); 3435 return this; 3436 } 3437 3438 protected void listChildren(List<Property> childrenList) { 3439 super.listChildren(childrenList); 3440 childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); 3441 childrenList.add(new Property("value", "string", "The explict or dynamic value for the parameter that will be passed on to the external rule template.", 0, java.lang.Integer.MAX_VALUE, value)); 3442 } 3443 3444 @Override 3445 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3446 switch (hash) { 3447 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3448 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 3449 default: return super.getProperty(hash, name, checkValid); 3450 } 3451 3452 } 3453 3454 @Override 3455 public void setProperty(int hash, String name, Base value) throws FHIRException { 3456 switch (hash) { 3457 case 3373707: // name 3458 this.name = castToString(value); // StringType 3459 break; 3460 case 111972721: // value 3461 this.value = castToString(value); // StringType 3462 break; 3463 default: super.setProperty(hash, name, value); 3464 } 3465 3466 } 3467 3468 @Override 3469 public void setProperty(String name, Base value) throws FHIRException { 3470 if (name.equals("name")) 3471 this.name = castToString(value); // StringType 3472 else if (name.equals("value")) 3473 this.value = castToString(value); // StringType 3474 else 3475 super.setProperty(name, value); 3476 } 3477 3478 @Override 3479 public Base makeProperty(int hash, String name) throws FHIRException { 3480 switch (hash) { 3481 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 3482 case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType 3483 default: return super.makeProperty(hash, name); 3484 } 3485 3486 } 3487 3488 @Override 3489 public Base addChild(String name) throws FHIRException { 3490 if (name.equals("name")) { 3491 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 3492 } 3493 else if (name.equals("value")) { 3494 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 3495 } 3496 else 3497 return super.addChild(name); 3498 } 3499 3500 public TestScriptRuleParamComponent copy() { 3501 TestScriptRuleParamComponent dst = new TestScriptRuleParamComponent(); 3502 copyValues(dst); 3503 dst.name = name == null ? null : name.copy(); 3504 dst.value = value == null ? null : value.copy(); 3505 return dst; 3506 } 3507 3508 @Override 3509 public boolean equalsDeep(Base other) { 3510 if (!super.equalsDeep(other)) 3511 return false; 3512 if (!(other instanceof TestScriptRuleParamComponent)) 3513 return false; 3514 TestScriptRuleParamComponent o = (TestScriptRuleParamComponent) other; 3515 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 3516 } 3517 3518 @Override 3519 public boolean equalsShallow(Base other) { 3520 if (!super.equalsShallow(other)) 3521 return false; 3522 if (!(other instanceof TestScriptRuleParamComponent)) 3523 return false; 3524 TestScriptRuleParamComponent o = (TestScriptRuleParamComponent) other; 3525 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 3526 } 3527 3528 public boolean isEmpty() { 3529 return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) 3530 ; 3531 } 3532 3533 public String fhirType() { 3534 return "TestScript.rule.param"; 3535 3536 } 3537 3538 } 3539 3540 @Block() 3541 public static class TestScriptRulesetComponent extends BackboneElement implements IBaseBackboneElement { 3542 /** 3543 * Reference to the resource (containing the contents of the ruleset needed for assertions). 3544 */ 3545 @Child(name = "resource", type = {}, order=1, min=1, max=1, modifier=false, summary=false) 3546 @Description(shortDefinition="Assert ruleset resource reference", formalDefinition="Reference to the resource (containing the contents of the ruleset needed for assertions)." ) 3547 protected Reference resource; 3548 3549 /** 3550 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the ruleset needed for assertions).) 3551 */ 3552 protected Resource resourceTarget; 3553 3554 /** 3555 * The referenced rule within the external ruleset template. 3556 */ 3557 @Child(name = "rule", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3558 @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." ) 3559 protected List<TestScriptRulesetRuleComponent> rule; 3560 3561 private static final long serialVersionUID = 5813554L; 3562 3563 /** 3564 * Constructor 3565 */ 3566 public TestScriptRulesetComponent() { 3567 super(); 3568 } 3569 3570 /** 3571 * Constructor 3572 */ 3573 public TestScriptRulesetComponent(Reference resource) { 3574 super(); 3575 this.resource = resource; 3576 } 3577 3578 /** 3579 * @return {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) 3580 */ 3581 public Reference getResource() { 3582 if (this.resource == null) 3583 if (Configuration.errorOnAutoCreate()) 3584 throw new Error("Attempt to auto-create TestScriptRulesetComponent.resource"); 3585 else if (Configuration.doAutoCreate()) 3586 this.resource = new Reference(); // cc 3587 return this.resource; 3588 } 3589 3590 public boolean hasResource() { 3591 return this.resource != null && !this.resource.isEmpty(); 3592 } 3593 3594 /** 3595 * @param value {@link #resource} (Reference to the resource (containing the contents of the ruleset needed for assertions).) 3596 */ 3597 public TestScriptRulesetComponent setResource(Reference value) { 3598 this.resource = value; 3599 return this; 3600 } 3601 3602 /** 3603 * @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).) 3604 */ 3605 public Resource getResourceTarget() { 3606 return this.resourceTarget; 3607 } 3608 3609 /** 3610 * @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).) 3611 */ 3612 public TestScriptRulesetComponent setResourceTarget(Resource value) { 3613 this.resourceTarget = value; 3614 return this; 3615 } 3616 3617 /** 3618 * @return {@link #rule} (The referenced rule within the external ruleset template.) 3619 */ 3620 public List<TestScriptRulesetRuleComponent> getRule() { 3621 if (this.rule == null) 3622 this.rule = new ArrayList<TestScriptRulesetRuleComponent>(); 3623 return this.rule; 3624 } 3625 3626 public boolean hasRule() { 3627 if (this.rule == null) 3628 return false; 3629 for (TestScriptRulesetRuleComponent item : this.rule) 3630 if (!item.isEmpty()) 3631 return true; 3632 return false; 3633 } 3634 3635 /** 3636 * @return {@link #rule} (The referenced rule within the external ruleset template.) 3637 */ 3638 // syntactic sugar 3639 public TestScriptRulesetRuleComponent addRule() { //3 3640 TestScriptRulesetRuleComponent t = new TestScriptRulesetRuleComponent(); 3641 if (this.rule == null) 3642 this.rule = new ArrayList<TestScriptRulesetRuleComponent>(); 3643 this.rule.add(t); 3644 return t; 3645 } 3646 3647 // syntactic sugar 3648 public TestScriptRulesetComponent addRule(TestScriptRulesetRuleComponent t) { //3 3649 if (t == null) 3650 return this; 3651 if (this.rule == null) 3652 this.rule = new ArrayList<TestScriptRulesetRuleComponent>(); 3653 this.rule.add(t); 3654 return this; 3655 } 3656 3657 protected void listChildren(List<Property> childrenList) { 3658 super.listChildren(childrenList); 3659 childrenList.add(new Property("resource", "Reference(Any)", "Reference to the resource (containing the contents of the ruleset needed for assertions).", 0, java.lang.Integer.MAX_VALUE, resource)); 3660 childrenList.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); 3661 } 3662 3663 @Override 3664 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3665 switch (hash) { 3666 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference 3667 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // TestScriptRulesetRuleComponent 3668 default: return super.getProperty(hash, name, checkValid); 3669 } 3670 3671 } 3672 3673 @Override 3674 public void setProperty(int hash, String name, Base value) throws FHIRException { 3675 switch (hash) { 3676 case -341064690: // resource 3677 this.resource = castToReference(value); // Reference 3678 break; 3679 case 3512060: // rule 3680 this.getRule().add((TestScriptRulesetRuleComponent) value); // TestScriptRulesetRuleComponent 3681 break; 3682 default: super.setProperty(hash, name, value); 3683 } 3684 3685 } 3686 3687 @Override 3688 public void setProperty(String name, Base value) throws FHIRException { 3689 if (name.equals("resource")) 3690 this.resource = castToReference(value); // Reference 3691 else if (name.equals("rule")) 3692 this.getRule().add((TestScriptRulesetRuleComponent) value); 3693 else 3694 super.setProperty(name, value); 3695 } 3696 3697 @Override 3698 public Base makeProperty(int hash, String name) throws FHIRException { 3699 switch (hash) { 3700 case -341064690: return getResource(); // Reference 3701 case 3512060: return addRule(); // TestScriptRulesetRuleComponent 3702 default: return super.makeProperty(hash, name); 3703 } 3704 3705 } 3706 3707 @Override 3708 public Base addChild(String name) throws FHIRException { 3709 if (name.equals("resource")) { 3710 this.resource = new Reference(); 3711 return this.resource; 3712 } 3713 else if (name.equals("rule")) { 3714 return addRule(); 3715 } 3716 else 3717 return super.addChild(name); 3718 } 3719 3720 public TestScriptRulesetComponent copy() { 3721 TestScriptRulesetComponent dst = new TestScriptRulesetComponent(); 3722 copyValues(dst); 3723 dst.resource = resource == null ? null : resource.copy(); 3724 if (rule != null) { 3725 dst.rule = new ArrayList<TestScriptRulesetRuleComponent>(); 3726 for (TestScriptRulesetRuleComponent i : rule) 3727 dst.rule.add(i.copy()); 3728 }; 3729 return dst; 3730 } 3731 3732 @Override 3733 public boolean equalsDeep(Base other) { 3734 if (!super.equalsDeep(other)) 3735 return false; 3736 if (!(other instanceof TestScriptRulesetComponent)) 3737 return false; 3738 TestScriptRulesetComponent o = (TestScriptRulesetComponent) other; 3739 return compareDeep(resource, o.resource, true) && compareDeep(rule, o.rule, true); 3740 } 3741 3742 @Override 3743 public boolean equalsShallow(Base other) { 3744 if (!super.equalsShallow(other)) 3745 return false; 3746 if (!(other instanceof TestScriptRulesetComponent)) 3747 return false; 3748 TestScriptRulesetComponent o = (TestScriptRulesetComponent) other; 3749 return true; 3750 } 3751 3752 public boolean isEmpty() { 3753 return super.isEmpty() && (resource == null || resource.isEmpty()) && (rule == null || rule.isEmpty()) 3754 ; 3755 } 3756 3757 public String fhirType() { 3758 return "TestScript.ruleset"; 3759 3760 } 3761 3762 } 3763 3764 @Block() 3765 public static class TestScriptRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { 3766 /** 3767 * Id of the referenced rule within the external ruleset template. 3768 */ 3769 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3770 @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) 3771 protected IdType ruleId; 3772 3773 /** 3774 * Each rule template can take one or more parameters for rule evaluation. 3775 */ 3776 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3777 @Description(shortDefinition="Ruleset rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 3778 protected List<TestScriptRulesetRuleParamComponent> param; 3779 3780 private static final long serialVersionUID = 155033950L; 3781 3782 /** 3783 * Constructor 3784 */ 3785 public TestScriptRulesetRuleComponent() { 3786 super(); 3787 } 3788 3789 /** 3790 * Constructor 3791 */ 3792 public TestScriptRulesetRuleComponent(IdType ruleId) { 3793 super(); 3794 this.ruleId = ruleId; 3795 } 3796 3797 /** 3798 * @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 3799 */ 3800 public IdType getRuleIdElement() { 3801 if (this.ruleId == null) 3802 if (Configuration.errorOnAutoCreate()) 3803 throw new Error("Attempt to auto-create TestScriptRulesetRuleComponent.ruleId"); 3804 else if (Configuration.doAutoCreate()) 3805 this.ruleId = new IdType(); // bb 3806 return this.ruleId; 3807 } 3808 3809 public boolean hasRuleIdElement() { 3810 return this.ruleId != null && !this.ruleId.isEmpty(); 3811 } 3812 3813 public boolean hasRuleId() { 3814 return this.ruleId != null && !this.ruleId.isEmpty(); 3815 } 3816 3817 /** 3818 * @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 3819 */ 3820 public TestScriptRulesetRuleComponent setRuleIdElement(IdType value) { 3821 this.ruleId = value; 3822 return this; 3823 } 3824 3825 /** 3826 * @return Id of the referenced rule within the external ruleset template. 3827 */ 3828 public String getRuleId() { 3829 return this.ruleId == null ? null : this.ruleId.getValue(); 3830 } 3831 3832 /** 3833 * @param value Id of the referenced rule within the external ruleset template. 3834 */ 3835 public TestScriptRulesetRuleComponent setRuleId(String value) { 3836 if (this.ruleId == null) 3837 this.ruleId = new IdType(); 3838 this.ruleId.setValue(value); 3839 return this; 3840 } 3841 3842 /** 3843 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 3844 */ 3845 public List<TestScriptRulesetRuleParamComponent> getParam() { 3846 if (this.param == null) 3847 this.param = new ArrayList<TestScriptRulesetRuleParamComponent>(); 3848 return this.param; 3849 } 3850 3851 public boolean hasParam() { 3852 if (this.param == null) 3853 return false; 3854 for (TestScriptRulesetRuleParamComponent item : this.param) 3855 if (!item.isEmpty()) 3856 return true; 3857 return false; 3858 } 3859 3860 /** 3861 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 3862 */ 3863 // syntactic sugar 3864 public TestScriptRulesetRuleParamComponent addParam() { //3 3865 TestScriptRulesetRuleParamComponent t = new TestScriptRulesetRuleParamComponent(); 3866 if (this.param == null) 3867 this.param = new ArrayList<TestScriptRulesetRuleParamComponent>(); 3868 this.param.add(t); 3869 return t; 3870 } 3871 3872 // syntactic sugar 3873 public TestScriptRulesetRuleComponent addParam(TestScriptRulesetRuleParamComponent t) { //3 3874 if (t == null) 3875 return this; 3876 if (this.param == null) 3877 this.param = new ArrayList<TestScriptRulesetRuleParamComponent>(); 3878 this.param.add(t); 3879 return this; 3880 } 3881 3882 protected void listChildren(List<Property> childrenList) { 3883 super.listChildren(childrenList); 3884 childrenList.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, ruleId)); 3885 childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 3886 } 3887 3888 @Override 3889 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3890 switch (hash) { 3891 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 3892 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // TestScriptRulesetRuleParamComponent 3893 default: return super.getProperty(hash, name, checkValid); 3894 } 3895 3896 } 3897 3898 @Override 3899 public void setProperty(int hash, String name, Base value) throws FHIRException { 3900 switch (hash) { 3901 case -919875273: // ruleId 3902 this.ruleId = castToId(value); // IdType 3903 break; 3904 case 106436749: // param 3905 this.getParam().add((TestScriptRulesetRuleParamComponent) value); // TestScriptRulesetRuleParamComponent 3906 break; 3907 default: super.setProperty(hash, name, value); 3908 } 3909 3910 } 3911 3912 @Override 3913 public void setProperty(String name, Base value) throws FHIRException { 3914 if (name.equals("ruleId")) 3915 this.ruleId = castToId(value); // IdType 3916 else if (name.equals("param")) 3917 this.getParam().add((TestScriptRulesetRuleParamComponent) value); 3918 else 3919 super.setProperty(name, value); 3920 } 3921 3922 @Override 3923 public Base makeProperty(int hash, String name) throws FHIRException { 3924 switch (hash) { 3925 case -919875273: throw new FHIRException("Cannot make property ruleId as it is not a complex type"); // IdType 3926 case 106436749: return addParam(); // TestScriptRulesetRuleParamComponent 3927 default: return super.makeProperty(hash, name); 3928 } 3929 3930 } 3931 3932 @Override 3933 public Base addChild(String name) throws FHIRException { 3934 if (name.equals("ruleId")) { 3935 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 3936 } 3937 else if (name.equals("param")) { 3938 return addParam(); 3939 } 3940 else 3941 return super.addChild(name); 3942 } 3943 3944 public TestScriptRulesetRuleComponent copy() { 3945 TestScriptRulesetRuleComponent dst = new TestScriptRulesetRuleComponent(); 3946 copyValues(dst); 3947 dst.ruleId = ruleId == null ? null : ruleId.copy(); 3948 if (param != null) { 3949 dst.param = new ArrayList<TestScriptRulesetRuleParamComponent>(); 3950 for (TestScriptRulesetRuleParamComponent i : param) 3951 dst.param.add(i.copy()); 3952 }; 3953 return dst; 3954 } 3955 3956 @Override 3957 public boolean equalsDeep(Base other) { 3958 if (!super.equalsDeep(other)) 3959 return false; 3960 if (!(other instanceof TestScriptRulesetRuleComponent)) 3961 return false; 3962 TestScriptRulesetRuleComponent o = (TestScriptRulesetRuleComponent) other; 3963 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 3964 } 3965 3966 @Override 3967 public boolean equalsShallow(Base other) { 3968 if (!super.equalsShallow(other)) 3969 return false; 3970 if (!(other instanceof TestScriptRulesetRuleComponent)) 3971 return false; 3972 TestScriptRulesetRuleComponent o = (TestScriptRulesetRuleComponent) other; 3973 return compareValues(ruleId, o.ruleId, true); 3974 } 3975 3976 public boolean isEmpty() { 3977 return super.isEmpty() && (ruleId == null || ruleId.isEmpty()) && (param == null || param.isEmpty()) 3978 ; 3979 } 3980 3981 public String fhirType() { 3982 return "TestScript.ruleset.rule"; 3983 3984 } 3985 3986 } 3987 3988 @Block() 3989 public static class TestScriptRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 3990 /** 3991 * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 3992 */ 3993 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3994 @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." ) 3995 protected StringType name; 3996 3997 /** 3998 * The value for the parameter that will be passed on to the external ruleset rule template. 3999 */ 4000 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 4001 @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." ) 4002 protected StringType value; 4003 4004 private static final long serialVersionUID = 395259392L; 4005 4006 /** 4007 * Constructor 4008 */ 4009 public TestScriptRulesetRuleParamComponent() { 4010 super(); 4011 } 4012 4013 /** 4014 * Constructor 4015 */ 4016 public TestScriptRulesetRuleParamComponent(StringType name, StringType value) { 4017 super(); 4018 this.name = name; 4019 this.value = value; 4020 } 4021 4022 /** 4023 * @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 4024 */ 4025 public StringType getNameElement() { 4026 if (this.name == null) 4027 if (Configuration.errorOnAutoCreate()) 4028 throw new Error("Attempt to auto-create TestScriptRulesetRuleParamComponent.name"); 4029 else if (Configuration.doAutoCreate()) 4030 this.name = new StringType(); // bb 4031 return this.name; 4032 } 4033 4034 public boolean hasNameElement() { 4035 return this.name != null && !this.name.isEmpty(); 4036 } 4037 4038 public boolean hasName() { 4039 return this.name != null && !this.name.isEmpty(); 4040 } 4041 4042 /** 4043 * @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 4044 */ 4045 public TestScriptRulesetRuleParamComponent setNameElement(StringType value) { 4046 this.name = value; 4047 return this; 4048 } 4049 4050 /** 4051 * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4052 */ 4053 public String getName() { 4054 return this.name == null ? null : this.name.getValue(); 4055 } 4056 4057 /** 4058 * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 4059 */ 4060 public TestScriptRulesetRuleParamComponent setName(String value) { 4061 if (this.name == null) 4062 this.name = new StringType(); 4063 this.name.setValue(value); 4064 return this; 4065 } 4066 4067 /** 4068 * @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 4069 */ 4070 public StringType getValueElement() { 4071 if (this.value == null) 4072 if (Configuration.errorOnAutoCreate()) 4073 throw new Error("Attempt to auto-create TestScriptRulesetRuleParamComponent.value"); 4074 else if (Configuration.doAutoCreate()) 4075 this.value = new StringType(); // bb 4076 return this.value; 4077 } 4078 4079 public boolean hasValueElement() { 4080 return this.value != null && !this.value.isEmpty(); 4081 } 4082 4083 public boolean hasValue() { 4084 return this.value != null && !this.value.isEmpty(); 4085 } 4086 4087 /** 4088 * @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 4089 */ 4090 public TestScriptRulesetRuleParamComponent setValueElement(StringType value) { 4091 this.value = value; 4092 return this; 4093 } 4094 4095 /** 4096 * @return The value for the parameter that will be passed on to the external ruleset rule template. 4097 */ 4098 public String getValue() { 4099 return this.value == null ? null : this.value.getValue(); 4100 } 4101 4102 /** 4103 * @param value The value for the parameter that will be passed on to the external ruleset rule template. 4104 */ 4105 public TestScriptRulesetRuleParamComponent setValue(String value) { 4106 if (this.value == null) 4107 this.value = new StringType(); 4108 this.value.setValue(value); 4109 return this; 4110 } 4111 4112 protected void listChildren(List<Property> childrenList) { 4113 super.listChildren(childrenList); 4114 childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); 4115 childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, java.lang.Integer.MAX_VALUE, value)); 4116 } 4117 4118 @Override 4119 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4120 switch (hash) { 4121 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 4122 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 4123 default: return super.getProperty(hash, name, checkValid); 4124 } 4125 4126 } 4127 4128 @Override 4129 public void setProperty(int hash, String name, Base value) throws FHIRException { 4130 switch (hash) { 4131 case 3373707: // name 4132 this.name = castToString(value); // StringType 4133 break; 4134 case 111972721: // value 4135 this.value = castToString(value); // StringType 4136 break; 4137 default: super.setProperty(hash, name, value); 4138 } 4139 4140 } 4141 4142 @Override 4143 public void setProperty(String name, Base value) throws FHIRException { 4144 if (name.equals("name")) 4145 this.name = castToString(value); // StringType 4146 else if (name.equals("value")) 4147 this.value = castToString(value); // StringType 4148 else 4149 super.setProperty(name, value); 4150 } 4151 4152 @Override 4153 public Base makeProperty(int hash, String name) throws FHIRException { 4154 switch (hash) { 4155 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 4156 case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType 4157 default: return super.makeProperty(hash, name); 4158 } 4159 4160 } 4161 4162 @Override 4163 public Base addChild(String name) throws FHIRException { 4164 if (name.equals("name")) { 4165 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 4166 } 4167 else if (name.equals("value")) { 4168 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 4169 } 4170 else 4171 return super.addChild(name); 4172 } 4173 4174 public TestScriptRulesetRuleParamComponent copy() { 4175 TestScriptRulesetRuleParamComponent dst = new TestScriptRulesetRuleParamComponent(); 4176 copyValues(dst); 4177 dst.name = name == null ? null : name.copy(); 4178 dst.value = value == null ? null : value.copy(); 4179 return dst; 4180 } 4181 4182 @Override 4183 public boolean equalsDeep(Base other) { 4184 if (!super.equalsDeep(other)) 4185 return false; 4186 if (!(other instanceof TestScriptRulesetRuleParamComponent)) 4187 return false; 4188 TestScriptRulesetRuleParamComponent o = (TestScriptRulesetRuleParamComponent) other; 4189 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 4190 } 4191 4192 @Override 4193 public boolean equalsShallow(Base other) { 4194 if (!super.equalsShallow(other)) 4195 return false; 4196 if (!(other instanceof TestScriptRulesetRuleParamComponent)) 4197 return false; 4198 TestScriptRulesetRuleParamComponent o = (TestScriptRulesetRuleParamComponent) other; 4199 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 4200 } 4201 4202 public boolean isEmpty() { 4203 return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) 4204 ; 4205 } 4206 4207 public String fhirType() { 4208 return "TestScript.ruleset.rule.param"; 4209 4210 } 4211 4212 } 4213 4214 @Block() 4215 public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement { 4216 /** 4217 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 4218 */ 4219 @Child(name = "metadata", type = {TestScriptMetadataComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 4220 @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." ) 4221 protected TestScriptMetadataComponent metadata; 4222 4223 /** 4224 * Action would contain either an operation or an assertion. 4225 */ 4226 @Child(name = "action", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4227 @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 4228 protected List<SetupActionComponent> action; 4229 4230 private static final long serialVersionUID = 9850834L; 4231 4232 /** 4233 * Constructor 4234 */ 4235 public TestScriptSetupComponent() { 4236 super(); 4237 } 4238 4239 /** 4240 * @return {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 4241 */ 4242 public TestScriptMetadataComponent getMetadata() { 4243 if (this.metadata == null) 4244 if (Configuration.errorOnAutoCreate()) 4245 throw new Error("Attempt to auto-create TestScriptSetupComponent.metadata"); 4246 else if (Configuration.doAutoCreate()) 4247 this.metadata = new TestScriptMetadataComponent(); // cc 4248 return this.metadata; 4249 } 4250 4251 public boolean hasMetadata() { 4252 return this.metadata != null && !this.metadata.isEmpty(); 4253 } 4254 4255 /** 4256 * @param value {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 4257 */ 4258 public TestScriptSetupComponent setMetadata(TestScriptMetadataComponent value) { 4259 this.metadata = value; 4260 return this; 4261 } 4262 4263 /** 4264 * @return {@link #action} (Action would contain either an operation or an assertion.) 4265 */ 4266 public List<SetupActionComponent> getAction() { 4267 if (this.action == null) 4268 this.action = new ArrayList<SetupActionComponent>(); 4269 return this.action; 4270 } 4271 4272 public boolean hasAction() { 4273 if (this.action == null) 4274 return false; 4275 for (SetupActionComponent item : this.action) 4276 if (!item.isEmpty()) 4277 return true; 4278 return false; 4279 } 4280 4281 /** 4282 * @return {@link #action} (Action would contain either an operation or an assertion.) 4283 */ 4284 // syntactic sugar 4285 public SetupActionComponent addAction() { //3 4286 SetupActionComponent t = new SetupActionComponent(); 4287 if (this.action == null) 4288 this.action = new ArrayList<SetupActionComponent>(); 4289 this.action.add(t); 4290 return t; 4291 } 4292 4293 // syntactic sugar 4294 public TestScriptSetupComponent addAction(SetupActionComponent t) { //3 4295 if (t == null) 4296 return this; 4297 if (this.action == null) 4298 this.action = new ArrayList<SetupActionComponent>(); 4299 this.action.add(t); 4300 return this; 4301 } 4302 4303 protected void listChildren(List<Property> childrenList) { 4304 super.listChildren(childrenList); 4305 childrenList.add(new Property("metadata", "@TestScript.metadata", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); 4306 childrenList.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 4307 } 4308 4309 @Override 4310 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4311 switch (hash) { 4312 case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent 4313 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // SetupActionComponent 4314 default: return super.getProperty(hash, name, checkValid); 4315 } 4316 4317 } 4318 4319 @Override 4320 public void setProperty(int hash, String name, Base value) throws FHIRException { 4321 switch (hash) { 4322 case -450004177: // metadata 4323 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 4324 break; 4325 case -1422950858: // action 4326 this.getAction().add((SetupActionComponent) value); // SetupActionComponent 4327 break; 4328 default: super.setProperty(hash, name, value); 4329 } 4330 4331 } 4332 4333 @Override 4334 public void setProperty(String name, Base value) throws FHIRException { 4335 if (name.equals("metadata")) 4336 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 4337 else if (name.equals("action")) 4338 this.getAction().add((SetupActionComponent) value); 4339 else 4340 super.setProperty(name, value); 4341 } 4342 4343 @Override 4344 public Base makeProperty(int hash, String name) throws FHIRException { 4345 switch (hash) { 4346 case -450004177: return getMetadata(); // TestScriptMetadataComponent 4347 case -1422950858: return addAction(); // SetupActionComponent 4348 default: return super.makeProperty(hash, name); 4349 } 4350 4351 } 4352 4353 @Override 4354 public Base addChild(String name) throws FHIRException { 4355 if (name.equals("metadata")) { 4356 this.metadata = new TestScriptMetadataComponent(); 4357 return this.metadata; 4358 } 4359 else if (name.equals("action")) { 4360 return addAction(); 4361 } 4362 else 4363 return super.addChild(name); 4364 } 4365 4366 public TestScriptSetupComponent copy() { 4367 TestScriptSetupComponent dst = new TestScriptSetupComponent(); 4368 copyValues(dst); 4369 dst.metadata = metadata == null ? null : metadata.copy(); 4370 if (action != null) { 4371 dst.action = new ArrayList<SetupActionComponent>(); 4372 for (SetupActionComponent i : action) 4373 dst.action.add(i.copy()); 4374 }; 4375 return dst; 4376 } 4377 4378 @Override 4379 public boolean equalsDeep(Base other) { 4380 if (!super.equalsDeep(other)) 4381 return false; 4382 if (!(other instanceof TestScriptSetupComponent)) 4383 return false; 4384 TestScriptSetupComponent o = (TestScriptSetupComponent) other; 4385 return compareDeep(metadata, o.metadata, true) && compareDeep(action, o.action, true); 4386 } 4387 4388 @Override 4389 public boolean equalsShallow(Base other) { 4390 if (!super.equalsShallow(other)) 4391 return false; 4392 if (!(other instanceof TestScriptSetupComponent)) 4393 return false; 4394 TestScriptSetupComponent o = (TestScriptSetupComponent) other; 4395 return true; 4396 } 4397 4398 public boolean isEmpty() { 4399 return super.isEmpty() && (metadata == null || metadata.isEmpty()) && (action == null || action.isEmpty()) 4400 ; 4401 } 4402 4403 public String fhirType() { 4404 return "TestScript.setup"; 4405 4406 } 4407 4408 } 4409 4410 @Block() 4411 public static class SetupActionComponent extends BackboneElement implements IBaseBackboneElement { 4412 /** 4413 * The operation to perform. 4414 */ 4415 @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false) 4416 @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." ) 4417 protected SetupActionOperationComponent operation; 4418 4419 /** 4420 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 4421 */ 4422 @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false) 4423 @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 4424 protected SetupActionAssertComponent assert_; 4425 4426 private static final long serialVersionUID = -252088305L; 4427 4428 /** 4429 * Constructor 4430 */ 4431 public SetupActionComponent() { 4432 super(); 4433 } 4434 4435 /** 4436 * @return {@link #operation} (The operation to perform.) 4437 */ 4438 public SetupActionOperationComponent getOperation() { 4439 if (this.operation == null) 4440 if (Configuration.errorOnAutoCreate()) 4441 throw new Error("Attempt to auto-create SetupActionComponent.operation"); 4442 else if (Configuration.doAutoCreate()) 4443 this.operation = new SetupActionOperationComponent(); // cc 4444 return this.operation; 4445 } 4446 4447 public boolean hasOperation() { 4448 return this.operation != null && !this.operation.isEmpty(); 4449 } 4450 4451 /** 4452 * @param value {@link #operation} (The operation to perform.) 4453 */ 4454 public SetupActionComponent setOperation(SetupActionOperationComponent value) { 4455 this.operation = value; 4456 return this; 4457 } 4458 4459 /** 4460 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 4461 */ 4462 public SetupActionAssertComponent getAssert() { 4463 if (this.assert_ == null) 4464 if (Configuration.errorOnAutoCreate()) 4465 throw new Error("Attempt to auto-create SetupActionComponent.assert_"); 4466 else if (Configuration.doAutoCreate()) 4467 this.assert_ = new SetupActionAssertComponent(); // cc 4468 return this.assert_; 4469 } 4470 4471 public boolean hasAssert() { 4472 return this.assert_ != null && !this.assert_.isEmpty(); 4473 } 4474 4475 /** 4476 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 4477 */ 4478 public SetupActionComponent setAssert(SetupActionAssertComponent value) { 4479 this.assert_ = value; 4480 return this; 4481 } 4482 4483 protected void listChildren(List<Property> childrenList) { 4484 super.listChildren(childrenList); 4485 childrenList.add(new Property("operation", "", "The operation to perform.", 0, java.lang.Integer.MAX_VALUE, operation)); 4486 childrenList.add(new Property("assert", "", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, java.lang.Integer.MAX_VALUE, assert_)); 4487 } 4488 4489 @Override 4490 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4491 switch (hash) { 4492 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 4493 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 4494 default: return super.getProperty(hash, name, checkValid); 4495 } 4496 4497 } 4498 4499 @Override 4500 public void setProperty(int hash, String name, Base value) throws FHIRException { 4501 switch (hash) { 4502 case 1662702951: // operation 4503 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 4504 break; 4505 case -1408208058: // assert 4506 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 4507 break; 4508 default: super.setProperty(hash, name, value); 4509 } 4510 4511 } 4512 4513 @Override 4514 public void setProperty(String name, Base value) throws FHIRException { 4515 if (name.equals("operation")) 4516 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 4517 else if (name.equals("assert")) 4518 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 4519 else 4520 super.setProperty(name, value); 4521 } 4522 4523 @Override 4524 public Base makeProperty(int hash, String name) throws FHIRException { 4525 switch (hash) { 4526 case 1662702951: return getOperation(); // SetupActionOperationComponent 4527 case -1408208058: return getAssert(); // SetupActionAssertComponent 4528 default: return super.makeProperty(hash, name); 4529 } 4530 4531 } 4532 4533 @Override 4534 public Base addChild(String name) throws FHIRException { 4535 if (name.equals("operation")) { 4536 this.operation = new SetupActionOperationComponent(); 4537 return this.operation; 4538 } 4539 else if (name.equals("assert")) { 4540 this.assert_ = new SetupActionAssertComponent(); 4541 return this.assert_; 4542 } 4543 else 4544 return super.addChild(name); 4545 } 4546 4547 public SetupActionComponent copy() { 4548 SetupActionComponent dst = new SetupActionComponent(); 4549 copyValues(dst); 4550 dst.operation = operation == null ? null : operation.copy(); 4551 dst.assert_ = assert_ == null ? null : assert_.copy(); 4552 return dst; 4553 } 4554 4555 @Override 4556 public boolean equalsDeep(Base other) { 4557 if (!super.equalsDeep(other)) 4558 return false; 4559 if (!(other instanceof SetupActionComponent)) 4560 return false; 4561 SetupActionComponent o = (SetupActionComponent) other; 4562 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 4563 } 4564 4565 @Override 4566 public boolean equalsShallow(Base other) { 4567 if (!super.equalsShallow(other)) 4568 return false; 4569 if (!(other instanceof SetupActionComponent)) 4570 return false; 4571 SetupActionComponent o = (SetupActionComponent) other; 4572 return true; 4573 } 4574 4575 public boolean isEmpty() { 4576 return super.isEmpty() && (operation == null || operation.isEmpty()) && (assert_ == null || assert_.isEmpty()) 4577 ; 4578 } 4579 4580 public String fhirType() { 4581 return "TestScript.setup.action"; 4582 4583 } 4584 4585 } 4586 4587 @Block() 4588 public static class SetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement { 4589 /** 4590 * Server interaction or operation type. 4591 */ 4592 @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false) 4593 @Description(shortDefinition="The operation code type that will be executed", formalDefinition="Server interaction or operation type." ) 4594 protected Coding type; 4595 4596 /** 4597 * The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 4598 */ 4599 @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4600 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://hl7-fhir.github.io/resourcelist.html." ) 4601 protected CodeType resource; 4602 4603 /** 4604 * The label would be used for tracking/logging purposes by test engines. 4605 */ 4606 @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 4607 @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 4608 protected StringType label; 4609 4610 /** 4611 * The description would be used by test engines for tracking and reporting purposes. 4612 */ 4613 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 4614 @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 4615 protected StringType description; 4616 4617 /** 4618 * The content-type or mime-type to use for RESTful operation in the 'Accept' header. 4619 */ 4620 @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 4621 @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Accept' header." ) 4622 protected Enumeration<ContentType> accept; 4623 4624 /** 4625 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 4626 */ 4627 @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 4628 @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 4629 protected Enumeration<ContentType> contentType; 4630 4631 /** 4632 * The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 4633 */ 4634 @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false) 4635 @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." ) 4636 protected IntegerType destination; 4637 4638 /** 4639 * 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. 4640 */ 4641 @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) 4642 @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." ) 4643 protected BooleanType encodeRequestUrl; 4644 4645 /** 4646 * The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 4647 */ 4648 @Child(name = "origin", type = {IntegerType.class}, order=9, min=0, max=1, modifier=false, summary=false) 4649 @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." ) 4650 protected IntegerType origin; 4651 4652 /** 4653 * Path plus parameters after [type]. Used to set parts of the request URL explicitly. 4654 */ 4655 @Child(name = "params", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 4656 @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type]. Used to set parts of the request URL explicitly." ) 4657 protected StringType params; 4658 4659 /** 4660 * Header elements would be used to set HTTP headers. 4661 */ 4662 @Child(name = "requestHeader", type = {}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4663 @Description(shortDefinition="Each operation can have one ore more header elements", formalDefinition="Header elements would be used to set HTTP headers." ) 4664 protected List<SetupActionOperationRequestHeaderComponent> requestHeader; 4665 4666 /** 4667 * The fixture id (maybe new) to map to the response. 4668 */ 4669 @Child(name = "responseId", type = {IdType.class}, order=12, min=0, max=1, modifier=false, summary=false) 4670 @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." ) 4671 protected IdType responseId; 4672 4673 /** 4674 * The id of the fixture used as the body of a PUT or POST request. 4675 */ 4676 @Child(name = "sourceId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false) 4677 @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." ) 4678 protected IdType sourceId; 4679 4680 /** 4681 * Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 4682 */ 4683 @Child(name = "targetId", type = {IdType.class}, order=14, min=0, max=1, modifier=false, summary=false) 4684 @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." ) 4685 protected IdType targetId; 4686 4687 /** 4688 * Complete request URL. 4689 */ 4690 @Child(name = "url", type = {StringType.class}, order=15, min=0, max=1, modifier=false, summary=false) 4691 @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." ) 4692 protected StringType url; 4693 4694 private static final long serialVersionUID = 606457859L; 4695 4696 /** 4697 * Constructor 4698 */ 4699 public SetupActionOperationComponent() { 4700 super(); 4701 } 4702 4703 /** 4704 * @return {@link #type} (Server interaction or operation type.) 4705 */ 4706 public Coding getType() { 4707 if (this.type == null) 4708 if (Configuration.errorOnAutoCreate()) 4709 throw new Error("Attempt to auto-create SetupActionOperationComponent.type"); 4710 else if (Configuration.doAutoCreate()) 4711 this.type = new Coding(); // cc 4712 return this.type; 4713 } 4714 4715 public boolean hasType() { 4716 return this.type != null && !this.type.isEmpty(); 4717 } 4718 4719 /** 4720 * @param value {@link #type} (Server interaction or operation type.) 4721 */ 4722 public SetupActionOperationComponent setType(Coding value) { 4723 this.type = value; 4724 return this; 4725 } 4726 4727 /** 4728 * @return {@link #resource} (The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 4729 */ 4730 public CodeType getResourceElement() { 4731 if (this.resource == null) 4732 if (Configuration.errorOnAutoCreate()) 4733 throw new Error("Attempt to auto-create SetupActionOperationComponent.resource"); 4734 else if (Configuration.doAutoCreate()) 4735 this.resource = new CodeType(); // bb 4736 return this.resource; 4737 } 4738 4739 public boolean hasResourceElement() { 4740 return this.resource != null && !this.resource.isEmpty(); 4741 } 4742 4743 public boolean hasResource() { 4744 return this.resource != null && !this.resource.isEmpty(); 4745 } 4746 4747 /** 4748 * @param value {@link #resource} (The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 4749 */ 4750 public SetupActionOperationComponent setResourceElement(CodeType value) { 4751 this.resource = value; 4752 return this; 4753 } 4754 4755 /** 4756 * @return The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 4757 */ 4758 public String getResource() { 4759 return this.resource == null ? null : this.resource.getValue(); 4760 } 4761 4762 /** 4763 * @param value The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 4764 */ 4765 public SetupActionOperationComponent setResource(String value) { 4766 if (Utilities.noString(value)) 4767 this.resource = null; 4768 else { 4769 if (this.resource == null) 4770 this.resource = new CodeType(); 4771 this.resource.setValue(value); 4772 } 4773 return this; 4774 } 4775 4776 /** 4777 * @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 4778 */ 4779 public StringType getLabelElement() { 4780 if (this.label == null) 4781 if (Configuration.errorOnAutoCreate()) 4782 throw new Error("Attempt to auto-create SetupActionOperationComponent.label"); 4783 else if (Configuration.doAutoCreate()) 4784 this.label = new StringType(); // bb 4785 return this.label; 4786 } 4787 4788 public boolean hasLabelElement() { 4789 return this.label != null && !this.label.isEmpty(); 4790 } 4791 4792 public boolean hasLabel() { 4793 return this.label != null && !this.label.isEmpty(); 4794 } 4795 4796 /** 4797 * @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 4798 */ 4799 public SetupActionOperationComponent setLabelElement(StringType value) { 4800 this.label = value; 4801 return this; 4802 } 4803 4804 /** 4805 * @return The label would be used for tracking/logging purposes by test engines. 4806 */ 4807 public String getLabel() { 4808 return this.label == null ? null : this.label.getValue(); 4809 } 4810 4811 /** 4812 * @param value The label would be used for tracking/logging purposes by test engines. 4813 */ 4814 public SetupActionOperationComponent setLabel(String value) { 4815 if (Utilities.noString(value)) 4816 this.label = null; 4817 else { 4818 if (this.label == null) 4819 this.label = new StringType(); 4820 this.label.setValue(value); 4821 } 4822 return this; 4823 } 4824 4825 /** 4826 * @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 4827 */ 4828 public StringType getDescriptionElement() { 4829 if (this.description == null) 4830 if (Configuration.errorOnAutoCreate()) 4831 throw new Error("Attempt to auto-create SetupActionOperationComponent.description"); 4832 else if (Configuration.doAutoCreate()) 4833 this.description = new StringType(); // bb 4834 return this.description; 4835 } 4836 4837 public boolean hasDescriptionElement() { 4838 return this.description != null && !this.description.isEmpty(); 4839 } 4840 4841 public boolean hasDescription() { 4842 return this.description != null && !this.description.isEmpty(); 4843 } 4844 4845 /** 4846 * @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 4847 */ 4848 public SetupActionOperationComponent setDescriptionElement(StringType value) { 4849 this.description = value; 4850 return this; 4851 } 4852 4853 /** 4854 * @return The description would be used by test engines for tracking and reporting purposes. 4855 */ 4856 public String getDescription() { 4857 return this.description == null ? null : this.description.getValue(); 4858 } 4859 4860 /** 4861 * @param value The description would be used by test engines for tracking and reporting purposes. 4862 */ 4863 public SetupActionOperationComponent setDescription(String value) { 4864 if (Utilities.noString(value)) 4865 this.description = null; 4866 else { 4867 if (this.description == null) 4868 this.description = new StringType(); 4869 this.description.setValue(value); 4870 } 4871 return this; 4872 } 4873 4874 /** 4875 * @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 4876 */ 4877 public Enumeration<ContentType> getAcceptElement() { 4878 if (this.accept == null) 4879 if (Configuration.errorOnAutoCreate()) 4880 throw new Error("Attempt to auto-create SetupActionOperationComponent.accept"); 4881 else if (Configuration.doAutoCreate()) 4882 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 4883 return this.accept; 4884 } 4885 4886 public boolean hasAcceptElement() { 4887 return this.accept != null && !this.accept.isEmpty(); 4888 } 4889 4890 public boolean hasAccept() { 4891 return this.accept != null && !this.accept.isEmpty(); 4892 } 4893 4894 /** 4895 * @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 4896 */ 4897 public SetupActionOperationComponent setAcceptElement(Enumeration<ContentType> value) { 4898 this.accept = value; 4899 return this; 4900 } 4901 4902 /** 4903 * @return The content-type or mime-type to use for RESTful operation in the 'Accept' header. 4904 */ 4905 public ContentType getAccept() { 4906 return this.accept == null ? null : this.accept.getValue(); 4907 } 4908 4909 /** 4910 * @param value The content-type or mime-type to use for RESTful operation in the 'Accept' header. 4911 */ 4912 public SetupActionOperationComponent setAccept(ContentType value) { 4913 if (value == null) 4914 this.accept = null; 4915 else { 4916 if (this.accept == null) 4917 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 4918 this.accept.setValue(value); 4919 } 4920 return this; 4921 } 4922 4923 /** 4924 * @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 4925 */ 4926 public Enumeration<ContentType> getContentTypeElement() { 4927 if (this.contentType == null) 4928 if (Configuration.errorOnAutoCreate()) 4929 throw new Error("Attempt to auto-create SetupActionOperationComponent.contentType"); 4930 else if (Configuration.doAutoCreate()) 4931 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 4932 return this.contentType; 4933 } 4934 4935 public boolean hasContentTypeElement() { 4936 return this.contentType != null && !this.contentType.isEmpty(); 4937 } 4938 4939 public boolean hasContentType() { 4940 return this.contentType != null && !this.contentType.isEmpty(); 4941 } 4942 4943 /** 4944 * @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 4945 */ 4946 public SetupActionOperationComponent setContentTypeElement(Enumeration<ContentType> value) { 4947 this.contentType = value; 4948 return this; 4949 } 4950 4951 /** 4952 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 4953 */ 4954 public ContentType getContentType() { 4955 return this.contentType == null ? null : this.contentType.getValue(); 4956 } 4957 4958 /** 4959 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 4960 */ 4961 public SetupActionOperationComponent setContentType(ContentType value) { 4962 if (value == null) 4963 this.contentType = null; 4964 else { 4965 if (this.contentType == null) 4966 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 4967 this.contentType.setValue(value); 4968 } 4969 return this; 4970 } 4971 4972 /** 4973 * @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 4974 */ 4975 public IntegerType getDestinationElement() { 4976 if (this.destination == null) 4977 if (Configuration.errorOnAutoCreate()) 4978 throw new Error("Attempt to auto-create SetupActionOperationComponent.destination"); 4979 else if (Configuration.doAutoCreate()) 4980 this.destination = new IntegerType(); // bb 4981 return this.destination; 4982 } 4983 4984 public boolean hasDestinationElement() { 4985 return this.destination != null && !this.destination.isEmpty(); 4986 } 4987 4988 public boolean hasDestination() { 4989 return this.destination != null && !this.destination.isEmpty(); 4990 } 4991 4992 /** 4993 * @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 4994 */ 4995 public SetupActionOperationComponent setDestinationElement(IntegerType value) { 4996 this.destination = value; 4997 return this; 4998 } 4999 5000 /** 5001 * @return The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5002 */ 5003 public int getDestination() { 5004 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 5005 } 5006 5007 /** 5008 * @param value The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section. 5009 */ 5010 public SetupActionOperationComponent setDestination(int value) { 5011 if (this.destination == null) 5012 this.destination = new IntegerType(); 5013 this.destination.setValue(value); 5014 return this; 5015 } 5016 5017 /** 5018 * @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 5019 */ 5020 public BooleanType getEncodeRequestUrlElement() { 5021 if (this.encodeRequestUrl == null) 5022 if (Configuration.errorOnAutoCreate()) 5023 throw new Error("Attempt to auto-create SetupActionOperationComponent.encodeRequestUrl"); 5024 else if (Configuration.doAutoCreate()) 5025 this.encodeRequestUrl = new BooleanType(); // bb 5026 return this.encodeRequestUrl; 5027 } 5028 5029 public boolean hasEncodeRequestUrlElement() { 5030 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 5031 } 5032 5033 public boolean hasEncodeRequestUrl() { 5034 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 5035 } 5036 5037 /** 5038 * @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 5039 */ 5040 public SetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 5041 this.encodeRequestUrl = value; 5042 return this; 5043 } 5044 5045 /** 5046 * @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. 5047 */ 5048 public boolean getEncodeRequestUrl() { 5049 return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue(); 5050 } 5051 5052 /** 5053 * @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. 5054 */ 5055 public SetupActionOperationComponent setEncodeRequestUrl(boolean value) { 5056 if (this.encodeRequestUrl == null) 5057 this.encodeRequestUrl = new BooleanType(); 5058 this.encodeRequestUrl.setValue(value); 5059 return this; 5060 } 5061 5062 /** 5063 * @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 5064 */ 5065 public IntegerType getOriginElement() { 5066 if (this.origin == null) 5067 if (Configuration.errorOnAutoCreate()) 5068 throw new Error("Attempt to auto-create SetupActionOperationComponent.origin"); 5069 else if (Configuration.doAutoCreate()) 5070 this.origin = new IntegerType(); // bb 5071 return this.origin; 5072 } 5073 5074 public boolean hasOriginElement() { 5075 return this.origin != null && !this.origin.isEmpty(); 5076 } 5077 5078 public boolean hasOrigin() { 5079 return this.origin != null && !this.origin.isEmpty(); 5080 } 5081 5082 /** 5083 * @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 5084 */ 5085 public SetupActionOperationComponent setOriginElement(IntegerType value) { 5086 this.origin = value; 5087 return this; 5088 } 5089 5090 /** 5091 * @return The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5092 */ 5093 public int getOrigin() { 5094 return this.origin == null || this.origin.isEmpty() ? 0 : this.origin.getValue(); 5095 } 5096 5097 /** 5098 * @param value The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section. 5099 */ 5100 public SetupActionOperationComponent setOrigin(int value) { 5101 if (this.origin == null) 5102 this.origin = new IntegerType(); 5103 this.origin.setValue(value); 5104 return this; 5105 } 5106 5107 /** 5108 * @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 5109 */ 5110 public StringType getParamsElement() { 5111 if (this.params == null) 5112 if (Configuration.errorOnAutoCreate()) 5113 throw new Error("Attempt to auto-create SetupActionOperationComponent.params"); 5114 else if (Configuration.doAutoCreate()) 5115 this.params = new StringType(); // bb 5116 return this.params; 5117 } 5118 5119 public boolean hasParamsElement() { 5120 return this.params != null && !this.params.isEmpty(); 5121 } 5122 5123 public boolean hasParams() { 5124 return this.params != null && !this.params.isEmpty(); 5125 } 5126 5127 /** 5128 * @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 5129 */ 5130 public SetupActionOperationComponent setParamsElement(StringType value) { 5131 this.params = value; 5132 return this; 5133 } 5134 5135 /** 5136 * @return Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5137 */ 5138 public String getParams() { 5139 return this.params == null ? null : this.params.getValue(); 5140 } 5141 5142 /** 5143 * @param value Path plus parameters after [type]. Used to set parts of the request URL explicitly. 5144 */ 5145 public SetupActionOperationComponent setParams(String value) { 5146 if (Utilities.noString(value)) 5147 this.params = null; 5148 else { 5149 if (this.params == null) 5150 this.params = new StringType(); 5151 this.params.setValue(value); 5152 } 5153 return this; 5154 } 5155 5156 /** 5157 * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) 5158 */ 5159 public List<SetupActionOperationRequestHeaderComponent> getRequestHeader() { 5160 if (this.requestHeader == null) 5161 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5162 return this.requestHeader; 5163 } 5164 5165 public boolean hasRequestHeader() { 5166 if (this.requestHeader == null) 5167 return false; 5168 for (SetupActionOperationRequestHeaderComponent item : this.requestHeader) 5169 if (!item.isEmpty()) 5170 return true; 5171 return false; 5172 } 5173 5174 /** 5175 * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) 5176 */ 5177 // syntactic sugar 5178 public SetupActionOperationRequestHeaderComponent addRequestHeader() { //3 5179 SetupActionOperationRequestHeaderComponent t = new SetupActionOperationRequestHeaderComponent(); 5180 if (this.requestHeader == null) 5181 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5182 this.requestHeader.add(t); 5183 return t; 5184 } 5185 5186 // syntactic sugar 5187 public SetupActionOperationComponent addRequestHeader(SetupActionOperationRequestHeaderComponent t) { //3 5188 if (t == null) 5189 return this; 5190 if (this.requestHeader == null) 5191 this.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5192 this.requestHeader.add(t); 5193 return this; 5194 } 5195 5196 /** 5197 * @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 5198 */ 5199 public IdType getResponseIdElement() { 5200 if (this.responseId == null) 5201 if (Configuration.errorOnAutoCreate()) 5202 throw new Error("Attempt to auto-create SetupActionOperationComponent.responseId"); 5203 else if (Configuration.doAutoCreate()) 5204 this.responseId = new IdType(); // bb 5205 return this.responseId; 5206 } 5207 5208 public boolean hasResponseIdElement() { 5209 return this.responseId != null && !this.responseId.isEmpty(); 5210 } 5211 5212 public boolean hasResponseId() { 5213 return this.responseId != null && !this.responseId.isEmpty(); 5214 } 5215 5216 /** 5217 * @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 5218 */ 5219 public SetupActionOperationComponent setResponseIdElement(IdType value) { 5220 this.responseId = value; 5221 return this; 5222 } 5223 5224 /** 5225 * @return The fixture id (maybe new) to map to the response. 5226 */ 5227 public String getResponseId() { 5228 return this.responseId == null ? null : this.responseId.getValue(); 5229 } 5230 5231 /** 5232 * @param value The fixture id (maybe new) to map to the response. 5233 */ 5234 public SetupActionOperationComponent setResponseId(String value) { 5235 if (Utilities.noString(value)) 5236 this.responseId = null; 5237 else { 5238 if (this.responseId == null) 5239 this.responseId = new IdType(); 5240 this.responseId.setValue(value); 5241 } 5242 return this; 5243 } 5244 5245 /** 5246 * @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 5247 */ 5248 public IdType getSourceIdElement() { 5249 if (this.sourceId == null) 5250 if (Configuration.errorOnAutoCreate()) 5251 throw new Error("Attempt to auto-create SetupActionOperationComponent.sourceId"); 5252 else if (Configuration.doAutoCreate()) 5253 this.sourceId = new IdType(); // bb 5254 return this.sourceId; 5255 } 5256 5257 public boolean hasSourceIdElement() { 5258 return this.sourceId != null && !this.sourceId.isEmpty(); 5259 } 5260 5261 public boolean hasSourceId() { 5262 return this.sourceId != null && !this.sourceId.isEmpty(); 5263 } 5264 5265 /** 5266 * @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 5267 */ 5268 public SetupActionOperationComponent setSourceIdElement(IdType value) { 5269 this.sourceId = value; 5270 return this; 5271 } 5272 5273 /** 5274 * @return The id of the fixture used as the body of a PUT or POST request. 5275 */ 5276 public String getSourceId() { 5277 return this.sourceId == null ? null : this.sourceId.getValue(); 5278 } 5279 5280 /** 5281 * @param value The id of the fixture used as the body of a PUT or POST request. 5282 */ 5283 public SetupActionOperationComponent setSourceId(String value) { 5284 if (Utilities.noString(value)) 5285 this.sourceId = null; 5286 else { 5287 if (this.sourceId == null) 5288 this.sourceId = new IdType(); 5289 this.sourceId.setValue(value); 5290 } 5291 return this; 5292 } 5293 5294 /** 5295 * @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 5296 */ 5297 public IdType getTargetIdElement() { 5298 if (this.targetId == null) 5299 if (Configuration.errorOnAutoCreate()) 5300 throw new Error("Attempt to auto-create SetupActionOperationComponent.targetId"); 5301 else if (Configuration.doAutoCreate()) 5302 this.targetId = new IdType(); // bb 5303 return this.targetId; 5304 } 5305 5306 public boolean hasTargetIdElement() { 5307 return this.targetId != null && !this.targetId.isEmpty(); 5308 } 5309 5310 public boolean hasTargetId() { 5311 return this.targetId != null && !this.targetId.isEmpty(); 5312 } 5313 5314 /** 5315 * @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 5316 */ 5317 public SetupActionOperationComponent setTargetIdElement(IdType value) { 5318 this.targetId = value; 5319 return this; 5320 } 5321 5322 /** 5323 * @return Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5324 */ 5325 public String getTargetId() { 5326 return this.targetId == null ? null : this.targetId.getValue(); 5327 } 5328 5329 /** 5330 * @param value Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 5331 */ 5332 public SetupActionOperationComponent setTargetId(String value) { 5333 if (Utilities.noString(value)) 5334 this.targetId = null; 5335 else { 5336 if (this.targetId == null) 5337 this.targetId = new IdType(); 5338 this.targetId.setValue(value); 5339 } 5340 return this; 5341 } 5342 5343 /** 5344 * @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 5345 */ 5346 public StringType getUrlElement() { 5347 if (this.url == null) 5348 if (Configuration.errorOnAutoCreate()) 5349 throw new Error("Attempt to auto-create SetupActionOperationComponent.url"); 5350 else if (Configuration.doAutoCreate()) 5351 this.url = new StringType(); // bb 5352 return this.url; 5353 } 5354 5355 public boolean hasUrlElement() { 5356 return this.url != null && !this.url.isEmpty(); 5357 } 5358 5359 public boolean hasUrl() { 5360 return this.url != null && !this.url.isEmpty(); 5361 } 5362 5363 /** 5364 * @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 5365 */ 5366 public SetupActionOperationComponent setUrlElement(StringType value) { 5367 this.url = value; 5368 return this; 5369 } 5370 5371 /** 5372 * @return Complete request URL. 5373 */ 5374 public String getUrl() { 5375 return this.url == null ? null : this.url.getValue(); 5376 } 5377 5378 /** 5379 * @param value Complete request URL. 5380 */ 5381 public SetupActionOperationComponent setUrl(String value) { 5382 if (Utilities.noString(value)) 5383 this.url = null; 5384 else { 5385 if (this.url == null) 5386 this.url = new StringType(); 5387 this.url.setValue(value); 5388 } 5389 return this; 5390 } 5391 5392 protected void listChildren(List<Property> childrenList) { 5393 super.listChildren(childrenList); 5394 childrenList.add(new Property("type", "Coding", "Server interaction or operation type.", 0, java.lang.Integer.MAX_VALUE, type)); 5395 childrenList.add(new Property("resource", "code", "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", 0, java.lang.Integer.MAX_VALUE, resource)); 5396 childrenList.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, label)); 5397 childrenList.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); 5398 childrenList.add(new Property("accept", "code", "The content-type or mime-type to use for RESTful operation in the 'Accept' header.", 0, java.lang.Integer.MAX_VALUE, accept)); 5399 childrenList.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, java.lang.Integer.MAX_VALUE, contentType)); 5400 childrenList.add(new Property("destination", "integer", "The server where the request message is destined for. Must be one of the server numbers listed in TestScript.destination section.", 0, java.lang.Integer.MAX_VALUE, destination)); 5401 childrenList.add(new Property("encodeRequestUrl", "boolean", "Whether or not to implicitly send the request url in encoded format. The default is true to match the standard RESTful client behavior. Set to false when communicating with a server that does not support encoded url paths.", 0, java.lang.Integer.MAX_VALUE, encodeRequestUrl)); 5402 childrenList.add(new Property("origin", "integer", "The server where the request message originates from. Must be one of the server numbers listed in TestScript.origin section.", 0, java.lang.Integer.MAX_VALUE, origin)); 5403 childrenList.add(new Property("params", "string", "Path plus parameters after [type]. Used to set parts of the request URL explicitly.", 0, java.lang.Integer.MAX_VALUE, params)); 5404 childrenList.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader)); 5405 childrenList.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, java.lang.Integer.MAX_VALUE, responseId)); 5406 childrenList.add(new Property("sourceId", "id", "The id of the fixture used as the body of a PUT or POST request.", 0, java.lang.Integer.MAX_VALUE, sourceId)); 5407 childrenList.add(new Property("targetId", "id", "Id of fixture used for extracting the [id], [type], and [vid] for GET requests.", 0, java.lang.Integer.MAX_VALUE, targetId)); 5408 childrenList.add(new Property("url", "string", "Complete request URL.", 0, java.lang.Integer.MAX_VALUE, url)); 5409 } 5410 5411 @Override 5412 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5413 switch (hash) { 5414 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding 5415 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 5416 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 5417 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 5418 case -1423461112: /*accept*/ return this.accept == null ? new Base[0] : new Base[] {this.accept}; // Enumeration<ContentType> 5419 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType> 5420 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : new Base[] {this.destination}; // IntegerType 5421 case -1760554218: /*encodeRequestUrl*/ return this.encodeRequestUrl == null ? new Base[0] : new Base[] {this.encodeRequestUrl}; // BooleanType 5422 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // IntegerType 5423 case -995427962: /*params*/ return this.params == null ? new Base[0] : new Base[] {this.params}; // StringType 5424 case 1074158076: /*requestHeader*/ return this.requestHeader == null ? new Base[0] : this.requestHeader.toArray(new Base[this.requestHeader.size()]); // SetupActionOperationRequestHeaderComponent 5425 case -633138884: /*responseId*/ return this.responseId == null ? new Base[0] : new Base[] {this.responseId}; // IdType 5426 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 5427 case -441951604: /*targetId*/ return this.targetId == null ? new Base[0] : new Base[] {this.targetId}; // IdType 5428 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // StringType 5429 default: return super.getProperty(hash, name, checkValid); 5430 } 5431 5432 } 5433 5434 @Override 5435 public void setProperty(int hash, String name, Base value) throws FHIRException { 5436 switch (hash) { 5437 case 3575610: // type 5438 this.type = castToCoding(value); // Coding 5439 break; 5440 case -341064690: // resource 5441 this.resource = castToCode(value); // CodeType 5442 break; 5443 case 102727412: // label 5444 this.label = castToString(value); // StringType 5445 break; 5446 case -1724546052: // description 5447 this.description = castToString(value); // StringType 5448 break; 5449 case -1423461112: // accept 5450 this.accept = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 5451 break; 5452 case -389131437: // contentType 5453 this.contentType = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 5454 break; 5455 case -1429847026: // destination 5456 this.destination = castToInteger(value); // IntegerType 5457 break; 5458 case -1760554218: // encodeRequestUrl 5459 this.encodeRequestUrl = castToBoolean(value); // BooleanType 5460 break; 5461 case -1008619738: // origin 5462 this.origin = castToInteger(value); // IntegerType 5463 break; 5464 case -995427962: // params 5465 this.params = castToString(value); // StringType 5466 break; 5467 case 1074158076: // requestHeader 5468 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); // SetupActionOperationRequestHeaderComponent 5469 break; 5470 case -633138884: // responseId 5471 this.responseId = castToId(value); // IdType 5472 break; 5473 case 1746327190: // sourceId 5474 this.sourceId = castToId(value); // IdType 5475 break; 5476 case -441951604: // targetId 5477 this.targetId = castToId(value); // IdType 5478 break; 5479 case 116079: // url 5480 this.url = castToString(value); // StringType 5481 break; 5482 default: super.setProperty(hash, name, value); 5483 } 5484 5485 } 5486 5487 @Override 5488 public void setProperty(String name, Base value) throws FHIRException { 5489 if (name.equals("type")) 5490 this.type = castToCoding(value); // Coding 5491 else if (name.equals("resource")) 5492 this.resource = castToCode(value); // CodeType 5493 else if (name.equals("label")) 5494 this.label = castToString(value); // StringType 5495 else if (name.equals("description")) 5496 this.description = castToString(value); // StringType 5497 else if (name.equals("accept")) 5498 this.accept = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 5499 else if (name.equals("contentType")) 5500 this.contentType = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 5501 else if (name.equals("destination")) 5502 this.destination = castToInteger(value); // IntegerType 5503 else if (name.equals("encodeRequestUrl")) 5504 this.encodeRequestUrl = castToBoolean(value); // BooleanType 5505 else if (name.equals("origin")) 5506 this.origin = castToInteger(value); // IntegerType 5507 else if (name.equals("params")) 5508 this.params = castToString(value); // StringType 5509 else if (name.equals("requestHeader")) 5510 this.getRequestHeader().add((SetupActionOperationRequestHeaderComponent) value); 5511 else if (name.equals("responseId")) 5512 this.responseId = castToId(value); // IdType 5513 else if (name.equals("sourceId")) 5514 this.sourceId = castToId(value); // IdType 5515 else if (name.equals("targetId")) 5516 this.targetId = castToId(value); // IdType 5517 else if (name.equals("url")) 5518 this.url = castToString(value); // StringType 5519 else 5520 super.setProperty(name, value); 5521 } 5522 5523 @Override 5524 public Base makeProperty(int hash, String name) throws FHIRException { 5525 switch (hash) { 5526 case 3575610: return getType(); // Coding 5527 case -341064690: throw new FHIRException("Cannot make property resource as it is not a complex type"); // CodeType 5528 case 102727412: throw new FHIRException("Cannot make property label as it is not a complex type"); // StringType 5529 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 5530 case -1423461112: throw new FHIRException("Cannot make property accept as it is not a complex type"); // Enumeration<ContentType> 5531 case -389131437: throw new FHIRException("Cannot make property contentType as it is not a complex type"); // Enumeration<ContentType> 5532 case -1429847026: throw new FHIRException("Cannot make property destination as it is not a complex type"); // IntegerType 5533 case -1760554218: throw new FHIRException("Cannot make property encodeRequestUrl as it is not a complex type"); // BooleanType 5534 case -1008619738: throw new FHIRException("Cannot make property origin as it is not a complex type"); // IntegerType 5535 case -995427962: throw new FHIRException("Cannot make property params as it is not a complex type"); // StringType 5536 case 1074158076: return addRequestHeader(); // SetupActionOperationRequestHeaderComponent 5537 case -633138884: throw new FHIRException("Cannot make property responseId as it is not a complex type"); // IdType 5538 case 1746327190: throw new FHIRException("Cannot make property sourceId as it is not a complex type"); // IdType 5539 case -441951604: throw new FHIRException("Cannot make property targetId as it is not a complex type"); // IdType 5540 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // StringType 5541 default: return super.makeProperty(hash, name); 5542 } 5543 5544 } 5545 5546 @Override 5547 public Base addChild(String name) throws FHIRException { 5548 if (name.equals("type")) { 5549 this.type = new Coding(); 5550 return this.type; 5551 } 5552 else if (name.equals("resource")) { 5553 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 5554 } 5555 else if (name.equals("label")) { 5556 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 5557 } 5558 else if (name.equals("description")) { 5559 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 5560 } 5561 else if (name.equals("accept")) { 5562 throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept"); 5563 } 5564 else if (name.equals("contentType")) { 5565 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 5566 } 5567 else if (name.equals("destination")) { 5568 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 5569 } 5570 else if (name.equals("encodeRequestUrl")) { 5571 throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl"); 5572 } 5573 else if (name.equals("origin")) { 5574 throw new FHIRException("Cannot call addChild on a primitive type TestScript.origin"); 5575 } 5576 else if (name.equals("params")) { 5577 throw new FHIRException("Cannot call addChild on a primitive type TestScript.params"); 5578 } 5579 else if (name.equals("requestHeader")) { 5580 return addRequestHeader(); 5581 } 5582 else if (name.equals("responseId")) { 5583 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId"); 5584 } 5585 else if (name.equals("sourceId")) { 5586 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 5587 } 5588 else if (name.equals("targetId")) { 5589 throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId"); 5590 } 5591 else if (name.equals("url")) { 5592 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 5593 } 5594 else 5595 return super.addChild(name); 5596 } 5597 5598 public SetupActionOperationComponent copy() { 5599 SetupActionOperationComponent dst = new SetupActionOperationComponent(); 5600 copyValues(dst); 5601 dst.type = type == null ? null : type.copy(); 5602 dst.resource = resource == null ? null : resource.copy(); 5603 dst.label = label == null ? null : label.copy(); 5604 dst.description = description == null ? null : description.copy(); 5605 dst.accept = accept == null ? null : accept.copy(); 5606 dst.contentType = contentType == null ? null : contentType.copy(); 5607 dst.destination = destination == null ? null : destination.copy(); 5608 dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy(); 5609 dst.origin = origin == null ? null : origin.copy(); 5610 dst.params = params == null ? null : params.copy(); 5611 if (requestHeader != null) { 5612 dst.requestHeader = new ArrayList<SetupActionOperationRequestHeaderComponent>(); 5613 for (SetupActionOperationRequestHeaderComponent i : requestHeader) 5614 dst.requestHeader.add(i.copy()); 5615 }; 5616 dst.responseId = responseId == null ? null : responseId.copy(); 5617 dst.sourceId = sourceId == null ? null : sourceId.copy(); 5618 dst.targetId = targetId == null ? null : targetId.copy(); 5619 dst.url = url == null ? null : url.copy(); 5620 return dst; 5621 } 5622 5623 @Override 5624 public boolean equalsDeep(Base other) { 5625 if (!super.equalsDeep(other)) 5626 return false; 5627 if (!(other instanceof SetupActionOperationComponent)) 5628 return false; 5629 SetupActionOperationComponent o = (SetupActionOperationComponent) other; 5630 return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true) 5631 && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true) 5632 && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true) 5633 && compareDeep(origin, o.origin, true) && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true) 5634 && compareDeep(responseId, o.responseId, true) && compareDeep(sourceId, o.sourceId, true) && compareDeep(targetId, o.targetId, true) 5635 && compareDeep(url, o.url, true); 5636 } 5637 5638 @Override 5639 public boolean equalsShallow(Base other) { 5640 if (!super.equalsShallow(other)) 5641 return false; 5642 if (!(other instanceof SetupActionOperationComponent)) 5643 return false; 5644 SetupActionOperationComponent o = (SetupActionOperationComponent) other; 5645 return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true) 5646 && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true) 5647 && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(origin, o.origin, true) 5648 && compareValues(params, o.params, true) && compareValues(responseId, o.responseId, true) && compareValues(sourceId, o.sourceId, true) 5649 && compareValues(targetId, o.targetId, true) && compareValues(url, o.url, true); 5650 } 5651 5652 public boolean isEmpty() { 5653 return super.isEmpty() && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) 5654 && (label == null || label.isEmpty()) && (description == null || description.isEmpty()) && (accept == null || accept.isEmpty()) 5655 && (contentType == null || contentType.isEmpty()) && (destination == null || destination.isEmpty()) 5656 && (encodeRequestUrl == null || encodeRequestUrl.isEmpty()) && (origin == null || origin.isEmpty()) 5657 && (params == null || params.isEmpty()) && (requestHeader == null || requestHeader.isEmpty()) 5658 && (responseId == null || responseId.isEmpty()) && (sourceId == null || sourceId.isEmpty()) 5659 && (targetId == null || targetId.isEmpty()) && (url == null || url.isEmpty()); 5660 } 5661 5662 public String fhirType() { 5663 return "TestScript.setup.action.operation"; 5664 5665 } 5666 5667 } 5668 5669 @Block() 5670 public static class SetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement { 5671 /** 5672 * The HTTP header field e.g. "Accept". 5673 */ 5674 @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 5675 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." ) 5676 protected StringType field; 5677 5678 /** 5679 * The value of the header e.g. "application/xml". 5680 */ 5681 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 5682 @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/xml\"." ) 5683 protected StringType value; 5684 5685 private static final long serialVersionUID = 274395337L; 5686 5687 /** 5688 * Constructor 5689 */ 5690 public SetupActionOperationRequestHeaderComponent() { 5691 super(); 5692 } 5693 5694 /** 5695 * Constructor 5696 */ 5697 public SetupActionOperationRequestHeaderComponent(StringType field, StringType value) { 5698 super(); 5699 this.field = field; 5700 this.value = value; 5701 } 5702 5703 /** 5704 * @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 5705 */ 5706 public StringType getFieldElement() { 5707 if (this.field == null) 5708 if (Configuration.errorOnAutoCreate()) 5709 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.field"); 5710 else if (Configuration.doAutoCreate()) 5711 this.field = new StringType(); // bb 5712 return this.field; 5713 } 5714 5715 public boolean hasFieldElement() { 5716 return this.field != null && !this.field.isEmpty(); 5717 } 5718 5719 public boolean hasField() { 5720 return this.field != null && !this.field.isEmpty(); 5721 } 5722 5723 /** 5724 * @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 5725 */ 5726 public SetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 5727 this.field = value; 5728 return this; 5729 } 5730 5731 /** 5732 * @return The HTTP header field e.g. "Accept". 5733 */ 5734 public String getField() { 5735 return this.field == null ? null : this.field.getValue(); 5736 } 5737 5738 /** 5739 * @param value The HTTP header field e.g. "Accept". 5740 */ 5741 public SetupActionOperationRequestHeaderComponent setField(String value) { 5742 if (this.field == null) 5743 this.field = new StringType(); 5744 this.field.setValue(value); 5745 return this; 5746 } 5747 5748 /** 5749 * @return {@link #value} (The value of the header e.g. "application/xml".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 5750 */ 5751 public StringType getValueElement() { 5752 if (this.value == null) 5753 if (Configuration.errorOnAutoCreate()) 5754 throw new Error("Attempt to auto-create SetupActionOperationRequestHeaderComponent.value"); 5755 else if (Configuration.doAutoCreate()) 5756 this.value = new StringType(); // bb 5757 return this.value; 5758 } 5759 5760 public boolean hasValueElement() { 5761 return this.value != null && !this.value.isEmpty(); 5762 } 5763 5764 public boolean hasValue() { 5765 return this.value != null && !this.value.isEmpty(); 5766 } 5767 5768 /** 5769 * @param value {@link #value} (The value of the header e.g. "application/xml".). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 5770 */ 5771 public SetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 5772 this.value = value; 5773 return this; 5774 } 5775 5776 /** 5777 * @return The value of the header e.g. "application/xml". 5778 */ 5779 public String getValue() { 5780 return this.value == null ? null : this.value.getValue(); 5781 } 5782 5783 /** 5784 * @param value The value of the header e.g. "application/xml". 5785 */ 5786 public SetupActionOperationRequestHeaderComponent setValue(String value) { 5787 if (this.value == null) 5788 this.value = new StringType(); 5789 this.value.setValue(value); 5790 return this; 5791 } 5792 5793 protected void listChildren(List<Property> childrenList) { 5794 super.listChildren(childrenList); 5795 childrenList.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, java.lang.Integer.MAX_VALUE, field)); 5796 childrenList.add(new Property("value", "string", "The value of the header e.g. \"application/xml\".", 0, java.lang.Integer.MAX_VALUE, value)); 5797 } 5798 5799 @Override 5800 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5801 switch (hash) { 5802 case 97427706: /*field*/ return this.field == null ? new Base[0] : new Base[] {this.field}; // StringType 5803 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 5804 default: return super.getProperty(hash, name, checkValid); 5805 } 5806 5807 } 5808 5809 @Override 5810 public void setProperty(int hash, String name, Base value) throws FHIRException { 5811 switch (hash) { 5812 case 97427706: // field 5813 this.field = castToString(value); // StringType 5814 break; 5815 case 111972721: // value 5816 this.value = castToString(value); // StringType 5817 break; 5818 default: super.setProperty(hash, name, value); 5819 } 5820 5821 } 5822 5823 @Override 5824 public void setProperty(String name, Base value) throws FHIRException { 5825 if (name.equals("field")) 5826 this.field = castToString(value); // StringType 5827 else if (name.equals("value")) 5828 this.value = castToString(value); // StringType 5829 else 5830 super.setProperty(name, value); 5831 } 5832 5833 @Override 5834 public Base makeProperty(int hash, String name) throws FHIRException { 5835 switch (hash) { 5836 case 97427706: throw new FHIRException("Cannot make property field as it is not a complex type"); // StringType 5837 case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType 5838 default: return super.makeProperty(hash, name); 5839 } 5840 5841 } 5842 5843 @Override 5844 public Base addChild(String name) throws FHIRException { 5845 if (name.equals("field")) { 5846 throw new FHIRException("Cannot call addChild on a primitive type TestScript.field"); 5847 } 5848 else if (name.equals("value")) { 5849 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 5850 } 5851 else 5852 return super.addChild(name); 5853 } 5854 5855 public SetupActionOperationRequestHeaderComponent copy() { 5856 SetupActionOperationRequestHeaderComponent dst = new SetupActionOperationRequestHeaderComponent(); 5857 copyValues(dst); 5858 dst.field = field == null ? null : field.copy(); 5859 dst.value = value == null ? null : value.copy(); 5860 return dst; 5861 } 5862 5863 @Override 5864 public boolean equalsDeep(Base other) { 5865 if (!super.equalsDeep(other)) 5866 return false; 5867 if (!(other instanceof SetupActionOperationRequestHeaderComponent)) 5868 return false; 5869 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other; 5870 return compareDeep(field, o.field, true) && compareDeep(value, o.value, true); 5871 } 5872 5873 @Override 5874 public boolean equalsShallow(Base other) { 5875 if (!super.equalsShallow(other)) 5876 return false; 5877 if (!(other instanceof SetupActionOperationRequestHeaderComponent)) 5878 return false; 5879 SetupActionOperationRequestHeaderComponent o = (SetupActionOperationRequestHeaderComponent) other; 5880 return compareValues(field, o.field, true) && compareValues(value, o.value, true); 5881 } 5882 5883 public boolean isEmpty() { 5884 return super.isEmpty() && (field == null || field.isEmpty()) && (value == null || value.isEmpty()) 5885 ; 5886 } 5887 5888 public String fhirType() { 5889 return "TestScript.setup.action.operation.requestHeader"; 5890 5891 } 5892 5893 } 5894 5895 @Block() 5896 public static class SetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement { 5897 /** 5898 * The label would be used for tracking/logging purposes by test engines. 5899 */ 5900 @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 5901 @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 5902 protected StringType label; 5903 5904 /** 5905 * The description would be used by test engines for tracking and reporting purposes. 5906 */ 5907 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 5908 @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 5909 protected StringType description; 5910 5911 /** 5912 * The direction to use for the assertion. 5913 */ 5914 @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 5915 @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." ) 5916 protected Enumeration<AssertionDirectionType> direction; 5917 5918 /** 5919 * Id of fixture used to compare the "sourceId/path" evaluations to. 5920 */ 5921 @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 5922 @Description(shortDefinition="Id of fixture used to compare the \"sourceId/path\" evaluations to", formalDefinition="Id of fixture used to compare the \"sourceId/path\" evaluations to." ) 5923 protected StringType compareToSourceId; 5924 5925 /** 5926 * XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. 5927 */ 5928 @Child(name = "compareToSourcePath", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 5929 @Description(shortDefinition="XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to", formalDefinition="XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to." ) 5930 protected StringType compareToSourcePath; 5931 5932 /** 5933 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 5934 */ 5935 @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 5936 @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 5937 protected Enumeration<ContentType> contentType; 5938 5939 /** 5940 * The HTTP header field name e.g. 'Location'. 5941 */ 5942 @Child(name = "headerField", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 5943 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." ) 5944 protected StringType headerField; 5945 5946 /** 5947 * The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 5948 */ 5949 @Child(name = "minimumId", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 5950 @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." ) 5951 protected StringType minimumId; 5952 5953 /** 5954 * Whether or not the test execution performs validation on the bundle navigation links. 5955 */ 5956 @Child(name = "navigationLinks", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) 5957 @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." ) 5958 protected BooleanType navigationLinks; 5959 5960 /** 5961 * The operator type. 5962 */ 5963 @Child(name = "operator", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) 5964 @Description(shortDefinition="equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains", formalDefinition="The operator type." ) 5965 protected Enumeration<AssertionOperatorType> operator; 5966 5967 /** 5968 * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 5969 */ 5970 @Child(name = "path", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 5971 @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." ) 5972 protected StringType path; 5973 5974 /** 5975 * The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 5976 */ 5977 @Child(name = "resource", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) 5978 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://hl7-fhir.github.io/resourcelist.html." ) 5979 protected CodeType resource; 5980 5981 /** 5982 * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 5983 */ 5984 @Child(name = "response", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false) 5985 @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." ) 5986 protected Enumeration<AssertionResponseTypes> response; 5987 5988 /** 5989 * The value of the HTTP response code to be tested. 5990 */ 5991 @Child(name = "responseCode", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) 5992 @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." ) 5993 protected StringType responseCode; 5994 5995 /** 5996 * The TestScript.rule this assert will evaluate. 5997 */ 5998 @Child(name = "rule", type = {}, order=15, min=0, max=1, modifier=false, summary=false) 5999 @Description(shortDefinition="The reference to a TestScript.rule", formalDefinition="The TestScript.rule this assert will evaluate." ) 6000 protected SetupActionAssertRuleComponent rule; 6001 6002 /** 6003 * The TestScript.ruleset this assert will evaluate. 6004 */ 6005 @Child(name = "ruleset", type = {}, order=16, min=0, max=1, modifier=false, summary=false) 6006 @Description(shortDefinition="The reference to a TestScript.ruleset", formalDefinition="The TestScript.ruleset this assert will evaluate." ) 6007 protected SetupActionAssertRulesetComponent ruleset; 6008 6009 /** 6010 * Fixture to evaluate the XPath/JSONPath expression or the headerField against. 6011 */ 6012 @Child(name = "sourceId", type = {IdType.class}, order=17, min=0, max=1, modifier=false, summary=false) 6013 @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against." ) 6014 protected IdType sourceId; 6015 6016 /** 6017 * The ID of the Profile to validate against. 6018 */ 6019 @Child(name = "validateProfileId", type = {IdType.class}, order=18, min=0, max=1, modifier=false, summary=false) 6020 @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." ) 6021 protected IdType validateProfileId; 6022 6023 /** 6024 * The value to compare to. 6025 */ 6026 @Child(name = "value", type = {StringType.class}, order=19, min=0, max=1, modifier=false, summary=false) 6027 @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." ) 6028 protected StringType value; 6029 6030 /** 6031 * Whether or not the test execution will produce a warning only on error for this assert. 6032 */ 6033 @Child(name = "warningOnly", type = {BooleanType.class}, order=20, min=0, max=1, modifier=false, summary=false) 6034 @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." ) 6035 protected BooleanType warningOnly; 6036 6037 private static final long serialVersionUID = -561290310L; 6038 6039 /** 6040 * Constructor 6041 */ 6042 public SetupActionAssertComponent() { 6043 super(); 6044 } 6045 6046 /** 6047 * @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 6048 */ 6049 public StringType getLabelElement() { 6050 if (this.label == null) 6051 if (Configuration.errorOnAutoCreate()) 6052 throw new Error("Attempt to auto-create SetupActionAssertComponent.label"); 6053 else if (Configuration.doAutoCreate()) 6054 this.label = new StringType(); // bb 6055 return this.label; 6056 } 6057 6058 public boolean hasLabelElement() { 6059 return this.label != null && !this.label.isEmpty(); 6060 } 6061 6062 public boolean hasLabel() { 6063 return this.label != null && !this.label.isEmpty(); 6064 } 6065 6066 /** 6067 * @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 6068 */ 6069 public SetupActionAssertComponent setLabelElement(StringType value) { 6070 this.label = value; 6071 return this; 6072 } 6073 6074 /** 6075 * @return The label would be used for tracking/logging purposes by test engines. 6076 */ 6077 public String getLabel() { 6078 return this.label == null ? null : this.label.getValue(); 6079 } 6080 6081 /** 6082 * @param value The label would be used for tracking/logging purposes by test engines. 6083 */ 6084 public SetupActionAssertComponent setLabel(String value) { 6085 if (Utilities.noString(value)) 6086 this.label = null; 6087 else { 6088 if (this.label == null) 6089 this.label = new StringType(); 6090 this.label.setValue(value); 6091 } 6092 return this; 6093 } 6094 6095 /** 6096 * @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 6097 */ 6098 public StringType getDescriptionElement() { 6099 if (this.description == null) 6100 if (Configuration.errorOnAutoCreate()) 6101 throw new Error("Attempt to auto-create SetupActionAssertComponent.description"); 6102 else if (Configuration.doAutoCreate()) 6103 this.description = new StringType(); // bb 6104 return this.description; 6105 } 6106 6107 public boolean hasDescriptionElement() { 6108 return this.description != null && !this.description.isEmpty(); 6109 } 6110 6111 public boolean hasDescription() { 6112 return this.description != null && !this.description.isEmpty(); 6113 } 6114 6115 /** 6116 * @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 6117 */ 6118 public SetupActionAssertComponent setDescriptionElement(StringType value) { 6119 this.description = value; 6120 return this; 6121 } 6122 6123 /** 6124 * @return The description would be used by test engines for tracking and reporting purposes. 6125 */ 6126 public String getDescription() { 6127 return this.description == null ? null : this.description.getValue(); 6128 } 6129 6130 /** 6131 * @param value The description would be used by test engines for tracking and reporting purposes. 6132 */ 6133 public SetupActionAssertComponent setDescription(String value) { 6134 if (Utilities.noString(value)) 6135 this.description = null; 6136 else { 6137 if (this.description == null) 6138 this.description = new StringType(); 6139 this.description.setValue(value); 6140 } 6141 return this; 6142 } 6143 6144 /** 6145 * @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 6146 */ 6147 public Enumeration<AssertionDirectionType> getDirectionElement() { 6148 if (this.direction == null) 6149 if (Configuration.errorOnAutoCreate()) 6150 throw new Error("Attempt to auto-create SetupActionAssertComponent.direction"); 6151 else if (Configuration.doAutoCreate()) 6152 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb 6153 return this.direction; 6154 } 6155 6156 public boolean hasDirectionElement() { 6157 return this.direction != null && !this.direction.isEmpty(); 6158 } 6159 6160 public boolean hasDirection() { 6161 return this.direction != null && !this.direction.isEmpty(); 6162 } 6163 6164 /** 6165 * @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 6166 */ 6167 public SetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 6168 this.direction = value; 6169 return this; 6170 } 6171 6172 /** 6173 * @return The direction to use for the assertion. 6174 */ 6175 public AssertionDirectionType getDirection() { 6176 return this.direction == null ? null : this.direction.getValue(); 6177 } 6178 6179 /** 6180 * @param value The direction to use for the assertion. 6181 */ 6182 public SetupActionAssertComponent setDirection(AssertionDirectionType value) { 6183 if (value == null) 6184 this.direction = null; 6185 else { 6186 if (this.direction == null) 6187 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); 6188 this.direction.setValue(value); 6189 } 6190 return this; 6191 } 6192 6193 /** 6194 * @return {@link #compareToSourceId} (Id of fixture used to compare the "sourceId/path" evaluations to.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceId" gives direct access to the value 6195 */ 6196 public StringType getCompareToSourceIdElement() { 6197 if (this.compareToSourceId == null) 6198 if (Configuration.errorOnAutoCreate()) 6199 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourceId"); 6200 else if (Configuration.doAutoCreate()) 6201 this.compareToSourceId = new StringType(); // bb 6202 return this.compareToSourceId; 6203 } 6204 6205 public boolean hasCompareToSourceIdElement() { 6206 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 6207 } 6208 6209 public boolean hasCompareToSourceId() { 6210 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 6211 } 6212 6213 /** 6214 * @param value {@link #compareToSourceId} (Id of fixture used to compare the "sourceId/path" evaluations to.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourceId" gives direct access to the value 6215 */ 6216 public SetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 6217 this.compareToSourceId = value; 6218 return this; 6219 } 6220 6221 /** 6222 * @return Id of fixture used to compare the "sourceId/path" evaluations to. 6223 */ 6224 public String getCompareToSourceId() { 6225 return this.compareToSourceId == null ? null : this.compareToSourceId.getValue(); 6226 } 6227 6228 /** 6229 * @param value Id of fixture used to compare the "sourceId/path" evaluations to. 6230 */ 6231 public SetupActionAssertComponent setCompareToSourceId(String value) { 6232 if (Utilities.noString(value)) 6233 this.compareToSourceId = null; 6234 else { 6235 if (this.compareToSourceId == null) 6236 this.compareToSourceId = new StringType(); 6237 this.compareToSourceId.setValue(value); 6238 } 6239 return this; 6240 } 6241 6242 /** 6243 * @return {@link #compareToSourcePath} (XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourcePath" gives direct access to the value 6244 */ 6245 public StringType getCompareToSourcePathElement() { 6246 if (this.compareToSourcePath == null) 6247 if (Configuration.errorOnAutoCreate()) 6248 throw new Error("Attempt to auto-create SetupActionAssertComponent.compareToSourcePath"); 6249 else if (Configuration.doAutoCreate()) 6250 this.compareToSourcePath = new StringType(); // bb 6251 return this.compareToSourcePath; 6252 } 6253 6254 public boolean hasCompareToSourcePathElement() { 6255 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 6256 } 6257 6258 public boolean hasCompareToSourcePath() { 6259 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 6260 } 6261 6262 /** 6263 * @param value {@link #compareToSourcePath} (XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to.). This is the underlying object with id, value and extensions. The accessor "getCompareToSourcePath" gives direct access to the value 6264 */ 6265 public SetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 6266 this.compareToSourcePath = value; 6267 return this; 6268 } 6269 6270 /** 6271 * @return XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. 6272 */ 6273 public String getCompareToSourcePath() { 6274 return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue(); 6275 } 6276 6277 /** 6278 * @param value XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. 6279 */ 6280 public SetupActionAssertComponent setCompareToSourcePath(String value) { 6281 if (Utilities.noString(value)) 6282 this.compareToSourcePath = null; 6283 else { 6284 if (this.compareToSourcePath == null) 6285 this.compareToSourcePath = new StringType(); 6286 this.compareToSourcePath.setValue(value); 6287 } 6288 return this; 6289 } 6290 6291 /** 6292 * @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 6293 */ 6294 public Enumeration<ContentType> getContentTypeElement() { 6295 if (this.contentType == null) 6296 if (Configuration.errorOnAutoCreate()) 6297 throw new Error("Attempt to auto-create SetupActionAssertComponent.contentType"); 6298 else if (Configuration.doAutoCreate()) 6299 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 6300 return this.contentType; 6301 } 6302 6303 public boolean hasContentTypeElement() { 6304 return this.contentType != null && !this.contentType.isEmpty(); 6305 } 6306 6307 public boolean hasContentType() { 6308 return this.contentType != null && !this.contentType.isEmpty(); 6309 } 6310 6311 /** 6312 * @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 6313 */ 6314 public SetupActionAssertComponent setContentTypeElement(Enumeration<ContentType> value) { 6315 this.contentType = value; 6316 return this; 6317 } 6318 6319 /** 6320 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 6321 */ 6322 public ContentType getContentType() { 6323 return this.contentType == null ? null : this.contentType.getValue(); 6324 } 6325 6326 /** 6327 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 6328 */ 6329 public SetupActionAssertComponent setContentType(ContentType value) { 6330 if (value == null) 6331 this.contentType = null; 6332 else { 6333 if (this.contentType == null) 6334 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 6335 this.contentType.setValue(value); 6336 } 6337 return this; 6338 } 6339 6340 /** 6341 * @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 6342 */ 6343 public StringType getHeaderFieldElement() { 6344 if (this.headerField == null) 6345 if (Configuration.errorOnAutoCreate()) 6346 throw new Error("Attempt to auto-create SetupActionAssertComponent.headerField"); 6347 else if (Configuration.doAutoCreate()) 6348 this.headerField = new StringType(); // bb 6349 return this.headerField; 6350 } 6351 6352 public boolean hasHeaderFieldElement() { 6353 return this.headerField != null && !this.headerField.isEmpty(); 6354 } 6355 6356 public boolean hasHeaderField() { 6357 return this.headerField != null && !this.headerField.isEmpty(); 6358 } 6359 6360 /** 6361 * @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 6362 */ 6363 public SetupActionAssertComponent setHeaderFieldElement(StringType value) { 6364 this.headerField = value; 6365 return this; 6366 } 6367 6368 /** 6369 * @return The HTTP header field name e.g. 'Location'. 6370 */ 6371 public String getHeaderField() { 6372 return this.headerField == null ? null : this.headerField.getValue(); 6373 } 6374 6375 /** 6376 * @param value The HTTP header field name e.g. 'Location'. 6377 */ 6378 public SetupActionAssertComponent setHeaderField(String value) { 6379 if (Utilities.noString(value)) 6380 this.headerField = null; 6381 else { 6382 if (this.headerField == null) 6383 this.headerField = new StringType(); 6384 this.headerField.setValue(value); 6385 } 6386 return this; 6387 } 6388 6389 /** 6390 * @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 6391 */ 6392 public StringType getMinimumIdElement() { 6393 if (this.minimumId == null) 6394 if (Configuration.errorOnAutoCreate()) 6395 throw new Error("Attempt to auto-create SetupActionAssertComponent.minimumId"); 6396 else if (Configuration.doAutoCreate()) 6397 this.minimumId = new StringType(); // bb 6398 return this.minimumId; 6399 } 6400 6401 public boolean hasMinimumIdElement() { 6402 return this.minimumId != null && !this.minimumId.isEmpty(); 6403 } 6404 6405 public boolean hasMinimumId() { 6406 return this.minimumId != null && !this.minimumId.isEmpty(); 6407 } 6408 6409 /** 6410 * @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 6411 */ 6412 public SetupActionAssertComponent setMinimumIdElement(StringType value) { 6413 this.minimumId = value; 6414 return this; 6415 } 6416 6417 /** 6418 * @return The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 6419 */ 6420 public String getMinimumId() { 6421 return this.minimumId == null ? null : this.minimumId.getValue(); 6422 } 6423 6424 /** 6425 * @param value The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId. 6426 */ 6427 public SetupActionAssertComponent setMinimumId(String value) { 6428 if (Utilities.noString(value)) 6429 this.minimumId = null; 6430 else { 6431 if (this.minimumId == null) 6432 this.minimumId = new StringType(); 6433 this.minimumId.setValue(value); 6434 } 6435 return this; 6436 } 6437 6438 /** 6439 * @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 6440 */ 6441 public BooleanType getNavigationLinksElement() { 6442 if (this.navigationLinks == null) 6443 if (Configuration.errorOnAutoCreate()) 6444 throw new Error("Attempt to auto-create SetupActionAssertComponent.navigationLinks"); 6445 else if (Configuration.doAutoCreate()) 6446 this.navigationLinks = new BooleanType(); // bb 6447 return this.navigationLinks; 6448 } 6449 6450 public boolean hasNavigationLinksElement() { 6451 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 6452 } 6453 6454 public boolean hasNavigationLinks() { 6455 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 6456 } 6457 6458 /** 6459 * @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 6460 */ 6461 public SetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 6462 this.navigationLinks = value; 6463 return this; 6464 } 6465 6466 /** 6467 * @return Whether or not the test execution performs validation on the bundle navigation links. 6468 */ 6469 public boolean getNavigationLinks() { 6470 return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue(); 6471 } 6472 6473 /** 6474 * @param value Whether or not the test execution performs validation on the bundle navigation links. 6475 */ 6476 public SetupActionAssertComponent setNavigationLinks(boolean value) { 6477 if (this.navigationLinks == null) 6478 this.navigationLinks = new BooleanType(); 6479 this.navigationLinks.setValue(value); 6480 return this; 6481 } 6482 6483 /** 6484 * @return {@link #operator} (The operator type.). This is the underlying object with id, value and extensions. The accessor "getOperator" gives direct access to the value 6485 */ 6486 public Enumeration<AssertionOperatorType> getOperatorElement() { 6487 if (this.operator == null) 6488 if (Configuration.errorOnAutoCreate()) 6489 throw new Error("Attempt to auto-create SetupActionAssertComponent.operator"); 6490 else if (Configuration.doAutoCreate()) 6491 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb 6492 return this.operator; 6493 } 6494 6495 public boolean hasOperatorElement() { 6496 return this.operator != null && !this.operator.isEmpty(); 6497 } 6498 6499 public boolean hasOperator() { 6500 return this.operator != null && !this.operator.isEmpty(); 6501 } 6502 6503 /** 6504 * @param value {@link #operator} (The operator type.). This is the underlying object with id, value and extensions. The accessor "getOperator" gives direct access to the value 6505 */ 6506 public SetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 6507 this.operator = value; 6508 return this; 6509 } 6510 6511 /** 6512 * @return The operator type. 6513 */ 6514 public AssertionOperatorType getOperator() { 6515 return this.operator == null ? null : this.operator.getValue(); 6516 } 6517 6518 /** 6519 * @param value The operator type. 6520 */ 6521 public SetupActionAssertComponent setOperator(AssertionOperatorType value) { 6522 if (value == null) 6523 this.operator = null; 6524 else { 6525 if (this.operator == null) 6526 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); 6527 this.operator.setValue(value); 6528 } 6529 return this; 6530 } 6531 6532 /** 6533 * @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 6534 */ 6535 public StringType getPathElement() { 6536 if (this.path == null) 6537 if (Configuration.errorOnAutoCreate()) 6538 throw new Error("Attempt to auto-create SetupActionAssertComponent.path"); 6539 else if (Configuration.doAutoCreate()) 6540 this.path = new StringType(); // bb 6541 return this.path; 6542 } 6543 6544 public boolean hasPathElement() { 6545 return this.path != null && !this.path.isEmpty(); 6546 } 6547 6548 public boolean hasPath() { 6549 return this.path != null && !this.path.isEmpty(); 6550 } 6551 6552 /** 6553 * @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 6554 */ 6555 public SetupActionAssertComponent setPathElement(StringType value) { 6556 this.path = value; 6557 return this; 6558 } 6559 6560 /** 6561 * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 6562 */ 6563 public String getPath() { 6564 return this.path == null ? null : this.path.getValue(); 6565 } 6566 6567 /** 6568 * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 6569 */ 6570 public SetupActionAssertComponent setPath(String value) { 6571 if (Utilities.noString(value)) 6572 this.path = null; 6573 else { 6574 if (this.path == null) 6575 this.path = new StringType(); 6576 this.path.setValue(value); 6577 } 6578 return this; 6579 } 6580 6581 /** 6582 * @return {@link #resource} (The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 6583 */ 6584 public CodeType getResourceElement() { 6585 if (this.resource == null) 6586 if (Configuration.errorOnAutoCreate()) 6587 throw new Error("Attempt to auto-create SetupActionAssertComponent.resource"); 6588 else if (Configuration.doAutoCreate()) 6589 this.resource = new CodeType(); // bb 6590 return this.resource; 6591 } 6592 6593 public boolean hasResourceElement() { 6594 return this.resource != null && !this.resource.isEmpty(); 6595 } 6596 6597 public boolean hasResource() { 6598 return this.resource != null && !this.resource.isEmpty(); 6599 } 6600 6601 /** 6602 * @param value {@link #resource} (The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.). This is the underlying object with id, value and extensions. The accessor "getResource" gives direct access to the value 6603 */ 6604 public SetupActionAssertComponent setResourceElement(CodeType value) { 6605 this.resource = value; 6606 return this; 6607 } 6608 6609 /** 6610 * @return The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 6611 */ 6612 public String getResource() { 6613 return this.resource == null ? null : this.resource.getValue(); 6614 } 6615 6616 /** 6617 * @param value The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 6618 */ 6619 public SetupActionAssertComponent setResource(String value) { 6620 if (Utilities.noString(value)) 6621 this.resource = null; 6622 else { 6623 if (this.resource == null) 6624 this.resource = new CodeType(); 6625 this.resource.setValue(value); 6626 } 6627 return this; 6628 } 6629 6630 /** 6631 * @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 6632 */ 6633 public Enumeration<AssertionResponseTypes> getResponseElement() { 6634 if (this.response == null) 6635 if (Configuration.errorOnAutoCreate()) 6636 throw new Error("Attempt to auto-create SetupActionAssertComponent.response"); 6637 else if (Configuration.doAutoCreate()) 6638 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb 6639 return this.response; 6640 } 6641 6642 public boolean hasResponseElement() { 6643 return this.response != null && !this.response.isEmpty(); 6644 } 6645 6646 public boolean hasResponse() { 6647 return this.response != null && !this.response.isEmpty(); 6648 } 6649 6650 /** 6651 * @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 6652 */ 6653 public SetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 6654 this.response = value; 6655 return this; 6656 } 6657 6658 /** 6659 * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 6660 */ 6661 public AssertionResponseTypes getResponse() { 6662 return this.response == null ? null : this.response.getValue(); 6663 } 6664 6665 /** 6666 * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 6667 */ 6668 public SetupActionAssertComponent setResponse(AssertionResponseTypes value) { 6669 if (value == null) 6670 this.response = null; 6671 else { 6672 if (this.response == null) 6673 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); 6674 this.response.setValue(value); 6675 } 6676 return this; 6677 } 6678 6679 /** 6680 * @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 6681 */ 6682 public StringType getResponseCodeElement() { 6683 if (this.responseCode == null) 6684 if (Configuration.errorOnAutoCreate()) 6685 throw new Error("Attempt to auto-create SetupActionAssertComponent.responseCode"); 6686 else if (Configuration.doAutoCreate()) 6687 this.responseCode = new StringType(); // bb 6688 return this.responseCode; 6689 } 6690 6691 public boolean hasResponseCodeElement() { 6692 return this.responseCode != null && !this.responseCode.isEmpty(); 6693 } 6694 6695 public boolean hasResponseCode() { 6696 return this.responseCode != null && !this.responseCode.isEmpty(); 6697 } 6698 6699 /** 6700 * @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 6701 */ 6702 public SetupActionAssertComponent setResponseCodeElement(StringType value) { 6703 this.responseCode = value; 6704 return this; 6705 } 6706 6707 /** 6708 * @return The value of the HTTP response code to be tested. 6709 */ 6710 public String getResponseCode() { 6711 return this.responseCode == null ? null : this.responseCode.getValue(); 6712 } 6713 6714 /** 6715 * @param value The value of the HTTP response code to be tested. 6716 */ 6717 public SetupActionAssertComponent setResponseCode(String value) { 6718 if (Utilities.noString(value)) 6719 this.responseCode = null; 6720 else { 6721 if (this.responseCode == null) 6722 this.responseCode = new StringType(); 6723 this.responseCode.setValue(value); 6724 } 6725 return this; 6726 } 6727 6728 /** 6729 * @return {@link #rule} (The TestScript.rule this assert will evaluate.) 6730 */ 6731 public SetupActionAssertRuleComponent getRule() { 6732 if (this.rule == null) 6733 if (Configuration.errorOnAutoCreate()) 6734 throw new Error("Attempt to auto-create SetupActionAssertComponent.rule"); 6735 else if (Configuration.doAutoCreate()) 6736 this.rule = new SetupActionAssertRuleComponent(); // cc 6737 return this.rule; 6738 } 6739 6740 public boolean hasRule() { 6741 return this.rule != null && !this.rule.isEmpty(); 6742 } 6743 6744 /** 6745 * @param value {@link #rule} (The TestScript.rule this assert will evaluate.) 6746 */ 6747 public SetupActionAssertComponent setRule(SetupActionAssertRuleComponent value) { 6748 this.rule = value; 6749 return this; 6750 } 6751 6752 /** 6753 * @return {@link #ruleset} (The TestScript.ruleset this assert will evaluate.) 6754 */ 6755 public SetupActionAssertRulesetComponent getRuleset() { 6756 if (this.ruleset == null) 6757 if (Configuration.errorOnAutoCreate()) 6758 throw new Error("Attempt to auto-create SetupActionAssertComponent.ruleset"); 6759 else if (Configuration.doAutoCreate()) 6760 this.ruleset = new SetupActionAssertRulesetComponent(); // cc 6761 return this.ruleset; 6762 } 6763 6764 public boolean hasRuleset() { 6765 return this.ruleset != null && !this.ruleset.isEmpty(); 6766 } 6767 6768 /** 6769 * @param value {@link #ruleset} (The TestScript.ruleset this assert will evaluate.) 6770 */ 6771 public SetupActionAssertComponent setRuleset(SetupActionAssertRulesetComponent value) { 6772 this.ruleset = value; 6773 return this; 6774 } 6775 6776 /** 6777 * @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 6778 */ 6779 public IdType getSourceIdElement() { 6780 if (this.sourceId == null) 6781 if (Configuration.errorOnAutoCreate()) 6782 throw new Error("Attempt to auto-create SetupActionAssertComponent.sourceId"); 6783 else if (Configuration.doAutoCreate()) 6784 this.sourceId = new IdType(); // bb 6785 return this.sourceId; 6786 } 6787 6788 public boolean hasSourceIdElement() { 6789 return this.sourceId != null && !this.sourceId.isEmpty(); 6790 } 6791 6792 public boolean hasSourceId() { 6793 return this.sourceId != null && !this.sourceId.isEmpty(); 6794 } 6795 6796 /** 6797 * @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 6798 */ 6799 public SetupActionAssertComponent setSourceIdElement(IdType value) { 6800 this.sourceId = value; 6801 return this; 6802 } 6803 6804 /** 6805 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against. 6806 */ 6807 public String getSourceId() { 6808 return this.sourceId == null ? null : this.sourceId.getValue(); 6809 } 6810 6811 /** 6812 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against. 6813 */ 6814 public SetupActionAssertComponent setSourceId(String value) { 6815 if (Utilities.noString(value)) 6816 this.sourceId = null; 6817 else { 6818 if (this.sourceId == null) 6819 this.sourceId = new IdType(); 6820 this.sourceId.setValue(value); 6821 } 6822 return this; 6823 } 6824 6825 /** 6826 * @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 6827 */ 6828 public IdType getValidateProfileIdElement() { 6829 if (this.validateProfileId == null) 6830 if (Configuration.errorOnAutoCreate()) 6831 throw new Error("Attempt to auto-create SetupActionAssertComponent.validateProfileId"); 6832 else if (Configuration.doAutoCreate()) 6833 this.validateProfileId = new IdType(); // bb 6834 return this.validateProfileId; 6835 } 6836 6837 public boolean hasValidateProfileIdElement() { 6838 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 6839 } 6840 6841 public boolean hasValidateProfileId() { 6842 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 6843 } 6844 6845 /** 6846 * @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 6847 */ 6848 public SetupActionAssertComponent setValidateProfileIdElement(IdType value) { 6849 this.validateProfileId = value; 6850 return this; 6851 } 6852 6853 /** 6854 * @return The ID of the Profile to validate against. 6855 */ 6856 public String getValidateProfileId() { 6857 return this.validateProfileId == null ? null : this.validateProfileId.getValue(); 6858 } 6859 6860 /** 6861 * @param value The ID of the Profile to validate against. 6862 */ 6863 public SetupActionAssertComponent setValidateProfileId(String value) { 6864 if (Utilities.noString(value)) 6865 this.validateProfileId = null; 6866 else { 6867 if (this.validateProfileId == null) 6868 this.validateProfileId = new IdType(); 6869 this.validateProfileId.setValue(value); 6870 } 6871 return this; 6872 } 6873 6874 /** 6875 * @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 6876 */ 6877 public StringType getValueElement() { 6878 if (this.value == null) 6879 if (Configuration.errorOnAutoCreate()) 6880 throw new Error("Attempt to auto-create SetupActionAssertComponent.value"); 6881 else if (Configuration.doAutoCreate()) 6882 this.value = new StringType(); // bb 6883 return this.value; 6884 } 6885 6886 public boolean hasValueElement() { 6887 return this.value != null && !this.value.isEmpty(); 6888 } 6889 6890 public boolean hasValue() { 6891 return this.value != null && !this.value.isEmpty(); 6892 } 6893 6894 /** 6895 * @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 6896 */ 6897 public SetupActionAssertComponent setValueElement(StringType value) { 6898 this.value = value; 6899 return this; 6900 } 6901 6902 /** 6903 * @return The value to compare to. 6904 */ 6905 public String getValue() { 6906 return this.value == null ? null : this.value.getValue(); 6907 } 6908 6909 /** 6910 * @param value The value to compare to. 6911 */ 6912 public SetupActionAssertComponent setValue(String value) { 6913 if (Utilities.noString(value)) 6914 this.value = null; 6915 else { 6916 if (this.value == null) 6917 this.value = new StringType(); 6918 this.value.setValue(value); 6919 } 6920 return this; 6921 } 6922 6923 /** 6924 * @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 6925 */ 6926 public BooleanType getWarningOnlyElement() { 6927 if (this.warningOnly == null) 6928 if (Configuration.errorOnAutoCreate()) 6929 throw new Error("Attempt to auto-create SetupActionAssertComponent.warningOnly"); 6930 else if (Configuration.doAutoCreate()) 6931 this.warningOnly = new BooleanType(); // bb 6932 return this.warningOnly; 6933 } 6934 6935 public boolean hasWarningOnlyElement() { 6936 return this.warningOnly != null && !this.warningOnly.isEmpty(); 6937 } 6938 6939 public boolean hasWarningOnly() { 6940 return this.warningOnly != null && !this.warningOnly.isEmpty(); 6941 } 6942 6943 /** 6944 * @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 6945 */ 6946 public SetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 6947 this.warningOnly = value; 6948 return this; 6949 } 6950 6951 /** 6952 * @return Whether or not the test execution will produce a warning only on error for this assert. 6953 */ 6954 public boolean getWarningOnly() { 6955 return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue(); 6956 } 6957 6958 /** 6959 * @param value Whether or not the test execution will produce a warning only on error for this assert. 6960 */ 6961 public SetupActionAssertComponent setWarningOnly(boolean value) { 6962 if (this.warningOnly == null) 6963 this.warningOnly = new BooleanType(); 6964 this.warningOnly.setValue(value); 6965 return this; 6966 } 6967 6968 protected void listChildren(List<Property> childrenList) { 6969 super.listChildren(childrenList); 6970 childrenList.add(new Property("label", "string", "The label would be used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, label)); 6971 childrenList.add(new Property("description", "string", "The description would be used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); 6972 childrenList.add(new Property("direction", "code", "The direction to use for the assertion.", 0, java.lang.Integer.MAX_VALUE, direction)); 6973 childrenList.add(new Property("compareToSourceId", "string", "Id of fixture used to compare the \"sourceId/path\" evaluations to.", 0, java.lang.Integer.MAX_VALUE, compareToSourceId)); 6974 childrenList.add(new Property("compareToSourcePath", "string", "XPath or JSONPath expression against fixture used to compare the \"sourceId/path\" evaluations to.", 0, java.lang.Integer.MAX_VALUE, compareToSourcePath)); 6975 childrenList.add(new Property("contentType", "code", "The content-type or mime-type to use for RESTful operation in the 'Content-Type' header.", 0, java.lang.Integer.MAX_VALUE, contentType)); 6976 childrenList.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, java.lang.Integer.MAX_VALUE, headerField)); 6977 childrenList.add(new Property("minimumId", "string", "The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.", 0, java.lang.Integer.MAX_VALUE, minimumId)); 6978 childrenList.add(new Property("navigationLinks", "boolean", "Whether or not the test execution performs validation on the bundle navigation links.", 0, java.lang.Integer.MAX_VALUE, navigationLinks)); 6979 childrenList.add(new Property("operator", "code", "The operator type.", 0, java.lang.Integer.MAX_VALUE, operator)); 6980 childrenList.add(new Property("path", "string", "The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.", 0, java.lang.Integer.MAX_VALUE, path)); 6981 childrenList.add(new Property("resource", "code", "The type of the resource. See http://hl7-fhir.github.io/resourcelist.html.", 0, java.lang.Integer.MAX_VALUE, resource)); 6982 childrenList.add(new Property("response", "code", "okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.", 0, java.lang.Integer.MAX_VALUE, response)); 6983 childrenList.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, java.lang.Integer.MAX_VALUE, responseCode)); 6984 childrenList.add(new Property("rule", "", "The TestScript.rule this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, rule)); 6985 childrenList.add(new Property("ruleset", "", "The TestScript.ruleset this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, ruleset)); 6986 childrenList.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, java.lang.Integer.MAX_VALUE, sourceId)); 6987 childrenList.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, java.lang.Integer.MAX_VALUE, validateProfileId)); 6988 childrenList.add(new Property("value", "string", "The value to compare to.", 0, java.lang.Integer.MAX_VALUE, value)); 6989 childrenList.add(new Property("warningOnly", "boolean", "Whether or not the test execution will produce a warning only on error for this assert.", 0, java.lang.Integer.MAX_VALUE, warningOnly)); 6990 } 6991 6992 @Override 6993 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 6994 switch (hash) { 6995 case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType 6996 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 6997 case -962590849: /*direction*/ return this.direction == null ? new Base[0] : new Base[] {this.direction}; // Enumeration<AssertionDirectionType> 6998 case 2081856758: /*compareToSourceId*/ return this.compareToSourceId == null ? new Base[0] : new Base[] {this.compareToSourceId}; // StringType 6999 case -790206144: /*compareToSourcePath*/ return this.compareToSourcePath == null ? new Base[0] : new Base[] {this.compareToSourcePath}; // StringType 7000 case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // Enumeration<ContentType> 7001 case 1160732269: /*headerField*/ return this.headerField == null ? new Base[0] : new Base[] {this.headerField}; // StringType 7002 case 818925001: /*minimumId*/ return this.minimumId == null ? new Base[0] : new Base[] {this.minimumId}; // StringType 7003 case 1001488901: /*navigationLinks*/ return this.navigationLinks == null ? new Base[0] : new Base[] {this.navigationLinks}; // BooleanType 7004 case -500553564: /*operator*/ return this.operator == null ? new Base[0] : new Base[] {this.operator}; // Enumeration<AssertionOperatorType> 7005 case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType 7006 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // CodeType 7007 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // Enumeration<AssertionResponseTypes> 7008 case 1438723534: /*responseCode*/ return this.responseCode == null ? new Base[0] : new Base[] {this.responseCode}; // StringType 7009 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : new Base[] {this.rule}; // SetupActionAssertRuleComponent 7010 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : new Base[] {this.ruleset}; // SetupActionAssertRulesetComponent 7011 case 1746327190: /*sourceId*/ return this.sourceId == null ? new Base[0] : new Base[] {this.sourceId}; // IdType 7012 case 1555541038: /*validateProfileId*/ return this.validateProfileId == null ? new Base[0] : new Base[] {this.validateProfileId}; // IdType 7013 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 7014 case -481159832: /*warningOnly*/ return this.warningOnly == null ? new Base[0] : new Base[] {this.warningOnly}; // BooleanType 7015 default: return super.getProperty(hash, name, checkValid); 7016 } 7017 7018 } 7019 7020 @Override 7021 public void setProperty(int hash, String name, Base value) throws FHIRException { 7022 switch (hash) { 7023 case 102727412: // label 7024 this.label = castToString(value); // StringType 7025 break; 7026 case -1724546052: // description 7027 this.description = castToString(value); // StringType 7028 break; 7029 case -962590849: // direction 7030 this.direction = new AssertionDirectionTypeEnumFactory().fromType(value); // Enumeration<AssertionDirectionType> 7031 break; 7032 case 2081856758: // compareToSourceId 7033 this.compareToSourceId = castToString(value); // StringType 7034 break; 7035 case -790206144: // compareToSourcePath 7036 this.compareToSourcePath = castToString(value); // StringType 7037 break; 7038 case -389131437: // contentType 7039 this.contentType = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 7040 break; 7041 case 1160732269: // headerField 7042 this.headerField = castToString(value); // StringType 7043 break; 7044 case 818925001: // minimumId 7045 this.minimumId = castToString(value); // StringType 7046 break; 7047 case 1001488901: // navigationLinks 7048 this.navigationLinks = castToBoolean(value); // BooleanType 7049 break; 7050 case -500553564: // operator 7051 this.operator = new AssertionOperatorTypeEnumFactory().fromType(value); // Enumeration<AssertionOperatorType> 7052 break; 7053 case 3433509: // path 7054 this.path = castToString(value); // StringType 7055 break; 7056 case -341064690: // resource 7057 this.resource = castToCode(value); // CodeType 7058 break; 7059 case -340323263: // response 7060 this.response = new AssertionResponseTypesEnumFactory().fromType(value); // Enumeration<AssertionResponseTypes> 7061 break; 7062 case 1438723534: // responseCode 7063 this.responseCode = castToString(value); // StringType 7064 break; 7065 case 3512060: // rule 7066 this.rule = (SetupActionAssertRuleComponent) value; // SetupActionAssertRuleComponent 7067 break; 7068 case 1548678118: // ruleset 7069 this.ruleset = (SetupActionAssertRulesetComponent) value; // SetupActionAssertRulesetComponent 7070 break; 7071 case 1746327190: // sourceId 7072 this.sourceId = castToId(value); // IdType 7073 break; 7074 case 1555541038: // validateProfileId 7075 this.validateProfileId = castToId(value); // IdType 7076 break; 7077 case 111972721: // value 7078 this.value = castToString(value); // StringType 7079 break; 7080 case -481159832: // warningOnly 7081 this.warningOnly = castToBoolean(value); // BooleanType 7082 break; 7083 default: super.setProperty(hash, name, value); 7084 } 7085 7086 } 7087 7088 @Override 7089 public void setProperty(String name, Base value) throws FHIRException { 7090 if (name.equals("label")) 7091 this.label = castToString(value); // StringType 7092 else if (name.equals("description")) 7093 this.description = castToString(value); // StringType 7094 else if (name.equals("direction")) 7095 this.direction = new AssertionDirectionTypeEnumFactory().fromType(value); // Enumeration<AssertionDirectionType> 7096 else if (name.equals("compareToSourceId")) 7097 this.compareToSourceId = castToString(value); // StringType 7098 else if (name.equals("compareToSourcePath")) 7099 this.compareToSourcePath = castToString(value); // StringType 7100 else if (name.equals("contentType")) 7101 this.contentType = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 7102 else if (name.equals("headerField")) 7103 this.headerField = castToString(value); // StringType 7104 else if (name.equals("minimumId")) 7105 this.minimumId = castToString(value); // StringType 7106 else if (name.equals("navigationLinks")) 7107 this.navigationLinks = castToBoolean(value); // BooleanType 7108 else if (name.equals("operator")) 7109 this.operator = new AssertionOperatorTypeEnumFactory().fromType(value); // Enumeration<AssertionOperatorType> 7110 else if (name.equals("path")) 7111 this.path = castToString(value); // StringType 7112 else if (name.equals("resource")) 7113 this.resource = castToCode(value); // CodeType 7114 else if (name.equals("response")) 7115 this.response = new AssertionResponseTypesEnumFactory().fromType(value); // Enumeration<AssertionResponseTypes> 7116 else if (name.equals("responseCode")) 7117 this.responseCode = castToString(value); // StringType 7118 else if (name.equals("rule")) 7119 this.rule = (SetupActionAssertRuleComponent) value; // SetupActionAssertRuleComponent 7120 else if (name.equals("ruleset")) 7121 this.ruleset = (SetupActionAssertRulesetComponent) value; // SetupActionAssertRulesetComponent 7122 else if (name.equals("sourceId")) 7123 this.sourceId = castToId(value); // IdType 7124 else if (name.equals("validateProfileId")) 7125 this.validateProfileId = castToId(value); // IdType 7126 else if (name.equals("value")) 7127 this.value = castToString(value); // StringType 7128 else if (name.equals("warningOnly")) 7129 this.warningOnly = castToBoolean(value); // BooleanType 7130 else 7131 super.setProperty(name, value); 7132 } 7133 7134 @Override 7135 public Base makeProperty(int hash, String name) throws FHIRException { 7136 switch (hash) { 7137 case 102727412: throw new FHIRException("Cannot make property label as it is not a complex type"); // StringType 7138 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 7139 case -962590849: throw new FHIRException("Cannot make property direction as it is not a complex type"); // Enumeration<AssertionDirectionType> 7140 case 2081856758: throw new FHIRException("Cannot make property compareToSourceId as it is not a complex type"); // StringType 7141 case -790206144: throw new FHIRException("Cannot make property compareToSourcePath as it is not a complex type"); // StringType 7142 case -389131437: throw new FHIRException("Cannot make property contentType as it is not a complex type"); // Enumeration<ContentType> 7143 case 1160732269: throw new FHIRException("Cannot make property headerField as it is not a complex type"); // StringType 7144 case 818925001: throw new FHIRException("Cannot make property minimumId as it is not a complex type"); // StringType 7145 case 1001488901: throw new FHIRException("Cannot make property navigationLinks as it is not a complex type"); // BooleanType 7146 case -500553564: throw new FHIRException("Cannot make property operator as it is not a complex type"); // Enumeration<AssertionOperatorType> 7147 case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType 7148 case -341064690: throw new FHIRException("Cannot make property resource as it is not a complex type"); // CodeType 7149 case -340323263: throw new FHIRException("Cannot make property response as it is not a complex type"); // Enumeration<AssertionResponseTypes> 7150 case 1438723534: throw new FHIRException("Cannot make property responseCode as it is not a complex type"); // StringType 7151 case 3512060: return getRule(); // SetupActionAssertRuleComponent 7152 case 1548678118: return getRuleset(); // SetupActionAssertRulesetComponent 7153 case 1746327190: throw new FHIRException("Cannot make property sourceId as it is not a complex type"); // IdType 7154 case 1555541038: throw new FHIRException("Cannot make property validateProfileId as it is not a complex type"); // IdType 7155 case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType 7156 case -481159832: throw new FHIRException("Cannot make property warningOnly as it is not a complex type"); // BooleanType 7157 default: return super.makeProperty(hash, name); 7158 } 7159 7160 } 7161 7162 @Override 7163 public Base addChild(String name) throws FHIRException { 7164 if (name.equals("label")) { 7165 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 7166 } 7167 else if (name.equals("description")) { 7168 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 7169 } 7170 else if (name.equals("direction")) { 7171 throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction"); 7172 } 7173 else if (name.equals("compareToSourceId")) { 7174 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId"); 7175 } 7176 else if (name.equals("compareToSourcePath")) { 7177 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath"); 7178 } 7179 else if (name.equals("contentType")) { 7180 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 7181 } 7182 else if (name.equals("headerField")) { 7183 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 7184 } 7185 else if (name.equals("minimumId")) { 7186 throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId"); 7187 } 7188 else if (name.equals("navigationLinks")) { 7189 throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks"); 7190 } 7191 else if (name.equals("operator")) { 7192 throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator"); 7193 } 7194 else if (name.equals("path")) { 7195 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 7196 } 7197 else if (name.equals("resource")) { 7198 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 7199 } 7200 else if (name.equals("response")) { 7201 throw new FHIRException("Cannot call addChild on a primitive type TestScript.response"); 7202 } 7203 else if (name.equals("responseCode")) { 7204 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode"); 7205 } 7206 else if (name.equals("rule")) { 7207 this.rule = new SetupActionAssertRuleComponent(); 7208 return this.rule; 7209 } 7210 else if (name.equals("ruleset")) { 7211 this.ruleset = new SetupActionAssertRulesetComponent(); 7212 return this.ruleset; 7213 } 7214 else if (name.equals("sourceId")) { 7215 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 7216 } 7217 else if (name.equals("validateProfileId")) { 7218 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId"); 7219 } 7220 else if (name.equals("value")) { 7221 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 7222 } 7223 else if (name.equals("warningOnly")) { 7224 throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly"); 7225 } 7226 else 7227 return super.addChild(name); 7228 } 7229 7230 public SetupActionAssertComponent copy() { 7231 SetupActionAssertComponent dst = new SetupActionAssertComponent(); 7232 copyValues(dst); 7233 dst.label = label == null ? null : label.copy(); 7234 dst.description = description == null ? null : description.copy(); 7235 dst.direction = direction == null ? null : direction.copy(); 7236 dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy(); 7237 dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy(); 7238 dst.contentType = contentType == null ? null : contentType.copy(); 7239 dst.headerField = headerField == null ? null : headerField.copy(); 7240 dst.minimumId = minimumId == null ? null : minimumId.copy(); 7241 dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy(); 7242 dst.operator = operator == null ? null : operator.copy(); 7243 dst.path = path == null ? null : path.copy(); 7244 dst.resource = resource == null ? null : resource.copy(); 7245 dst.response = response == null ? null : response.copy(); 7246 dst.responseCode = responseCode == null ? null : responseCode.copy(); 7247 dst.rule = rule == null ? null : rule.copy(); 7248 dst.ruleset = ruleset == null ? null : ruleset.copy(); 7249 dst.sourceId = sourceId == null ? null : sourceId.copy(); 7250 dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy(); 7251 dst.value = value == null ? null : value.copy(); 7252 dst.warningOnly = warningOnly == null ? null : warningOnly.copy(); 7253 return dst; 7254 } 7255 7256 @Override 7257 public boolean equalsDeep(Base other) { 7258 if (!super.equalsDeep(other)) 7259 return false; 7260 if (!(other instanceof SetupActionAssertComponent)) 7261 return false; 7262 SetupActionAssertComponent o = (SetupActionAssertComponent) other; 7263 return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true) 7264 && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourcePath, o.compareToSourcePath, true) 7265 && compareDeep(contentType, o.contentType, true) && compareDeep(headerField, o.headerField, true) 7266 && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true) 7267 && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(resource, o.resource, true) 7268 && compareDeep(response, o.response, true) && compareDeep(responseCode, o.responseCode, true) && compareDeep(rule, o.rule, true) 7269 && compareDeep(ruleset, o.ruleset, true) && compareDeep(sourceId, o.sourceId, true) && compareDeep(validateProfileId, o.validateProfileId, true) 7270 && compareDeep(value, o.value, true) && compareDeep(warningOnly, o.warningOnly, true); 7271 } 7272 7273 @Override 7274 public boolean equalsShallow(Base other) { 7275 if (!super.equalsShallow(other)) 7276 return false; 7277 if (!(other instanceof SetupActionAssertComponent)) 7278 return false; 7279 SetupActionAssertComponent o = (SetupActionAssertComponent) other; 7280 return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true) 7281 && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourcePath, o.compareToSourcePath, true) 7282 && compareValues(contentType, o.contentType, true) && compareValues(headerField, o.headerField, true) 7283 && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true) 7284 && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(resource, o.resource, true) 7285 && compareValues(response, o.response, true) && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) 7286 && compareValues(validateProfileId, o.validateProfileId, true) && compareValues(value, o.value, true) 7287 && compareValues(warningOnly, o.warningOnly, true); 7288 } 7289 7290 public boolean isEmpty() { 7291 return super.isEmpty() && (label == null || label.isEmpty()) && (description == null || description.isEmpty()) 7292 && (direction == null || direction.isEmpty()) && (compareToSourceId == null || compareToSourceId.isEmpty()) 7293 && (compareToSourcePath == null || compareToSourcePath.isEmpty()) && (contentType == null || contentType.isEmpty()) 7294 && (headerField == null || headerField.isEmpty()) && (minimumId == null || minimumId.isEmpty()) 7295 && (navigationLinks == null || navigationLinks.isEmpty()) && (operator == null || operator.isEmpty()) 7296 && (path == null || path.isEmpty()) && (resource == null || resource.isEmpty()) && (response == null || response.isEmpty()) 7297 && (responseCode == null || responseCode.isEmpty()) && (rule == null || rule.isEmpty()) && (ruleset == null || ruleset.isEmpty()) 7298 && (sourceId == null || sourceId.isEmpty()) && (validateProfileId == null || validateProfileId.isEmpty()) 7299 && (value == null || value.isEmpty()) && (warningOnly == null || warningOnly.isEmpty()); 7300 } 7301 7302 public String fhirType() { 7303 return "TestScript.setup.action.assert"; 7304 7305 } 7306 7307 } 7308 7309 @Block() 7310 public static class SetupActionAssertRuleComponent extends BackboneElement implements IBaseBackboneElement { 7311 /** 7312 * The TestScript.rule id value this assert will evaluate. 7313 */ 7314 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 7315 @Description(shortDefinition="Id of the TestScript.rule", formalDefinition="The TestScript.rule id value this assert will evaluate." ) 7316 protected IdType ruleId; 7317 7318 /** 7319 * Each rule template can take one or more parameters for rule evaluation. 7320 */ 7321 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7322 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 7323 protected List<SetupActionAssertRuleParamComponent> param; 7324 7325 private static final long serialVersionUID = -319928210L; 7326 7327 /** 7328 * Constructor 7329 */ 7330 public SetupActionAssertRuleComponent() { 7331 super(); 7332 } 7333 7334 /** 7335 * Constructor 7336 */ 7337 public SetupActionAssertRuleComponent(IdType ruleId) { 7338 super(); 7339 this.ruleId = ruleId; 7340 } 7341 7342 /** 7343 * @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 7344 */ 7345 public IdType getRuleIdElement() { 7346 if (this.ruleId == null) 7347 if (Configuration.errorOnAutoCreate()) 7348 throw new Error("Attempt to auto-create SetupActionAssertRuleComponent.ruleId"); 7349 else if (Configuration.doAutoCreate()) 7350 this.ruleId = new IdType(); // bb 7351 return this.ruleId; 7352 } 7353 7354 public boolean hasRuleIdElement() { 7355 return this.ruleId != null && !this.ruleId.isEmpty(); 7356 } 7357 7358 public boolean hasRuleId() { 7359 return this.ruleId != null && !this.ruleId.isEmpty(); 7360 } 7361 7362 /** 7363 * @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 7364 */ 7365 public SetupActionAssertRuleComponent setRuleIdElement(IdType value) { 7366 this.ruleId = value; 7367 return this; 7368 } 7369 7370 /** 7371 * @return The TestScript.rule id value this assert will evaluate. 7372 */ 7373 public String getRuleId() { 7374 return this.ruleId == null ? null : this.ruleId.getValue(); 7375 } 7376 7377 /** 7378 * @param value The TestScript.rule id value this assert will evaluate. 7379 */ 7380 public SetupActionAssertRuleComponent setRuleId(String value) { 7381 if (this.ruleId == null) 7382 this.ruleId = new IdType(); 7383 this.ruleId.setValue(value); 7384 return this; 7385 } 7386 7387 /** 7388 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 7389 */ 7390 public List<SetupActionAssertRuleParamComponent> getParam() { 7391 if (this.param == null) 7392 this.param = new ArrayList<SetupActionAssertRuleParamComponent>(); 7393 return this.param; 7394 } 7395 7396 public boolean hasParam() { 7397 if (this.param == null) 7398 return false; 7399 for (SetupActionAssertRuleParamComponent item : this.param) 7400 if (!item.isEmpty()) 7401 return true; 7402 return false; 7403 } 7404 7405 /** 7406 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 7407 */ 7408 // syntactic sugar 7409 public SetupActionAssertRuleParamComponent addParam() { //3 7410 SetupActionAssertRuleParamComponent t = new SetupActionAssertRuleParamComponent(); 7411 if (this.param == null) 7412 this.param = new ArrayList<SetupActionAssertRuleParamComponent>(); 7413 this.param.add(t); 7414 return t; 7415 } 7416 7417 // syntactic sugar 7418 public SetupActionAssertRuleComponent addParam(SetupActionAssertRuleParamComponent t) { //3 7419 if (t == null) 7420 return this; 7421 if (this.param == null) 7422 this.param = new ArrayList<SetupActionAssertRuleParamComponent>(); 7423 this.param.add(t); 7424 return this; 7425 } 7426 7427 protected void listChildren(List<Property> childrenList) { 7428 super.listChildren(childrenList); 7429 childrenList.add(new Property("ruleId", "id", "The TestScript.rule id value this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, ruleId)); 7430 childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 7431 } 7432 7433 @Override 7434 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7435 switch (hash) { 7436 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 7437 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // SetupActionAssertRuleParamComponent 7438 default: return super.getProperty(hash, name, checkValid); 7439 } 7440 7441 } 7442 7443 @Override 7444 public void setProperty(int hash, String name, Base value) throws FHIRException { 7445 switch (hash) { 7446 case -919875273: // ruleId 7447 this.ruleId = castToId(value); // IdType 7448 break; 7449 case 106436749: // param 7450 this.getParam().add((SetupActionAssertRuleParamComponent) value); // SetupActionAssertRuleParamComponent 7451 break; 7452 default: super.setProperty(hash, name, value); 7453 } 7454 7455 } 7456 7457 @Override 7458 public void setProperty(String name, Base value) throws FHIRException { 7459 if (name.equals("ruleId")) 7460 this.ruleId = castToId(value); // IdType 7461 else if (name.equals("param")) 7462 this.getParam().add((SetupActionAssertRuleParamComponent) value); 7463 else 7464 super.setProperty(name, value); 7465 } 7466 7467 @Override 7468 public Base makeProperty(int hash, String name) throws FHIRException { 7469 switch (hash) { 7470 case -919875273: throw new FHIRException("Cannot make property ruleId as it is not a complex type"); // IdType 7471 case 106436749: return addParam(); // SetupActionAssertRuleParamComponent 7472 default: return super.makeProperty(hash, name); 7473 } 7474 7475 } 7476 7477 @Override 7478 public Base addChild(String name) throws FHIRException { 7479 if (name.equals("ruleId")) { 7480 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 7481 } 7482 else if (name.equals("param")) { 7483 return addParam(); 7484 } 7485 else 7486 return super.addChild(name); 7487 } 7488 7489 public SetupActionAssertRuleComponent copy() { 7490 SetupActionAssertRuleComponent dst = new SetupActionAssertRuleComponent(); 7491 copyValues(dst); 7492 dst.ruleId = ruleId == null ? null : ruleId.copy(); 7493 if (param != null) { 7494 dst.param = new ArrayList<SetupActionAssertRuleParamComponent>(); 7495 for (SetupActionAssertRuleParamComponent i : param) 7496 dst.param.add(i.copy()); 7497 }; 7498 return dst; 7499 } 7500 7501 @Override 7502 public boolean equalsDeep(Base other) { 7503 if (!super.equalsDeep(other)) 7504 return false; 7505 if (!(other instanceof SetupActionAssertRuleComponent)) 7506 return false; 7507 SetupActionAssertRuleComponent o = (SetupActionAssertRuleComponent) other; 7508 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 7509 } 7510 7511 @Override 7512 public boolean equalsShallow(Base other) { 7513 if (!super.equalsShallow(other)) 7514 return false; 7515 if (!(other instanceof SetupActionAssertRuleComponent)) 7516 return false; 7517 SetupActionAssertRuleComponent o = (SetupActionAssertRuleComponent) other; 7518 return compareValues(ruleId, o.ruleId, true); 7519 } 7520 7521 public boolean isEmpty() { 7522 return super.isEmpty() && (ruleId == null || ruleId.isEmpty()) && (param == null || param.isEmpty()) 7523 ; 7524 } 7525 7526 public String fhirType() { 7527 return "TestScript.setup.action.assert.rule"; 7528 7529 } 7530 7531 } 7532 7533 @Block() 7534 public static class SetupActionAssertRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 7535 /** 7536 * Descriptive name for this parameter that matches the external assert rule parameter name. 7537 */ 7538 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 7539 @Description(shortDefinition="Parameter name matching external assert rule parameter", formalDefinition="Descriptive name for this parameter that matches the external assert rule parameter name." ) 7540 protected StringType name; 7541 7542 /** 7543 * The value for the parameter that will be passed on to the external rule template. 7544 */ 7545 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 7546 @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." ) 7547 protected StringType value; 7548 7549 private static final long serialVersionUID = 395259392L; 7550 7551 /** 7552 * Constructor 7553 */ 7554 public SetupActionAssertRuleParamComponent() { 7555 super(); 7556 } 7557 7558 /** 7559 * Constructor 7560 */ 7561 public SetupActionAssertRuleParamComponent(StringType name, StringType value) { 7562 super(); 7563 this.name = name; 7564 this.value = value; 7565 } 7566 7567 /** 7568 * @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 7569 */ 7570 public StringType getNameElement() { 7571 if (this.name == null) 7572 if (Configuration.errorOnAutoCreate()) 7573 throw new Error("Attempt to auto-create SetupActionAssertRuleParamComponent.name"); 7574 else if (Configuration.doAutoCreate()) 7575 this.name = new StringType(); // bb 7576 return this.name; 7577 } 7578 7579 public boolean hasNameElement() { 7580 return this.name != null && !this.name.isEmpty(); 7581 } 7582 7583 public boolean hasName() { 7584 return this.name != null && !this.name.isEmpty(); 7585 } 7586 7587 /** 7588 * @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 7589 */ 7590 public SetupActionAssertRuleParamComponent setNameElement(StringType value) { 7591 this.name = value; 7592 return this; 7593 } 7594 7595 /** 7596 * @return Descriptive name for this parameter that matches the external assert rule parameter name. 7597 */ 7598 public String getName() { 7599 return this.name == null ? null : this.name.getValue(); 7600 } 7601 7602 /** 7603 * @param value Descriptive name for this parameter that matches the external assert rule parameter name. 7604 */ 7605 public SetupActionAssertRuleParamComponent setName(String value) { 7606 if (this.name == null) 7607 this.name = new StringType(); 7608 this.name.setValue(value); 7609 return this; 7610 } 7611 7612 /** 7613 * @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 7614 */ 7615 public StringType getValueElement() { 7616 if (this.value == null) 7617 if (Configuration.errorOnAutoCreate()) 7618 throw new Error("Attempt to auto-create SetupActionAssertRuleParamComponent.value"); 7619 else if (Configuration.doAutoCreate()) 7620 this.value = new StringType(); // bb 7621 return this.value; 7622 } 7623 7624 public boolean hasValueElement() { 7625 return this.value != null && !this.value.isEmpty(); 7626 } 7627 7628 public boolean hasValue() { 7629 return this.value != null && !this.value.isEmpty(); 7630 } 7631 7632 /** 7633 * @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 7634 */ 7635 public SetupActionAssertRuleParamComponent setValueElement(StringType value) { 7636 this.value = value; 7637 return this; 7638 } 7639 7640 /** 7641 * @return The value for the parameter that will be passed on to the external rule template. 7642 */ 7643 public String getValue() { 7644 return this.value == null ? null : this.value.getValue(); 7645 } 7646 7647 /** 7648 * @param value The value for the parameter that will be passed on to the external rule template. 7649 */ 7650 public SetupActionAssertRuleParamComponent setValue(String value) { 7651 if (this.value == null) 7652 this.value = new StringType(); 7653 this.value.setValue(value); 7654 return this; 7655 } 7656 7657 protected void listChildren(List<Property> childrenList) { 7658 super.listChildren(childrenList); 7659 childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); 7660 childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external rule template.", 0, java.lang.Integer.MAX_VALUE, value)); 7661 } 7662 7663 @Override 7664 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7665 switch (hash) { 7666 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 7667 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 7668 default: return super.getProperty(hash, name, checkValid); 7669 } 7670 7671 } 7672 7673 @Override 7674 public void setProperty(int hash, String name, Base value) throws FHIRException { 7675 switch (hash) { 7676 case 3373707: // name 7677 this.name = castToString(value); // StringType 7678 break; 7679 case 111972721: // value 7680 this.value = castToString(value); // StringType 7681 break; 7682 default: super.setProperty(hash, name, value); 7683 } 7684 7685 } 7686 7687 @Override 7688 public void setProperty(String name, Base value) throws FHIRException { 7689 if (name.equals("name")) 7690 this.name = castToString(value); // StringType 7691 else if (name.equals("value")) 7692 this.value = castToString(value); // StringType 7693 else 7694 super.setProperty(name, value); 7695 } 7696 7697 @Override 7698 public Base makeProperty(int hash, String name) throws FHIRException { 7699 switch (hash) { 7700 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 7701 case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType 7702 default: return super.makeProperty(hash, name); 7703 } 7704 7705 } 7706 7707 @Override 7708 public Base addChild(String name) throws FHIRException { 7709 if (name.equals("name")) { 7710 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 7711 } 7712 else if (name.equals("value")) { 7713 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 7714 } 7715 else 7716 return super.addChild(name); 7717 } 7718 7719 public SetupActionAssertRuleParamComponent copy() { 7720 SetupActionAssertRuleParamComponent dst = new SetupActionAssertRuleParamComponent(); 7721 copyValues(dst); 7722 dst.name = name == null ? null : name.copy(); 7723 dst.value = value == null ? null : value.copy(); 7724 return dst; 7725 } 7726 7727 @Override 7728 public boolean equalsDeep(Base other) { 7729 if (!super.equalsDeep(other)) 7730 return false; 7731 if (!(other instanceof SetupActionAssertRuleParamComponent)) 7732 return false; 7733 SetupActionAssertRuleParamComponent o = (SetupActionAssertRuleParamComponent) other; 7734 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 7735 } 7736 7737 @Override 7738 public boolean equalsShallow(Base other) { 7739 if (!super.equalsShallow(other)) 7740 return false; 7741 if (!(other instanceof SetupActionAssertRuleParamComponent)) 7742 return false; 7743 SetupActionAssertRuleParamComponent o = (SetupActionAssertRuleParamComponent) other; 7744 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 7745 } 7746 7747 public boolean isEmpty() { 7748 return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) 7749 ; 7750 } 7751 7752 public String fhirType() { 7753 return "TestScript.setup.action.assert.rule.param"; 7754 7755 } 7756 7757 } 7758 7759 @Block() 7760 public static class SetupActionAssertRulesetComponent extends BackboneElement implements IBaseBackboneElement { 7761 /** 7762 * The TestScript.ruleset id value this assert will evaluate. 7763 */ 7764 @Child(name = "rulesetId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 7765 @Description(shortDefinition="Id of the TestScript.ruleset", formalDefinition="The TestScript.ruleset id value this assert will evaluate." ) 7766 protected IdType rulesetId; 7767 7768 /** 7769 * The referenced rule within the external ruleset template. 7770 */ 7771 @Child(name = "rule", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7772 @Description(shortDefinition="The referenced rule within the ruleset", formalDefinition="The referenced rule within the external ruleset template." ) 7773 protected List<SetupActionAssertRulesetRuleComponent> rule; 7774 7775 private static final long serialVersionUID = 2070600738L; 7776 7777 /** 7778 * Constructor 7779 */ 7780 public SetupActionAssertRulesetComponent() { 7781 super(); 7782 } 7783 7784 /** 7785 * Constructor 7786 */ 7787 public SetupActionAssertRulesetComponent(IdType rulesetId) { 7788 super(); 7789 this.rulesetId = rulesetId; 7790 } 7791 7792 /** 7793 * @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 7794 */ 7795 public IdType getRulesetIdElement() { 7796 if (this.rulesetId == null) 7797 if (Configuration.errorOnAutoCreate()) 7798 throw new Error("Attempt to auto-create SetupActionAssertRulesetComponent.rulesetId"); 7799 else if (Configuration.doAutoCreate()) 7800 this.rulesetId = new IdType(); // bb 7801 return this.rulesetId; 7802 } 7803 7804 public boolean hasRulesetIdElement() { 7805 return this.rulesetId != null && !this.rulesetId.isEmpty(); 7806 } 7807 7808 public boolean hasRulesetId() { 7809 return this.rulesetId != null && !this.rulesetId.isEmpty(); 7810 } 7811 7812 /** 7813 * @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 7814 */ 7815 public SetupActionAssertRulesetComponent setRulesetIdElement(IdType value) { 7816 this.rulesetId = value; 7817 return this; 7818 } 7819 7820 /** 7821 * @return The TestScript.ruleset id value this assert will evaluate. 7822 */ 7823 public String getRulesetId() { 7824 return this.rulesetId == null ? null : this.rulesetId.getValue(); 7825 } 7826 7827 /** 7828 * @param value The TestScript.ruleset id value this assert will evaluate. 7829 */ 7830 public SetupActionAssertRulesetComponent setRulesetId(String value) { 7831 if (this.rulesetId == null) 7832 this.rulesetId = new IdType(); 7833 this.rulesetId.setValue(value); 7834 return this; 7835 } 7836 7837 /** 7838 * @return {@link #rule} (The referenced rule within the external ruleset template.) 7839 */ 7840 public List<SetupActionAssertRulesetRuleComponent> getRule() { 7841 if (this.rule == null) 7842 this.rule = new ArrayList<SetupActionAssertRulesetRuleComponent>(); 7843 return this.rule; 7844 } 7845 7846 public boolean hasRule() { 7847 if (this.rule == null) 7848 return false; 7849 for (SetupActionAssertRulesetRuleComponent item : this.rule) 7850 if (!item.isEmpty()) 7851 return true; 7852 return false; 7853 } 7854 7855 /** 7856 * @return {@link #rule} (The referenced rule within the external ruleset template.) 7857 */ 7858 // syntactic sugar 7859 public SetupActionAssertRulesetRuleComponent addRule() { //3 7860 SetupActionAssertRulesetRuleComponent t = new SetupActionAssertRulesetRuleComponent(); 7861 if (this.rule == null) 7862 this.rule = new ArrayList<SetupActionAssertRulesetRuleComponent>(); 7863 this.rule.add(t); 7864 return t; 7865 } 7866 7867 // syntactic sugar 7868 public SetupActionAssertRulesetComponent addRule(SetupActionAssertRulesetRuleComponent t) { //3 7869 if (t == null) 7870 return this; 7871 if (this.rule == null) 7872 this.rule = new ArrayList<SetupActionAssertRulesetRuleComponent>(); 7873 this.rule.add(t); 7874 return this; 7875 } 7876 7877 protected void listChildren(List<Property> childrenList) { 7878 super.listChildren(childrenList); 7879 childrenList.add(new Property("rulesetId", "id", "The TestScript.ruleset id value this assert will evaluate.", 0, java.lang.Integer.MAX_VALUE, rulesetId)); 7880 childrenList.add(new Property("rule", "", "The referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, rule)); 7881 } 7882 7883 @Override 7884 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 7885 switch (hash) { 7886 case -2073977951: /*rulesetId*/ return this.rulesetId == null ? new Base[0] : new Base[] {this.rulesetId}; // IdType 7887 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // SetupActionAssertRulesetRuleComponent 7888 default: return super.getProperty(hash, name, checkValid); 7889 } 7890 7891 } 7892 7893 @Override 7894 public void setProperty(int hash, String name, Base value) throws FHIRException { 7895 switch (hash) { 7896 case -2073977951: // rulesetId 7897 this.rulesetId = castToId(value); // IdType 7898 break; 7899 case 3512060: // rule 7900 this.getRule().add((SetupActionAssertRulesetRuleComponent) value); // SetupActionAssertRulesetRuleComponent 7901 break; 7902 default: super.setProperty(hash, name, value); 7903 } 7904 7905 } 7906 7907 @Override 7908 public void setProperty(String name, Base value) throws FHIRException { 7909 if (name.equals("rulesetId")) 7910 this.rulesetId = castToId(value); // IdType 7911 else if (name.equals("rule")) 7912 this.getRule().add((SetupActionAssertRulesetRuleComponent) value); 7913 else 7914 super.setProperty(name, value); 7915 } 7916 7917 @Override 7918 public Base makeProperty(int hash, String name) throws FHIRException { 7919 switch (hash) { 7920 case -2073977951: throw new FHIRException("Cannot make property rulesetId as it is not a complex type"); // IdType 7921 case 3512060: return addRule(); // SetupActionAssertRulesetRuleComponent 7922 default: return super.makeProperty(hash, name); 7923 } 7924 7925 } 7926 7927 @Override 7928 public Base addChild(String name) throws FHIRException { 7929 if (name.equals("rulesetId")) { 7930 throw new FHIRException("Cannot call addChild on a primitive type TestScript.rulesetId"); 7931 } 7932 else if (name.equals("rule")) { 7933 return addRule(); 7934 } 7935 else 7936 return super.addChild(name); 7937 } 7938 7939 public SetupActionAssertRulesetComponent copy() { 7940 SetupActionAssertRulesetComponent dst = new SetupActionAssertRulesetComponent(); 7941 copyValues(dst); 7942 dst.rulesetId = rulesetId == null ? null : rulesetId.copy(); 7943 if (rule != null) { 7944 dst.rule = new ArrayList<SetupActionAssertRulesetRuleComponent>(); 7945 for (SetupActionAssertRulesetRuleComponent i : rule) 7946 dst.rule.add(i.copy()); 7947 }; 7948 return dst; 7949 } 7950 7951 @Override 7952 public boolean equalsDeep(Base other) { 7953 if (!super.equalsDeep(other)) 7954 return false; 7955 if (!(other instanceof SetupActionAssertRulesetComponent)) 7956 return false; 7957 SetupActionAssertRulesetComponent o = (SetupActionAssertRulesetComponent) other; 7958 return compareDeep(rulesetId, o.rulesetId, true) && compareDeep(rule, o.rule, true); 7959 } 7960 7961 @Override 7962 public boolean equalsShallow(Base other) { 7963 if (!super.equalsShallow(other)) 7964 return false; 7965 if (!(other instanceof SetupActionAssertRulesetComponent)) 7966 return false; 7967 SetupActionAssertRulesetComponent o = (SetupActionAssertRulesetComponent) other; 7968 return compareValues(rulesetId, o.rulesetId, true); 7969 } 7970 7971 public boolean isEmpty() { 7972 return super.isEmpty() && (rulesetId == null || rulesetId.isEmpty()) && (rule == null || rule.isEmpty()) 7973 ; 7974 } 7975 7976 public String fhirType() { 7977 return "TestScript.setup.action.assert.ruleset"; 7978 7979 } 7980 7981 } 7982 7983 @Block() 7984 public static class SetupActionAssertRulesetRuleComponent extends BackboneElement implements IBaseBackboneElement { 7985 /** 7986 * Id of the referenced rule within the external ruleset template. 7987 */ 7988 @Child(name = "ruleId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false) 7989 @Description(shortDefinition="Id of referenced rule within the ruleset", formalDefinition="Id of the referenced rule within the external ruleset template." ) 7990 protected IdType ruleId; 7991 7992 /** 7993 * Each rule template can take one or more parameters for rule evaluation. 7994 */ 7995 @Child(name = "param", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 7996 @Description(shortDefinition="Rule parameter template", formalDefinition="Each rule template can take one or more parameters for rule evaluation." ) 7997 protected List<SetupActionAssertRulesetRuleParamComponent> param; 7998 7999 private static final long serialVersionUID = 52246314L; 8000 8001 /** 8002 * Constructor 8003 */ 8004 public SetupActionAssertRulesetRuleComponent() { 8005 super(); 8006 } 8007 8008 /** 8009 * Constructor 8010 */ 8011 public SetupActionAssertRulesetRuleComponent(IdType ruleId) { 8012 super(); 8013 this.ruleId = ruleId; 8014 } 8015 8016 /** 8017 * @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 8018 */ 8019 public IdType getRuleIdElement() { 8020 if (this.ruleId == null) 8021 if (Configuration.errorOnAutoCreate()) 8022 throw new Error("Attempt to auto-create SetupActionAssertRulesetRuleComponent.ruleId"); 8023 else if (Configuration.doAutoCreate()) 8024 this.ruleId = new IdType(); // bb 8025 return this.ruleId; 8026 } 8027 8028 public boolean hasRuleIdElement() { 8029 return this.ruleId != null && !this.ruleId.isEmpty(); 8030 } 8031 8032 public boolean hasRuleId() { 8033 return this.ruleId != null && !this.ruleId.isEmpty(); 8034 } 8035 8036 /** 8037 * @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 8038 */ 8039 public SetupActionAssertRulesetRuleComponent setRuleIdElement(IdType value) { 8040 this.ruleId = value; 8041 return this; 8042 } 8043 8044 /** 8045 * @return Id of the referenced rule within the external ruleset template. 8046 */ 8047 public String getRuleId() { 8048 return this.ruleId == null ? null : this.ruleId.getValue(); 8049 } 8050 8051 /** 8052 * @param value Id of the referenced rule within the external ruleset template. 8053 */ 8054 public SetupActionAssertRulesetRuleComponent setRuleId(String value) { 8055 if (this.ruleId == null) 8056 this.ruleId = new IdType(); 8057 this.ruleId.setValue(value); 8058 return this; 8059 } 8060 8061 /** 8062 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 8063 */ 8064 public List<SetupActionAssertRulesetRuleParamComponent> getParam() { 8065 if (this.param == null) 8066 this.param = new ArrayList<SetupActionAssertRulesetRuleParamComponent>(); 8067 return this.param; 8068 } 8069 8070 public boolean hasParam() { 8071 if (this.param == null) 8072 return false; 8073 for (SetupActionAssertRulesetRuleParamComponent item : this.param) 8074 if (!item.isEmpty()) 8075 return true; 8076 return false; 8077 } 8078 8079 /** 8080 * @return {@link #param} (Each rule template can take one or more parameters for rule evaluation.) 8081 */ 8082 // syntactic sugar 8083 public SetupActionAssertRulesetRuleParamComponent addParam() { //3 8084 SetupActionAssertRulesetRuleParamComponent t = new SetupActionAssertRulesetRuleParamComponent(); 8085 if (this.param == null) 8086 this.param = new ArrayList<SetupActionAssertRulesetRuleParamComponent>(); 8087 this.param.add(t); 8088 return t; 8089 } 8090 8091 // syntactic sugar 8092 public SetupActionAssertRulesetRuleComponent addParam(SetupActionAssertRulesetRuleParamComponent t) { //3 8093 if (t == null) 8094 return this; 8095 if (this.param == null) 8096 this.param = new ArrayList<SetupActionAssertRulesetRuleParamComponent>(); 8097 this.param.add(t); 8098 return this; 8099 } 8100 8101 protected void listChildren(List<Property> childrenList) { 8102 super.listChildren(childrenList); 8103 childrenList.add(new Property("ruleId", "id", "Id of the referenced rule within the external ruleset template.", 0, java.lang.Integer.MAX_VALUE, ruleId)); 8104 childrenList.add(new Property("param", "", "Each rule template can take one or more parameters for rule evaluation.", 0, java.lang.Integer.MAX_VALUE, param)); 8105 } 8106 8107 @Override 8108 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8109 switch (hash) { 8110 case -919875273: /*ruleId*/ return this.ruleId == null ? new Base[0] : new Base[] {this.ruleId}; // IdType 8111 case 106436749: /*param*/ return this.param == null ? new Base[0] : this.param.toArray(new Base[this.param.size()]); // SetupActionAssertRulesetRuleParamComponent 8112 default: return super.getProperty(hash, name, checkValid); 8113 } 8114 8115 } 8116 8117 @Override 8118 public void setProperty(int hash, String name, Base value) throws FHIRException { 8119 switch (hash) { 8120 case -919875273: // ruleId 8121 this.ruleId = castToId(value); // IdType 8122 break; 8123 case 106436749: // param 8124 this.getParam().add((SetupActionAssertRulesetRuleParamComponent) value); // SetupActionAssertRulesetRuleParamComponent 8125 break; 8126 default: super.setProperty(hash, name, value); 8127 } 8128 8129 } 8130 8131 @Override 8132 public void setProperty(String name, Base value) throws FHIRException { 8133 if (name.equals("ruleId")) 8134 this.ruleId = castToId(value); // IdType 8135 else if (name.equals("param")) 8136 this.getParam().add((SetupActionAssertRulesetRuleParamComponent) value); 8137 else 8138 super.setProperty(name, value); 8139 } 8140 8141 @Override 8142 public Base makeProperty(int hash, String name) throws FHIRException { 8143 switch (hash) { 8144 case -919875273: throw new FHIRException("Cannot make property ruleId as it is not a complex type"); // IdType 8145 case 106436749: return addParam(); // SetupActionAssertRulesetRuleParamComponent 8146 default: return super.makeProperty(hash, name); 8147 } 8148 8149 } 8150 8151 @Override 8152 public Base addChild(String name) throws FHIRException { 8153 if (name.equals("ruleId")) { 8154 throw new FHIRException("Cannot call addChild on a primitive type TestScript.ruleId"); 8155 } 8156 else if (name.equals("param")) { 8157 return addParam(); 8158 } 8159 else 8160 return super.addChild(name); 8161 } 8162 8163 public SetupActionAssertRulesetRuleComponent copy() { 8164 SetupActionAssertRulesetRuleComponent dst = new SetupActionAssertRulesetRuleComponent(); 8165 copyValues(dst); 8166 dst.ruleId = ruleId == null ? null : ruleId.copy(); 8167 if (param != null) { 8168 dst.param = new ArrayList<SetupActionAssertRulesetRuleParamComponent>(); 8169 for (SetupActionAssertRulesetRuleParamComponent i : param) 8170 dst.param.add(i.copy()); 8171 }; 8172 return dst; 8173 } 8174 8175 @Override 8176 public boolean equalsDeep(Base other) { 8177 if (!super.equalsDeep(other)) 8178 return false; 8179 if (!(other instanceof SetupActionAssertRulesetRuleComponent)) 8180 return false; 8181 SetupActionAssertRulesetRuleComponent o = (SetupActionAssertRulesetRuleComponent) other; 8182 return compareDeep(ruleId, o.ruleId, true) && compareDeep(param, o.param, true); 8183 } 8184 8185 @Override 8186 public boolean equalsShallow(Base other) { 8187 if (!super.equalsShallow(other)) 8188 return false; 8189 if (!(other instanceof SetupActionAssertRulesetRuleComponent)) 8190 return false; 8191 SetupActionAssertRulesetRuleComponent o = (SetupActionAssertRulesetRuleComponent) other; 8192 return compareValues(ruleId, o.ruleId, true); 8193 } 8194 8195 public boolean isEmpty() { 8196 return super.isEmpty() && (ruleId == null || ruleId.isEmpty()) && (param == null || param.isEmpty()) 8197 ; 8198 } 8199 8200 public String fhirType() { 8201 return "TestScript.setup.action.assert.ruleset.rule"; 8202 8203 } 8204 8205 } 8206 8207 @Block() 8208 public static class SetupActionAssertRulesetRuleParamComponent extends BackboneElement implements IBaseBackboneElement { 8209 /** 8210 * Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 8211 */ 8212 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 8213 @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." ) 8214 protected StringType name; 8215 8216 /** 8217 * The value for the parameter that will be passed on to the external ruleset rule template. 8218 */ 8219 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 8220 @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." ) 8221 protected StringType value; 8222 8223 private static final long serialVersionUID = 395259392L; 8224 8225 /** 8226 * Constructor 8227 */ 8228 public SetupActionAssertRulesetRuleParamComponent() { 8229 super(); 8230 } 8231 8232 /** 8233 * Constructor 8234 */ 8235 public SetupActionAssertRulesetRuleParamComponent(StringType name, StringType value) { 8236 super(); 8237 this.name = name; 8238 this.value = value; 8239 } 8240 8241 /** 8242 * @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 8243 */ 8244 public StringType getNameElement() { 8245 if (this.name == null) 8246 if (Configuration.errorOnAutoCreate()) 8247 throw new Error("Attempt to auto-create SetupActionAssertRulesetRuleParamComponent.name"); 8248 else if (Configuration.doAutoCreate()) 8249 this.name = new StringType(); // bb 8250 return this.name; 8251 } 8252 8253 public boolean hasNameElement() { 8254 return this.name != null && !this.name.isEmpty(); 8255 } 8256 8257 public boolean hasName() { 8258 return this.name != null && !this.name.isEmpty(); 8259 } 8260 8261 /** 8262 * @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 8263 */ 8264 public SetupActionAssertRulesetRuleParamComponent setNameElement(StringType value) { 8265 this.name = value; 8266 return this; 8267 } 8268 8269 /** 8270 * @return Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 8271 */ 8272 public String getName() { 8273 return this.name == null ? null : this.name.getValue(); 8274 } 8275 8276 /** 8277 * @param value Descriptive name for this parameter that matches the external assert ruleset rule parameter name. 8278 */ 8279 public SetupActionAssertRulesetRuleParamComponent setName(String value) { 8280 if (this.name == null) 8281 this.name = new StringType(); 8282 this.name.setValue(value); 8283 return this; 8284 } 8285 8286 /** 8287 * @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 8288 */ 8289 public StringType getValueElement() { 8290 if (this.value == null) 8291 if (Configuration.errorOnAutoCreate()) 8292 throw new Error("Attempt to auto-create SetupActionAssertRulesetRuleParamComponent.value"); 8293 else if (Configuration.doAutoCreate()) 8294 this.value = new StringType(); // bb 8295 return this.value; 8296 } 8297 8298 public boolean hasValueElement() { 8299 return this.value != null && !this.value.isEmpty(); 8300 } 8301 8302 public boolean hasValue() { 8303 return this.value != null && !this.value.isEmpty(); 8304 } 8305 8306 /** 8307 * @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 8308 */ 8309 public SetupActionAssertRulesetRuleParamComponent setValueElement(StringType value) { 8310 this.value = value; 8311 return this; 8312 } 8313 8314 /** 8315 * @return The value for the parameter that will be passed on to the external ruleset rule template. 8316 */ 8317 public String getValue() { 8318 return this.value == null ? null : this.value.getValue(); 8319 } 8320 8321 /** 8322 * @param value The value for the parameter that will be passed on to the external ruleset rule template. 8323 */ 8324 public SetupActionAssertRulesetRuleParamComponent setValue(String value) { 8325 if (this.value == null) 8326 this.value = new StringType(); 8327 this.value.setValue(value); 8328 return this; 8329 } 8330 8331 protected void listChildren(List<Property> childrenList) { 8332 super.listChildren(childrenList); 8333 childrenList.add(new Property("name", "string", "Descriptive name for this parameter that matches the external assert ruleset rule parameter name.", 0, java.lang.Integer.MAX_VALUE, name)); 8334 childrenList.add(new Property("value", "string", "The value for the parameter that will be passed on to the external ruleset rule template.", 0, java.lang.Integer.MAX_VALUE, value)); 8335 } 8336 8337 @Override 8338 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8339 switch (hash) { 8340 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 8341 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 8342 default: return super.getProperty(hash, name, checkValid); 8343 } 8344 8345 } 8346 8347 @Override 8348 public void setProperty(int hash, String name, Base value) throws FHIRException { 8349 switch (hash) { 8350 case 3373707: // name 8351 this.name = castToString(value); // StringType 8352 break; 8353 case 111972721: // value 8354 this.value = castToString(value); // StringType 8355 break; 8356 default: super.setProperty(hash, name, value); 8357 } 8358 8359 } 8360 8361 @Override 8362 public void setProperty(String name, Base value) throws FHIRException { 8363 if (name.equals("name")) 8364 this.name = castToString(value); // StringType 8365 else if (name.equals("value")) 8366 this.value = castToString(value); // StringType 8367 else 8368 super.setProperty(name, value); 8369 } 8370 8371 @Override 8372 public Base makeProperty(int hash, String name) throws FHIRException { 8373 switch (hash) { 8374 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 8375 case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType 8376 default: return super.makeProperty(hash, name); 8377 } 8378 8379 } 8380 8381 @Override 8382 public Base addChild(String name) throws FHIRException { 8383 if (name.equals("name")) { 8384 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 8385 } 8386 else if (name.equals("value")) { 8387 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 8388 } 8389 else 8390 return super.addChild(name); 8391 } 8392 8393 public SetupActionAssertRulesetRuleParamComponent copy() { 8394 SetupActionAssertRulesetRuleParamComponent dst = new SetupActionAssertRulesetRuleParamComponent(); 8395 copyValues(dst); 8396 dst.name = name == null ? null : name.copy(); 8397 dst.value = value == null ? null : value.copy(); 8398 return dst; 8399 } 8400 8401 @Override 8402 public boolean equalsDeep(Base other) { 8403 if (!super.equalsDeep(other)) 8404 return false; 8405 if (!(other instanceof SetupActionAssertRulesetRuleParamComponent)) 8406 return false; 8407 SetupActionAssertRulesetRuleParamComponent o = (SetupActionAssertRulesetRuleParamComponent) other; 8408 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true); 8409 } 8410 8411 @Override 8412 public boolean equalsShallow(Base other) { 8413 if (!super.equalsShallow(other)) 8414 return false; 8415 if (!(other instanceof SetupActionAssertRulesetRuleParamComponent)) 8416 return false; 8417 SetupActionAssertRulesetRuleParamComponent o = (SetupActionAssertRulesetRuleParamComponent) other; 8418 return compareValues(name, o.name, true) && compareValues(value, o.value, true); 8419 } 8420 8421 public boolean isEmpty() { 8422 return super.isEmpty() && (name == null || name.isEmpty()) && (value == null || value.isEmpty()) 8423 ; 8424 } 8425 8426 public String fhirType() { 8427 return "TestScript.setup.action.assert.ruleset.rule.param"; 8428 8429 } 8430 8431 } 8432 8433 @Block() 8434 public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement { 8435 /** 8436 * The name of this test used for tracking/logging purposes by test engines. 8437 */ 8438 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 8439 @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." ) 8440 protected StringType name; 8441 8442 /** 8443 * A short description of the test used by test engines for tracking and reporting purposes. 8444 */ 8445 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 8446 @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." ) 8447 protected StringType description; 8448 8449 /** 8450 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 8451 */ 8452 @Child(name = "metadata", type = {TestScriptMetadataComponent.class}, order=3, min=0, max=1, modifier=false, summary=false) 8453 @Description(shortDefinition="Capabilities that are expected 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." ) 8454 protected TestScriptMetadataComponent metadata; 8455 8456 /** 8457 * Action would contain either an operation or an assertion. 8458 */ 8459 @Child(name = "action", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8460 @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 8461 protected List<TestActionComponent> action; 8462 8463 private static final long serialVersionUID = -1607790780L; 8464 8465 /** 8466 * Constructor 8467 */ 8468 public TestScriptTestComponent() { 8469 super(); 8470 } 8471 8472 /** 8473 * @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 8474 */ 8475 public StringType getNameElement() { 8476 if (this.name == null) 8477 if (Configuration.errorOnAutoCreate()) 8478 throw new Error("Attempt to auto-create TestScriptTestComponent.name"); 8479 else if (Configuration.doAutoCreate()) 8480 this.name = new StringType(); // bb 8481 return this.name; 8482 } 8483 8484 public boolean hasNameElement() { 8485 return this.name != null && !this.name.isEmpty(); 8486 } 8487 8488 public boolean hasName() { 8489 return this.name != null && !this.name.isEmpty(); 8490 } 8491 8492 /** 8493 * @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 8494 */ 8495 public TestScriptTestComponent setNameElement(StringType value) { 8496 this.name = value; 8497 return this; 8498 } 8499 8500 /** 8501 * @return The name of this test used for tracking/logging purposes by test engines. 8502 */ 8503 public String getName() { 8504 return this.name == null ? null : this.name.getValue(); 8505 } 8506 8507 /** 8508 * @param value The name of this test used for tracking/logging purposes by test engines. 8509 */ 8510 public TestScriptTestComponent setName(String value) { 8511 if (Utilities.noString(value)) 8512 this.name = null; 8513 else { 8514 if (this.name == null) 8515 this.name = new StringType(); 8516 this.name.setValue(value); 8517 } 8518 return this; 8519 } 8520 8521 /** 8522 * @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 8523 */ 8524 public StringType getDescriptionElement() { 8525 if (this.description == null) 8526 if (Configuration.errorOnAutoCreate()) 8527 throw new Error("Attempt to auto-create TestScriptTestComponent.description"); 8528 else if (Configuration.doAutoCreate()) 8529 this.description = new StringType(); // bb 8530 return this.description; 8531 } 8532 8533 public boolean hasDescriptionElement() { 8534 return this.description != null && !this.description.isEmpty(); 8535 } 8536 8537 public boolean hasDescription() { 8538 return this.description != null && !this.description.isEmpty(); 8539 } 8540 8541 /** 8542 * @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 8543 */ 8544 public TestScriptTestComponent setDescriptionElement(StringType value) { 8545 this.description = value; 8546 return this; 8547 } 8548 8549 /** 8550 * @return A short description of the test used by test engines for tracking and reporting purposes. 8551 */ 8552 public String getDescription() { 8553 return this.description == null ? null : this.description.getValue(); 8554 } 8555 8556 /** 8557 * @param value A short description of the test used by test engines for tracking and reporting purposes. 8558 */ 8559 public TestScriptTestComponent setDescription(String value) { 8560 if (Utilities.noString(value)) 8561 this.description = null; 8562 else { 8563 if (this.description == null) 8564 this.description = new StringType(); 8565 this.description.setValue(value); 8566 } 8567 return this; 8568 } 8569 8570 /** 8571 * @return {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 8572 */ 8573 public TestScriptMetadataComponent getMetadata() { 8574 if (this.metadata == null) 8575 if (Configuration.errorOnAutoCreate()) 8576 throw new Error("Attempt to auto-create TestScriptTestComponent.metadata"); 8577 else if (Configuration.doAutoCreate()) 8578 this.metadata = new TestScriptMetadataComponent(); // cc 8579 return this.metadata; 8580 } 8581 8582 public boolean hasMetadata() { 8583 return this.metadata != null && !this.metadata.isEmpty(); 8584 } 8585 8586 /** 8587 * @param value {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 8588 */ 8589 public TestScriptTestComponent setMetadata(TestScriptMetadataComponent value) { 8590 this.metadata = value; 8591 return this; 8592 } 8593 8594 /** 8595 * @return {@link #action} (Action would contain either an operation or an assertion.) 8596 */ 8597 public List<TestActionComponent> getAction() { 8598 if (this.action == null) 8599 this.action = new ArrayList<TestActionComponent>(); 8600 return this.action; 8601 } 8602 8603 public boolean hasAction() { 8604 if (this.action == null) 8605 return false; 8606 for (TestActionComponent item : this.action) 8607 if (!item.isEmpty()) 8608 return true; 8609 return false; 8610 } 8611 8612 /** 8613 * @return {@link #action} (Action would contain either an operation or an assertion.) 8614 */ 8615 // syntactic sugar 8616 public TestActionComponent addAction() { //3 8617 TestActionComponent t = new TestActionComponent(); 8618 if (this.action == null) 8619 this.action = new ArrayList<TestActionComponent>(); 8620 this.action.add(t); 8621 return t; 8622 } 8623 8624 // syntactic sugar 8625 public TestScriptTestComponent addAction(TestActionComponent t) { //3 8626 if (t == null) 8627 return this; 8628 if (this.action == null) 8629 this.action = new ArrayList<TestActionComponent>(); 8630 this.action.add(t); 8631 return this; 8632 } 8633 8634 protected void listChildren(List<Property> childrenList) { 8635 super.listChildren(childrenList); 8636 childrenList.add(new Property("name", "string", "The name of this test used for tracking/logging purposes by test engines.", 0, java.lang.Integer.MAX_VALUE, name)); 8637 childrenList.add(new Property("description", "string", "A short description of the test used by test engines for tracking and reporting purposes.", 0, java.lang.Integer.MAX_VALUE, description)); 8638 childrenList.add(new Property("metadata", "@TestScript.metadata", "Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); 8639 childrenList.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 8640 } 8641 8642 @Override 8643 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8644 switch (hash) { 8645 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 8646 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 8647 case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent 8648 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TestActionComponent 8649 default: return super.getProperty(hash, name, checkValid); 8650 } 8651 8652 } 8653 8654 @Override 8655 public void setProperty(int hash, String name, Base value) throws FHIRException { 8656 switch (hash) { 8657 case 3373707: // name 8658 this.name = castToString(value); // StringType 8659 break; 8660 case -1724546052: // description 8661 this.description = castToString(value); // StringType 8662 break; 8663 case -450004177: // metadata 8664 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 8665 break; 8666 case -1422950858: // action 8667 this.getAction().add((TestActionComponent) value); // TestActionComponent 8668 break; 8669 default: super.setProperty(hash, name, value); 8670 } 8671 8672 } 8673 8674 @Override 8675 public void setProperty(String name, Base value) throws FHIRException { 8676 if (name.equals("name")) 8677 this.name = castToString(value); // StringType 8678 else if (name.equals("description")) 8679 this.description = castToString(value); // StringType 8680 else if (name.equals("metadata")) 8681 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 8682 else if (name.equals("action")) 8683 this.getAction().add((TestActionComponent) value); 8684 else 8685 super.setProperty(name, value); 8686 } 8687 8688 @Override 8689 public Base makeProperty(int hash, String name) throws FHIRException { 8690 switch (hash) { 8691 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 8692 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 8693 case -450004177: return getMetadata(); // TestScriptMetadataComponent 8694 case -1422950858: return addAction(); // TestActionComponent 8695 default: return super.makeProperty(hash, name); 8696 } 8697 8698 } 8699 8700 @Override 8701 public Base addChild(String name) throws FHIRException { 8702 if (name.equals("name")) { 8703 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 8704 } 8705 else if (name.equals("description")) { 8706 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 8707 } 8708 else if (name.equals("metadata")) { 8709 this.metadata = new TestScriptMetadataComponent(); 8710 return this.metadata; 8711 } 8712 else if (name.equals("action")) { 8713 return addAction(); 8714 } 8715 else 8716 return super.addChild(name); 8717 } 8718 8719 public TestScriptTestComponent copy() { 8720 TestScriptTestComponent dst = new TestScriptTestComponent(); 8721 copyValues(dst); 8722 dst.name = name == null ? null : name.copy(); 8723 dst.description = description == null ? null : description.copy(); 8724 dst.metadata = metadata == null ? null : metadata.copy(); 8725 if (action != null) { 8726 dst.action = new ArrayList<TestActionComponent>(); 8727 for (TestActionComponent i : action) 8728 dst.action.add(i.copy()); 8729 }; 8730 return dst; 8731 } 8732 8733 @Override 8734 public boolean equalsDeep(Base other) { 8735 if (!super.equalsDeep(other)) 8736 return false; 8737 if (!(other instanceof TestScriptTestComponent)) 8738 return false; 8739 TestScriptTestComponent o = (TestScriptTestComponent) other; 8740 return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(metadata, o.metadata, true) 8741 && compareDeep(action, o.action, true); 8742 } 8743 8744 @Override 8745 public boolean equalsShallow(Base other) { 8746 if (!super.equalsShallow(other)) 8747 return false; 8748 if (!(other instanceof TestScriptTestComponent)) 8749 return false; 8750 TestScriptTestComponent o = (TestScriptTestComponent) other; 8751 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 8752 } 8753 8754 public boolean isEmpty() { 8755 return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) 8756 && (metadata == null || metadata.isEmpty()) && (action == null || action.isEmpty()); 8757 } 8758 8759 public String fhirType() { 8760 return "TestScript.test"; 8761 8762 } 8763 8764 } 8765 8766 @Block() 8767 public static class TestActionComponent extends BackboneElement implements IBaseBackboneElement { 8768 /** 8769 * An operation would involve a REST request to a server. 8770 */ 8771 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 8772 @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 8773 protected SetupActionOperationComponent operation; 8774 8775 /** 8776 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 8777 */ 8778 @Child(name = "assert", type = {SetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false) 8779 @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 8780 protected SetupActionAssertComponent assert_; 8781 8782 private static final long serialVersionUID = -252088305L; 8783 8784 /** 8785 * Constructor 8786 */ 8787 public TestActionComponent() { 8788 super(); 8789 } 8790 8791 /** 8792 * @return {@link #operation} (An operation would involve a REST request to a server.) 8793 */ 8794 public SetupActionOperationComponent getOperation() { 8795 if (this.operation == null) 8796 if (Configuration.errorOnAutoCreate()) 8797 throw new Error("Attempt to auto-create TestActionComponent.operation"); 8798 else if (Configuration.doAutoCreate()) 8799 this.operation = new SetupActionOperationComponent(); // cc 8800 return this.operation; 8801 } 8802 8803 public boolean hasOperation() { 8804 return this.operation != null && !this.operation.isEmpty(); 8805 } 8806 8807 /** 8808 * @param value {@link #operation} (An operation would involve a REST request to a server.) 8809 */ 8810 public TestActionComponent setOperation(SetupActionOperationComponent value) { 8811 this.operation = value; 8812 return this; 8813 } 8814 8815 /** 8816 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 8817 */ 8818 public SetupActionAssertComponent getAssert() { 8819 if (this.assert_ == null) 8820 if (Configuration.errorOnAutoCreate()) 8821 throw new Error("Attempt to auto-create TestActionComponent.assert_"); 8822 else if (Configuration.doAutoCreate()) 8823 this.assert_ = new SetupActionAssertComponent(); // cc 8824 return this.assert_; 8825 } 8826 8827 public boolean hasAssert() { 8828 return this.assert_ != null && !this.assert_.isEmpty(); 8829 } 8830 8831 /** 8832 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 8833 */ 8834 public TestActionComponent setAssert(SetupActionAssertComponent value) { 8835 this.assert_ = value; 8836 return this; 8837 } 8838 8839 protected void listChildren(List<Property> childrenList) { 8840 super.listChildren(childrenList); 8841 childrenList.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, java.lang.Integer.MAX_VALUE, operation)); 8842 childrenList.add(new Property("assert", "@TestScript.setup.action.assert", "Evaluates the results of previous operations to determine if the server under test behaves appropriately.", 0, java.lang.Integer.MAX_VALUE, assert_)); 8843 } 8844 8845 @Override 8846 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 8847 switch (hash) { 8848 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 8849 case -1408208058: /*assert*/ return this.assert_ == null ? new Base[0] : new Base[] {this.assert_}; // SetupActionAssertComponent 8850 default: return super.getProperty(hash, name, checkValid); 8851 } 8852 8853 } 8854 8855 @Override 8856 public void setProperty(int hash, String name, Base value) throws FHIRException { 8857 switch (hash) { 8858 case 1662702951: // operation 8859 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 8860 break; 8861 case -1408208058: // assert 8862 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 8863 break; 8864 default: super.setProperty(hash, name, value); 8865 } 8866 8867 } 8868 8869 @Override 8870 public void setProperty(String name, Base value) throws FHIRException { 8871 if (name.equals("operation")) 8872 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 8873 else if (name.equals("assert")) 8874 this.assert_ = (SetupActionAssertComponent) value; // SetupActionAssertComponent 8875 else 8876 super.setProperty(name, value); 8877 } 8878 8879 @Override 8880 public Base makeProperty(int hash, String name) throws FHIRException { 8881 switch (hash) { 8882 case 1662702951: return getOperation(); // SetupActionOperationComponent 8883 case -1408208058: return getAssert(); // SetupActionAssertComponent 8884 default: return super.makeProperty(hash, name); 8885 } 8886 8887 } 8888 8889 @Override 8890 public Base addChild(String name) throws FHIRException { 8891 if (name.equals("operation")) { 8892 this.operation = new SetupActionOperationComponent(); 8893 return this.operation; 8894 } 8895 else if (name.equals("assert")) { 8896 this.assert_ = new SetupActionAssertComponent(); 8897 return this.assert_; 8898 } 8899 else 8900 return super.addChild(name); 8901 } 8902 8903 public TestActionComponent copy() { 8904 TestActionComponent dst = new TestActionComponent(); 8905 copyValues(dst); 8906 dst.operation = operation == null ? null : operation.copy(); 8907 dst.assert_ = assert_ == null ? null : assert_.copy(); 8908 return dst; 8909 } 8910 8911 @Override 8912 public boolean equalsDeep(Base other) { 8913 if (!super.equalsDeep(other)) 8914 return false; 8915 if (!(other instanceof TestActionComponent)) 8916 return false; 8917 TestActionComponent o = (TestActionComponent) other; 8918 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 8919 } 8920 8921 @Override 8922 public boolean equalsShallow(Base other) { 8923 if (!super.equalsShallow(other)) 8924 return false; 8925 if (!(other instanceof TestActionComponent)) 8926 return false; 8927 TestActionComponent o = (TestActionComponent) other; 8928 return true; 8929 } 8930 8931 public boolean isEmpty() { 8932 return super.isEmpty() && (operation == null || operation.isEmpty()) && (assert_ == null || assert_.isEmpty()) 8933 ; 8934 } 8935 8936 public String fhirType() { 8937 return "TestScript.test.action"; 8938 8939 } 8940 8941 } 8942 8943 @Block() 8944 public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement { 8945 /** 8946 * The teardown action will only contain an operation. 8947 */ 8948 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 8949 @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." ) 8950 protected List<TeardownActionComponent> action; 8951 8952 private static final long serialVersionUID = 1168638089L; 8953 8954 /** 8955 * Constructor 8956 */ 8957 public TestScriptTeardownComponent() { 8958 super(); 8959 } 8960 8961 /** 8962 * @return {@link #action} (The teardown action will only contain an operation.) 8963 */ 8964 public List<TeardownActionComponent> getAction() { 8965 if (this.action == null) 8966 this.action = new ArrayList<TeardownActionComponent>(); 8967 return this.action; 8968 } 8969 8970 public boolean hasAction() { 8971 if (this.action == null) 8972 return false; 8973 for (TeardownActionComponent item : this.action) 8974 if (!item.isEmpty()) 8975 return true; 8976 return false; 8977 } 8978 8979 /** 8980 * @return {@link #action} (The teardown action will only contain an operation.) 8981 */ 8982 // syntactic sugar 8983 public TeardownActionComponent addAction() { //3 8984 TeardownActionComponent t = new TeardownActionComponent(); 8985 if (this.action == null) 8986 this.action = new ArrayList<TeardownActionComponent>(); 8987 this.action.add(t); 8988 return t; 8989 } 8990 8991 // syntactic sugar 8992 public TestScriptTeardownComponent addAction(TeardownActionComponent t) { //3 8993 if (t == null) 8994 return this; 8995 if (this.action == null) 8996 this.action = new ArrayList<TeardownActionComponent>(); 8997 this.action.add(t); 8998 return this; 8999 } 9000 9001 protected void listChildren(List<Property> childrenList) { 9002 super.listChildren(childrenList); 9003 childrenList.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action)); 9004 } 9005 9006 @Override 9007 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9008 switch (hash) { 9009 case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // TeardownActionComponent 9010 default: return super.getProperty(hash, name, checkValid); 9011 } 9012 9013 } 9014 9015 @Override 9016 public void setProperty(int hash, String name, Base value) throws FHIRException { 9017 switch (hash) { 9018 case -1422950858: // action 9019 this.getAction().add((TeardownActionComponent) value); // TeardownActionComponent 9020 break; 9021 default: super.setProperty(hash, name, value); 9022 } 9023 9024 } 9025 9026 @Override 9027 public void setProperty(String name, Base value) throws FHIRException { 9028 if (name.equals("action")) 9029 this.getAction().add((TeardownActionComponent) value); 9030 else 9031 super.setProperty(name, value); 9032 } 9033 9034 @Override 9035 public Base makeProperty(int hash, String name) throws FHIRException { 9036 switch (hash) { 9037 case -1422950858: return addAction(); // TeardownActionComponent 9038 default: return super.makeProperty(hash, name); 9039 } 9040 9041 } 9042 9043 @Override 9044 public Base addChild(String name) throws FHIRException { 9045 if (name.equals("action")) { 9046 return addAction(); 9047 } 9048 else 9049 return super.addChild(name); 9050 } 9051 9052 public TestScriptTeardownComponent copy() { 9053 TestScriptTeardownComponent dst = new TestScriptTeardownComponent(); 9054 copyValues(dst); 9055 if (action != null) { 9056 dst.action = new ArrayList<TeardownActionComponent>(); 9057 for (TeardownActionComponent i : action) 9058 dst.action.add(i.copy()); 9059 }; 9060 return dst; 9061 } 9062 9063 @Override 9064 public boolean equalsDeep(Base other) { 9065 if (!super.equalsDeep(other)) 9066 return false; 9067 if (!(other instanceof TestScriptTeardownComponent)) 9068 return false; 9069 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other; 9070 return compareDeep(action, o.action, true); 9071 } 9072 9073 @Override 9074 public boolean equalsShallow(Base other) { 9075 if (!super.equalsShallow(other)) 9076 return false; 9077 if (!(other instanceof TestScriptTeardownComponent)) 9078 return false; 9079 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other; 9080 return true; 9081 } 9082 9083 public boolean isEmpty() { 9084 return super.isEmpty() && (action == null || action.isEmpty()); 9085 } 9086 9087 public String fhirType() { 9088 return "TestScript.teardown"; 9089 9090 } 9091 9092 } 9093 9094 @Block() 9095 public static class TeardownActionComponent extends BackboneElement implements IBaseBackboneElement { 9096 /** 9097 * An operation would involve a REST request to a server. 9098 */ 9099 @Child(name = "operation", type = {SetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 9100 @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 9101 protected SetupActionOperationComponent operation; 9102 9103 private static final long serialVersionUID = -1099598054L; 9104 9105 /** 9106 * Constructor 9107 */ 9108 public TeardownActionComponent() { 9109 super(); 9110 } 9111 9112 /** 9113 * @return {@link #operation} (An operation would involve a REST request to a server.) 9114 */ 9115 public SetupActionOperationComponent getOperation() { 9116 if (this.operation == null) 9117 if (Configuration.errorOnAutoCreate()) 9118 throw new Error("Attempt to auto-create TeardownActionComponent.operation"); 9119 else if (Configuration.doAutoCreate()) 9120 this.operation = new SetupActionOperationComponent(); // cc 9121 return this.operation; 9122 } 9123 9124 public boolean hasOperation() { 9125 return this.operation != null && !this.operation.isEmpty(); 9126 } 9127 9128 /** 9129 * @param value {@link #operation} (An operation would involve a REST request to a server.) 9130 */ 9131 public TeardownActionComponent setOperation(SetupActionOperationComponent value) { 9132 this.operation = value; 9133 return this; 9134 } 9135 9136 protected void listChildren(List<Property> childrenList) { 9137 super.listChildren(childrenList); 9138 childrenList.add(new Property("operation", "@TestScript.setup.action.operation", "An operation would involve a REST request to a server.", 0, java.lang.Integer.MAX_VALUE, operation)); 9139 } 9140 9141 @Override 9142 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 9143 switch (hash) { 9144 case 1662702951: /*operation*/ return this.operation == null ? new Base[0] : new Base[] {this.operation}; // SetupActionOperationComponent 9145 default: return super.getProperty(hash, name, checkValid); 9146 } 9147 9148 } 9149 9150 @Override 9151 public void setProperty(int hash, String name, Base value) throws FHIRException { 9152 switch (hash) { 9153 case 1662702951: // operation 9154 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 9155 break; 9156 default: super.setProperty(hash, name, value); 9157 } 9158 9159 } 9160 9161 @Override 9162 public void setProperty(String name, Base value) throws FHIRException { 9163 if (name.equals("operation")) 9164 this.operation = (SetupActionOperationComponent) value; // SetupActionOperationComponent 9165 else 9166 super.setProperty(name, value); 9167 } 9168 9169 @Override 9170 public Base makeProperty(int hash, String name) throws FHIRException { 9171 switch (hash) { 9172 case 1662702951: return getOperation(); // SetupActionOperationComponent 9173 default: return super.makeProperty(hash, name); 9174 } 9175 9176 } 9177 9178 @Override 9179 public Base addChild(String name) throws FHIRException { 9180 if (name.equals("operation")) { 9181 this.operation = new SetupActionOperationComponent(); 9182 return this.operation; 9183 } 9184 else 9185 return super.addChild(name); 9186 } 9187 9188 public TeardownActionComponent copy() { 9189 TeardownActionComponent dst = new TeardownActionComponent(); 9190 copyValues(dst); 9191 dst.operation = operation == null ? null : operation.copy(); 9192 return dst; 9193 } 9194 9195 @Override 9196 public boolean equalsDeep(Base other) { 9197 if (!super.equalsDeep(other)) 9198 return false; 9199 if (!(other instanceof TeardownActionComponent)) 9200 return false; 9201 TeardownActionComponent o = (TeardownActionComponent) other; 9202 return compareDeep(operation, o.operation, true); 9203 } 9204 9205 @Override 9206 public boolean equalsShallow(Base other) { 9207 if (!super.equalsShallow(other)) 9208 return false; 9209 if (!(other instanceof TeardownActionComponent)) 9210 return false; 9211 TeardownActionComponent o = (TeardownActionComponent) other; 9212 return true; 9213 } 9214 9215 public boolean isEmpty() { 9216 return super.isEmpty() && (operation == null || operation.isEmpty()); 9217 } 9218 9219 public String fhirType() { 9220 return "TestScript.teardown.action"; 9221 9222 } 9223 9224 } 9225 9226 /** 9227 * An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published. 9228 */ 9229 @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) 9230 @Description(shortDefinition="Absolute URL used to reference this TestScript", formalDefinition="An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published." ) 9231 protected UriType url; 9232 9233 /** 9234 * The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually. 9235 */ 9236 @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 9237 @Description(shortDefinition="Logical id for this version of the TestScript", formalDefinition="The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually." ) 9238 protected StringType version; 9239 9240 /** 9241 * A free text natural language name identifying the TestScript. 9242 */ 9243 @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) 9244 @Description(shortDefinition="Informal name for this TestScript", formalDefinition="A free text natural language name identifying the TestScript." ) 9245 protected StringType name; 9246 9247 /** 9248 * The status of the TestScript. 9249 */ 9250 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) 9251 @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the TestScript." ) 9252 protected Enumeration<ConformanceResourceStatus> status; 9253 9254 /** 9255 * Identifier for the TestScript assigned for external purposes outside the context of FHIR. 9256 */ 9257 @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true) 9258 @Description(shortDefinition="External identifier", formalDefinition="Identifier for the TestScript assigned for external purposes outside the context of FHIR." ) 9259 protected Identifier identifier; 9260 9261 /** 9262 * This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 9263 */ 9264 @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) 9265 @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) 9266 protected BooleanType experimental; 9267 9268 /** 9269 * The name of the individual or organization that published the Test Script. 9270 */ 9271 @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 9272 @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the Test Script." ) 9273 protected StringType publisher; 9274 9275 /** 9276 * Contacts to assist a user in finding and communicating with the publisher. 9277 */ 9278 @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 9279 @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) 9280 protected List<TestScriptContactComponent> contact; 9281 9282 /** 9283 * The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change. 9284 */ 9285 @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 9286 @Description(shortDefinition="Date for this version of the TestScript", formalDefinition="The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change." ) 9287 protected DateTimeType date; 9288 9289 /** 9290 * A free text natural language description of the TestScript and its use. 9291 */ 9292 @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) 9293 @Description(shortDefinition="Natural language description of the TestScript", formalDefinition="A free text natural language description of the TestScript and its use." ) 9294 protected StringType description; 9295 9296 /** 9297 * 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 of Test Scripts. 9298 */ 9299 @Child(name = "useContext", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 9300 @Description(shortDefinition="Content intends to support these contexts", formalDefinition="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 of Test Scripts." ) 9301 protected List<CodeableConcept> useContext; 9302 9303 /** 9304 * Explains why this Test Script is needed and why it's been constrained as it has. 9305 */ 9306 @Child(name = "requirements", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 9307 @Description(shortDefinition="Scope and Usage this Test Script is for", formalDefinition="Explains why this Test Script is needed and why it's been constrained as it has." ) 9308 protected StringType requirements; 9309 9310 /** 9311 * 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 details of the constraints and mappings. 9312 */ 9313 @Child(name = "copyright", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) 9314 @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 details of the constraints and mappings." ) 9315 protected StringType copyright; 9316 9317 /** 9318 * An abstract server used in operations within this test script in the origin element. 9319 */ 9320 @Child(name = "origin", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9321 @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." ) 9322 protected List<TestScriptOriginComponent> origin; 9323 9324 /** 9325 * An abstract server used in operations within this test script in the destination element. 9326 */ 9327 @Child(name = "destination", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9328 @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." ) 9329 protected List<TestScriptDestinationComponent> destination; 9330 9331 /** 9332 * The required capability must exist and are assumed to function correctly on the FHIR server being tested. 9333 */ 9334 @Child(name = "metadata", type = {}, order=15, min=0, max=1, modifier=false, summary=false) 9335 @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." ) 9336 protected TestScriptMetadataComponent metadata; 9337 9338 /** 9339 * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute. 9340 */ 9341 @Child(name = "fixture", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9342 @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." ) 9343 protected List<TestScriptFixtureComponent> fixture; 9344 9345 /** 9346 * Reference to the profile to be used for validation. 9347 */ 9348 @Child(name = "profile", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9349 @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." ) 9350 protected List<Reference> profile; 9351 /** 9352 * The actual objects that are the target of the reference (Reference to the profile to be used for validation.) 9353 */ 9354 protected List<Resource> profileTarget; 9355 9356 9357 /** 9358 * Variable is set based either on element value in response body or on header field value in the response headers. 9359 */ 9360 @Child(name = "variable", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9361 @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." ) 9362 protected List<TestScriptVariableComponent> variable; 9363 9364 /** 9365 * Assert rule to be used in one or more asserts within the test script. 9366 */ 9367 @Child(name = "rule", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9368 @Description(shortDefinition="Assert rule used within the test script", formalDefinition="Assert rule to be used in one or more asserts within the test script." ) 9369 protected List<TestScriptRuleComponent> rule; 9370 9371 /** 9372 * Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied. 9373 */ 9374 @Child(name = "ruleset", type = {}, order=20, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9375 @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." ) 9376 protected List<TestScriptRulesetComponent> ruleset; 9377 9378 /** 9379 * A series of required setup operations before tests are executed. 9380 */ 9381 @Child(name = "setup", type = {}, order=21, min=0, max=1, modifier=false, summary=false) 9382 @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." ) 9383 protected TestScriptSetupComponent setup; 9384 9385 /** 9386 * A test in this script. 9387 */ 9388 @Child(name = "test", type = {}, order=22, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 9389 @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." ) 9390 protected List<TestScriptTestComponent> test; 9391 9392 /** 9393 * A series of operations required to clean up after the all the tests are executed (successfully or otherwise). 9394 */ 9395 @Child(name = "teardown", type = {}, order=23, min=0, max=1, modifier=false, summary=false) 9396 @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)." ) 9397 protected TestScriptTeardownComponent teardown; 9398 9399 private static final long serialVersionUID = -468958725L; 9400 9401 /** 9402 * Constructor 9403 */ 9404 public TestScript() { 9405 super(); 9406 } 9407 9408 /** 9409 * Constructor 9410 */ 9411 public TestScript(UriType url, StringType name, Enumeration<ConformanceResourceStatus> status) { 9412 super(); 9413 this.url = url; 9414 this.name = name; 9415 this.status = status; 9416 } 9417 9418 /** 9419 * @return {@link #url} (An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 9420 */ 9421 public UriType getUrlElement() { 9422 if (this.url == null) 9423 if (Configuration.errorOnAutoCreate()) 9424 throw new Error("Attempt to auto-create TestScript.url"); 9425 else if (Configuration.doAutoCreate()) 9426 this.url = new UriType(); // bb 9427 return this.url; 9428 } 9429 9430 public boolean hasUrlElement() { 9431 return this.url != null && !this.url.isEmpty(); 9432 } 9433 9434 public boolean hasUrl() { 9435 return this.url != null && !this.url.isEmpty(); 9436 } 9437 9438 /** 9439 * @param value {@link #url} (An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 9440 */ 9441 public TestScript setUrlElement(UriType value) { 9442 this.url = value; 9443 return this; 9444 } 9445 9446 /** 9447 * @return An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published. 9448 */ 9449 public String getUrl() { 9450 return this.url == null ? null : this.url.getValue(); 9451 } 9452 9453 /** 9454 * @param value An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published. 9455 */ 9456 public TestScript setUrl(String value) { 9457 if (this.url == null) 9458 this.url = new UriType(); 9459 this.url.setValue(value); 9460 return this; 9461 } 9462 9463 /** 9464 * @return {@link #version} (The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 9465 */ 9466 public StringType getVersionElement() { 9467 if (this.version == null) 9468 if (Configuration.errorOnAutoCreate()) 9469 throw new Error("Attempt to auto-create TestScript.version"); 9470 else if (Configuration.doAutoCreate()) 9471 this.version = new StringType(); // bb 9472 return this.version; 9473 } 9474 9475 public boolean hasVersionElement() { 9476 return this.version != null && !this.version.isEmpty(); 9477 } 9478 9479 public boolean hasVersion() { 9480 return this.version != null && !this.version.isEmpty(); 9481 } 9482 9483 /** 9484 * @param value {@link #version} (The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 9485 */ 9486 public TestScript setVersionElement(StringType value) { 9487 this.version = value; 9488 return this; 9489 } 9490 9491 /** 9492 * @return The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually. 9493 */ 9494 public String getVersion() { 9495 return this.version == null ? null : this.version.getValue(); 9496 } 9497 9498 /** 9499 * @param value The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually. 9500 */ 9501 public TestScript setVersion(String value) { 9502 if (Utilities.noString(value)) 9503 this.version = null; 9504 else { 9505 if (this.version == null) 9506 this.version = new StringType(); 9507 this.version.setValue(value); 9508 } 9509 return this; 9510 } 9511 9512 /** 9513 * @return {@link #name} (A free text natural language name identifying the TestScript.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 9514 */ 9515 public StringType getNameElement() { 9516 if (this.name == null) 9517 if (Configuration.errorOnAutoCreate()) 9518 throw new Error("Attempt to auto-create TestScript.name"); 9519 else if (Configuration.doAutoCreate()) 9520 this.name = new StringType(); // bb 9521 return this.name; 9522 } 9523 9524 public boolean hasNameElement() { 9525 return this.name != null && !this.name.isEmpty(); 9526 } 9527 9528 public boolean hasName() { 9529 return this.name != null && !this.name.isEmpty(); 9530 } 9531 9532 /** 9533 * @param value {@link #name} (A free text natural language name identifying the TestScript.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 9534 */ 9535 public TestScript setNameElement(StringType value) { 9536 this.name = value; 9537 return this; 9538 } 9539 9540 /** 9541 * @return A free text natural language name identifying the TestScript. 9542 */ 9543 public String getName() { 9544 return this.name == null ? null : this.name.getValue(); 9545 } 9546 9547 /** 9548 * @param value A free text natural language name identifying the TestScript. 9549 */ 9550 public TestScript setName(String value) { 9551 if (this.name == null) 9552 this.name = new StringType(); 9553 this.name.setValue(value); 9554 return this; 9555 } 9556 9557 /** 9558 * @return {@link #status} (The status of the TestScript.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 9559 */ 9560 public Enumeration<ConformanceResourceStatus> getStatusElement() { 9561 if (this.status == null) 9562 if (Configuration.errorOnAutoCreate()) 9563 throw new Error("Attempt to auto-create TestScript.status"); 9564 else if (Configuration.doAutoCreate()) 9565 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb 9566 return this.status; 9567 } 9568 9569 public boolean hasStatusElement() { 9570 return this.status != null && !this.status.isEmpty(); 9571 } 9572 9573 public boolean hasStatus() { 9574 return this.status != null && !this.status.isEmpty(); 9575 } 9576 9577 /** 9578 * @param value {@link #status} (The status of the TestScript.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 9579 */ 9580 public TestScript setStatusElement(Enumeration<ConformanceResourceStatus> value) { 9581 this.status = value; 9582 return this; 9583 } 9584 9585 /** 9586 * @return The status of the TestScript. 9587 */ 9588 public ConformanceResourceStatus getStatus() { 9589 return this.status == null ? null : this.status.getValue(); 9590 } 9591 9592 /** 9593 * @param value The status of the TestScript. 9594 */ 9595 public TestScript setStatus(ConformanceResourceStatus value) { 9596 if (this.status == null) 9597 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); 9598 this.status.setValue(value); 9599 return this; 9600 } 9601 9602 /** 9603 * @return {@link #identifier} (Identifier for the TestScript assigned for external purposes outside the context of FHIR.) 9604 */ 9605 public Identifier getIdentifier() { 9606 if (this.identifier == null) 9607 if (Configuration.errorOnAutoCreate()) 9608 throw new Error("Attempt to auto-create TestScript.identifier"); 9609 else if (Configuration.doAutoCreate()) 9610 this.identifier = new Identifier(); // cc 9611 return this.identifier; 9612 } 9613 9614 public boolean hasIdentifier() { 9615 return this.identifier != null && !this.identifier.isEmpty(); 9616 } 9617 9618 /** 9619 * @param value {@link #identifier} (Identifier for the TestScript assigned for external purposes outside the context of FHIR.) 9620 */ 9621 public TestScript setIdentifier(Identifier value) { 9622 this.identifier = value; 9623 return this; 9624 } 9625 9626 /** 9627 * @return {@link #experimental} (This TestScript was 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 9628 */ 9629 public BooleanType getExperimentalElement() { 9630 if (this.experimental == null) 9631 if (Configuration.errorOnAutoCreate()) 9632 throw new Error("Attempt to auto-create TestScript.experimental"); 9633 else if (Configuration.doAutoCreate()) 9634 this.experimental = new BooleanType(); // bb 9635 return this.experimental; 9636 } 9637 9638 public boolean hasExperimentalElement() { 9639 return this.experimental != null && !this.experimental.isEmpty(); 9640 } 9641 9642 public boolean hasExperimental() { 9643 return this.experimental != null && !this.experimental.isEmpty(); 9644 } 9645 9646 /** 9647 * @param value {@link #experimental} (This TestScript was 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 9648 */ 9649 public TestScript setExperimentalElement(BooleanType value) { 9650 this.experimental = value; 9651 return this; 9652 } 9653 9654 /** 9655 * @return This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 9656 */ 9657 public boolean getExperimental() { 9658 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 9659 } 9660 9661 /** 9662 * @param value This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 9663 */ 9664 public TestScript setExperimental(boolean value) { 9665 if (this.experimental == null) 9666 this.experimental = new BooleanType(); 9667 this.experimental.setValue(value); 9668 return this; 9669 } 9670 9671 /** 9672 * @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 9673 */ 9674 public StringType getPublisherElement() { 9675 if (this.publisher == null) 9676 if (Configuration.errorOnAutoCreate()) 9677 throw new Error("Attempt to auto-create TestScript.publisher"); 9678 else if (Configuration.doAutoCreate()) 9679 this.publisher = new StringType(); // bb 9680 return this.publisher; 9681 } 9682 9683 public boolean hasPublisherElement() { 9684 return this.publisher != null && !this.publisher.isEmpty(); 9685 } 9686 9687 public boolean hasPublisher() { 9688 return this.publisher != null && !this.publisher.isEmpty(); 9689 } 9690 9691 /** 9692 * @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 9693 */ 9694 public TestScript setPublisherElement(StringType value) { 9695 this.publisher = value; 9696 return this; 9697 } 9698 9699 /** 9700 * @return The name of the individual or organization that published the Test Script. 9701 */ 9702 public String getPublisher() { 9703 return this.publisher == null ? null : this.publisher.getValue(); 9704 } 9705 9706 /** 9707 * @param value The name of the individual or organization that published the Test Script. 9708 */ 9709 public TestScript setPublisher(String value) { 9710 if (Utilities.noString(value)) 9711 this.publisher = null; 9712 else { 9713 if (this.publisher == null) 9714 this.publisher = new StringType(); 9715 this.publisher.setValue(value); 9716 } 9717 return this; 9718 } 9719 9720 /** 9721 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 9722 */ 9723 public List<TestScriptContactComponent> getContact() { 9724 if (this.contact == null) 9725 this.contact = new ArrayList<TestScriptContactComponent>(); 9726 return this.contact; 9727 } 9728 9729 public boolean hasContact() { 9730 if (this.contact == null) 9731 return false; 9732 for (TestScriptContactComponent item : this.contact) 9733 if (!item.isEmpty()) 9734 return true; 9735 return false; 9736 } 9737 9738 /** 9739 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 9740 */ 9741 // syntactic sugar 9742 public TestScriptContactComponent addContact() { //3 9743 TestScriptContactComponent t = new TestScriptContactComponent(); 9744 if (this.contact == null) 9745 this.contact = new ArrayList<TestScriptContactComponent>(); 9746 this.contact.add(t); 9747 return t; 9748 } 9749 9750 // syntactic sugar 9751 public TestScript addContact(TestScriptContactComponent t) { //3 9752 if (t == null) 9753 return this; 9754 if (this.contact == null) 9755 this.contact = new ArrayList<TestScriptContactComponent>(); 9756 this.contact.add(t); 9757 return this; 9758 } 9759 9760 /** 9761 * @return {@link #date} (The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 9762 */ 9763 public DateTimeType getDateElement() { 9764 if (this.date == null) 9765 if (Configuration.errorOnAutoCreate()) 9766 throw new Error("Attempt to auto-create TestScript.date"); 9767 else if (Configuration.doAutoCreate()) 9768 this.date = new DateTimeType(); // bb 9769 return this.date; 9770 } 9771 9772 public boolean hasDateElement() { 9773 return this.date != null && !this.date.isEmpty(); 9774 } 9775 9776 public boolean hasDate() { 9777 return this.date != null && !this.date.isEmpty(); 9778 } 9779 9780 /** 9781 * @param value {@link #date} (The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 9782 */ 9783 public TestScript setDateElement(DateTimeType value) { 9784 this.date = value; 9785 return this; 9786 } 9787 9788 /** 9789 * @return The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change. 9790 */ 9791 public Date getDate() { 9792 return this.date == null ? null : this.date.getValue(); 9793 } 9794 9795 /** 9796 * @param value The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change. 9797 */ 9798 public TestScript setDate(Date value) { 9799 if (value == null) 9800 this.date = null; 9801 else { 9802 if (this.date == null) 9803 this.date = new DateTimeType(); 9804 this.date.setValue(value); 9805 } 9806 return this; 9807 } 9808 9809 /** 9810 * @return {@link #description} (A free text natural language description of the TestScript and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 9811 */ 9812 public StringType getDescriptionElement() { 9813 if (this.description == null) 9814 if (Configuration.errorOnAutoCreate()) 9815 throw new Error("Attempt to auto-create TestScript.description"); 9816 else if (Configuration.doAutoCreate()) 9817 this.description = new StringType(); // bb 9818 return this.description; 9819 } 9820 9821 public boolean hasDescriptionElement() { 9822 return this.description != null && !this.description.isEmpty(); 9823 } 9824 9825 public boolean hasDescription() { 9826 return this.description != null && !this.description.isEmpty(); 9827 } 9828 9829 /** 9830 * @param value {@link #description} (A free text natural language description of the TestScript and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 9831 */ 9832 public TestScript setDescriptionElement(StringType value) { 9833 this.description = value; 9834 return this; 9835 } 9836 9837 /** 9838 * @return A free text natural language description of the TestScript and its use. 9839 */ 9840 public String getDescription() { 9841 return this.description == null ? null : this.description.getValue(); 9842 } 9843 9844 /** 9845 * @param value A free text natural language description of the TestScript and its use. 9846 */ 9847 public TestScript setDescription(String value) { 9848 if (Utilities.noString(value)) 9849 this.description = null; 9850 else { 9851 if (this.description == null) 9852 this.description = new StringType(); 9853 this.description.setValue(value); 9854 } 9855 return this; 9856 } 9857 9858 /** 9859 * @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 of Test Scripts.) 9860 */ 9861 public List<CodeableConcept> getUseContext() { 9862 if (this.useContext == null) 9863 this.useContext = new ArrayList<CodeableConcept>(); 9864 return this.useContext; 9865 } 9866 9867 public boolean hasUseContext() { 9868 if (this.useContext == null) 9869 return false; 9870 for (CodeableConcept item : this.useContext) 9871 if (!item.isEmpty()) 9872 return true; 9873 return false; 9874 } 9875 9876 /** 9877 * @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 of Test Scripts.) 9878 */ 9879 // syntactic sugar 9880 public CodeableConcept addUseContext() { //3 9881 CodeableConcept t = new CodeableConcept(); 9882 if (this.useContext == null) 9883 this.useContext = new ArrayList<CodeableConcept>(); 9884 this.useContext.add(t); 9885 return t; 9886 } 9887 9888 // syntactic sugar 9889 public TestScript addUseContext(CodeableConcept t) { //3 9890 if (t == null) 9891 return this; 9892 if (this.useContext == null) 9893 this.useContext = new ArrayList<CodeableConcept>(); 9894 this.useContext.add(t); 9895 return this; 9896 } 9897 9898 /** 9899 * @return {@link #requirements} (Explains why this Test Script is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value 9900 */ 9901 public StringType getRequirementsElement() { 9902 if (this.requirements == null) 9903 if (Configuration.errorOnAutoCreate()) 9904 throw new Error("Attempt to auto-create TestScript.requirements"); 9905 else if (Configuration.doAutoCreate()) 9906 this.requirements = new StringType(); // bb 9907 return this.requirements; 9908 } 9909 9910 public boolean hasRequirementsElement() { 9911 return this.requirements != null && !this.requirements.isEmpty(); 9912 } 9913 9914 public boolean hasRequirements() { 9915 return this.requirements != null && !this.requirements.isEmpty(); 9916 } 9917 9918 /** 9919 * @param value {@link #requirements} (Explains why this Test Script is needed and why it's been constrained as it has.). This is the underlying object with id, value and extensions. The accessor "getRequirements" gives direct access to the value 9920 */ 9921 public TestScript setRequirementsElement(StringType value) { 9922 this.requirements = value; 9923 return this; 9924 } 9925 9926 /** 9927 * @return Explains why this Test Script is needed and why it's been constrained as it has. 9928 */ 9929 public String getRequirements() { 9930 return this.requirements == null ? null : this.requirements.getValue(); 9931 } 9932 9933 /** 9934 * @param value Explains why this Test Script is needed and why it's been constrained as it has. 9935 */ 9936 public TestScript setRequirements(String value) { 9937 if (Utilities.noString(value)) 9938 this.requirements = null; 9939 else { 9940 if (this.requirements == null) 9941 this.requirements = new StringType(); 9942 this.requirements.setValue(value); 9943 } 9944 return this; 9945 } 9946 9947 /** 9948 * @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 details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 9949 */ 9950 public StringType getCopyrightElement() { 9951 if (this.copyright == null) 9952 if (Configuration.errorOnAutoCreate()) 9953 throw new Error("Attempt to auto-create TestScript.copyright"); 9954 else if (Configuration.doAutoCreate()) 9955 this.copyright = new StringType(); // bb 9956 return this.copyright; 9957 } 9958 9959 public boolean hasCopyrightElement() { 9960 return this.copyright != null && !this.copyright.isEmpty(); 9961 } 9962 9963 public boolean hasCopyright() { 9964 return this.copyright != null && !this.copyright.isEmpty(); 9965 } 9966 9967 /** 9968 * @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 details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 9969 */ 9970 public TestScript setCopyrightElement(StringType value) { 9971 this.copyright = value; 9972 return this; 9973 } 9974 9975 /** 9976 * @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 details of the constraints and mappings. 9977 */ 9978 public String getCopyright() { 9979 return this.copyright == null ? null : this.copyright.getValue(); 9980 } 9981 9982 /** 9983 * @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 details of the constraints and mappings. 9984 */ 9985 public TestScript setCopyright(String value) { 9986 if (Utilities.noString(value)) 9987 this.copyright = null; 9988 else { 9989 if (this.copyright == null) 9990 this.copyright = new StringType(); 9991 this.copyright.setValue(value); 9992 } 9993 return this; 9994 } 9995 9996 /** 9997 * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) 9998 */ 9999 public List<TestScriptOriginComponent> getOrigin() { 10000 if (this.origin == null) 10001 this.origin = new ArrayList<TestScriptOriginComponent>(); 10002 return this.origin; 10003 } 10004 10005 public boolean hasOrigin() { 10006 if (this.origin == null) 10007 return false; 10008 for (TestScriptOriginComponent item : this.origin) 10009 if (!item.isEmpty()) 10010 return true; 10011 return false; 10012 } 10013 10014 /** 10015 * @return {@link #origin} (An abstract server used in operations within this test script in the origin element.) 10016 */ 10017 // syntactic sugar 10018 public TestScriptOriginComponent addOrigin() { //3 10019 TestScriptOriginComponent t = new TestScriptOriginComponent(); 10020 if (this.origin == null) 10021 this.origin = new ArrayList<TestScriptOriginComponent>(); 10022 this.origin.add(t); 10023 return t; 10024 } 10025 10026 // syntactic sugar 10027 public TestScript addOrigin(TestScriptOriginComponent t) { //3 10028 if (t == null) 10029 return this; 10030 if (this.origin == null) 10031 this.origin = new ArrayList<TestScriptOriginComponent>(); 10032 this.origin.add(t); 10033 return this; 10034 } 10035 10036 /** 10037 * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.) 10038 */ 10039 public List<TestScriptDestinationComponent> getDestination() { 10040 if (this.destination == null) 10041 this.destination = new ArrayList<TestScriptDestinationComponent>(); 10042 return this.destination; 10043 } 10044 10045 public boolean hasDestination() { 10046 if (this.destination == null) 10047 return false; 10048 for (TestScriptDestinationComponent item : this.destination) 10049 if (!item.isEmpty()) 10050 return true; 10051 return false; 10052 } 10053 10054 /** 10055 * @return {@link #destination} (An abstract server used in operations within this test script in the destination element.) 10056 */ 10057 // syntactic sugar 10058 public TestScriptDestinationComponent addDestination() { //3 10059 TestScriptDestinationComponent t = new TestScriptDestinationComponent(); 10060 if (this.destination == null) 10061 this.destination = new ArrayList<TestScriptDestinationComponent>(); 10062 this.destination.add(t); 10063 return t; 10064 } 10065 10066 // syntactic sugar 10067 public TestScript addDestination(TestScriptDestinationComponent t) { //3 10068 if (t == null) 10069 return this; 10070 if (this.destination == null) 10071 this.destination = new ArrayList<TestScriptDestinationComponent>(); 10072 this.destination.add(t); 10073 return this; 10074 } 10075 10076 /** 10077 * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 10078 */ 10079 public TestScriptMetadataComponent getMetadata() { 10080 if (this.metadata == null) 10081 if (Configuration.errorOnAutoCreate()) 10082 throw new Error("Attempt to auto-create TestScript.metadata"); 10083 else if (Configuration.doAutoCreate()) 10084 this.metadata = new TestScriptMetadataComponent(); // cc 10085 return this.metadata; 10086 } 10087 10088 public boolean hasMetadata() { 10089 return this.metadata != null && !this.metadata.isEmpty(); 10090 } 10091 10092 /** 10093 * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 10094 */ 10095 public TestScript setMetadata(TestScriptMetadataComponent value) { 10096 this.metadata = value; 10097 return this; 10098 } 10099 10100 /** 10101 * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) 10102 */ 10103 public List<TestScriptFixtureComponent> getFixture() { 10104 if (this.fixture == null) 10105 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 10106 return this.fixture; 10107 } 10108 10109 public boolean hasFixture() { 10110 if (this.fixture == null) 10111 return false; 10112 for (TestScriptFixtureComponent item : this.fixture) 10113 if (!item.isEmpty()) 10114 return true; 10115 return false; 10116 } 10117 10118 /** 10119 * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) 10120 */ 10121 // syntactic sugar 10122 public TestScriptFixtureComponent addFixture() { //3 10123 TestScriptFixtureComponent t = new TestScriptFixtureComponent(); 10124 if (this.fixture == null) 10125 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 10126 this.fixture.add(t); 10127 return t; 10128 } 10129 10130 // syntactic sugar 10131 public TestScript addFixture(TestScriptFixtureComponent t) { //3 10132 if (t == null) 10133 return this; 10134 if (this.fixture == null) 10135 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 10136 this.fixture.add(t); 10137 return this; 10138 } 10139 10140 /** 10141 * @return {@link #profile} (Reference to the profile to be used for validation.) 10142 */ 10143 public List<Reference> getProfile() { 10144 if (this.profile == null) 10145 this.profile = new ArrayList<Reference>(); 10146 return this.profile; 10147 } 10148 10149 public boolean hasProfile() { 10150 if (this.profile == null) 10151 return false; 10152 for (Reference item : this.profile) 10153 if (!item.isEmpty()) 10154 return true; 10155 return false; 10156 } 10157 10158 /** 10159 * @return {@link #profile} (Reference to the profile to be used for validation.) 10160 */ 10161 // syntactic sugar 10162 public Reference addProfile() { //3 10163 Reference t = new Reference(); 10164 if (this.profile == null) 10165 this.profile = new ArrayList<Reference>(); 10166 this.profile.add(t); 10167 return t; 10168 } 10169 10170 // syntactic sugar 10171 public TestScript addProfile(Reference t) { //3 10172 if (t == null) 10173 return this; 10174 if (this.profile == null) 10175 this.profile = new ArrayList<Reference>(); 10176 this.profile.add(t); 10177 return this; 10178 } 10179 10180 /** 10181 * @return {@link #profile} (The actual objects that are the target of the reference. The reference library doesn't populate this, but you can use this to hold the resources if you resolvethemt. Reference to the profile to be used for validation.) 10182 */ 10183 public List<Resource> getProfileTarget() { 10184 if (this.profileTarget == null) 10185 this.profileTarget = new ArrayList<Resource>(); 10186 return this.profileTarget; 10187 } 10188 10189 /** 10190 * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) 10191 */ 10192 public List<TestScriptVariableComponent> getVariable() { 10193 if (this.variable == null) 10194 this.variable = new ArrayList<TestScriptVariableComponent>(); 10195 return this.variable; 10196 } 10197 10198 public boolean hasVariable() { 10199 if (this.variable == null) 10200 return false; 10201 for (TestScriptVariableComponent item : this.variable) 10202 if (!item.isEmpty()) 10203 return true; 10204 return false; 10205 } 10206 10207 /** 10208 * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) 10209 */ 10210 // syntactic sugar 10211 public TestScriptVariableComponent addVariable() { //3 10212 TestScriptVariableComponent t = new TestScriptVariableComponent(); 10213 if (this.variable == null) 10214 this.variable = new ArrayList<TestScriptVariableComponent>(); 10215 this.variable.add(t); 10216 return t; 10217 } 10218 10219 // syntactic sugar 10220 public TestScript addVariable(TestScriptVariableComponent t) { //3 10221 if (t == null) 10222 return this; 10223 if (this.variable == null) 10224 this.variable = new ArrayList<TestScriptVariableComponent>(); 10225 this.variable.add(t); 10226 return this; 10227 } 10228 10229 /** 10230 * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.) 10231 */ 10232 public List<TestScriptRuleComponent> getRule() { 10233 if (this.rule == null) 10234 this.rule = new ArrayList<TestScriptRuleComponent>(); 10235 return this.rule; 10236 } 10237 10238 public boolean hasRule() { 10239 if (this.rule == null) 10240 return false; 10241 for (TestScriptRuleComponent item : this.rule) 10242 if (!item.isEmpty()) 10243 return true; 10244 return false; 10245 } 10246 10247 /** 10248 * @return {@link #rule} (Assert rule to be used in one or more asserts within the test script.) 10249 */ 10250 // syntactic sugar 10251 public TestScriptRuleComponent addRule() { //3 10252 TestScriptRuleComponent t = new TestScriptRuleComponent(); 10253 if (this.rule == null) 10254 this.rule = new ArrayList<TestScriptRuleComponent>(); 10255 this.rule.add(t); 10256 return t; 10257 } 10258 10259 // syntactic sugar 10260 public TestScript addRule(TestScriptRuleComponent t) { //3 10261 if (t == null) 10262 return this; 10263 if (this.rule == null) 10264 this.rule = new ArrayList<TestScriptRuleComponent>(); 10265 this.rule.add(t); 10266 return this; 10267 } 10268 10269 /** 10270 * @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.) 10271 */ 10272 public List<TestScriptRulesetComponent> getRuleset() { 10273 if (this.ruleset == null) 10274 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 10275 return this.ruleset; 10276 } 10277 10278 public boolean hasRuleset() { 10279 if (this.ruleset == null) 10280 return false; 10281 for (TestScriptRulesetComponent item : this.ruleset) 10282 if (!item.isEmpty()) 10283 return true; 10284 return false; 10285 } 10286 10287 /** 10288 * @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.) 10289 */ 10290 // syntactic sugar 10291 public TestScriptRulesetComponent addRuleset() { //3 10292 TestScriptRulesetComponent t = new TestScriptRulesetComponent(); 10293 if (this.ruleset == null) 10294 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 10295 this.ruleset.add(t); 10296 return t; 10297 } 10298 10299 // syntactic sugar 10300 public TestScript addRuleset(TestScriptRulesetComponent t) { //3 10301 if (t == null) 10302 return this; 10303 if (this.ruleset == null) 10304 this.ruleset = new ArrayList<TestScriptRulesetComponent>(); 10305 this.ruleset.add(t); 10306 return this; 10307 } 10308 10309 /** 10310 * @return {@link #setup} (A series of required setup operations before tests are executed.) 10311 */ 10312 public TestScriptSetupComponent getSetup() { 10313 if (this.setup == null) 10314 if (Configuration.errorOnAutoCreate()) 10315 throw new Error("Attempt to auto-create TestScript.setup"); 10316 else if (Configuration.doAutoCreate()) 10317 this.setup = new TestScriptSetupComponent(); // cc 10318 return this.setup; 10319 } 10320 10321 public boolean hasSetup() { 10322 return this.setup != null && !this.setup.isEmpty(); 10323 } 10324 10325 /** 10326 * @param value {@link #setup} (A series of required setup operations before tests are executed.) 10327 */ 10328 public TestScript setSetup(TestScriptSetupComponent value) { 10329 this.setup = value; 10330 return this; 10331 } 10332 10333 /** 10334 * @return {@link #test} (A test in this script.) 10335 */ 10336 public List<TestScriptTestComponent> getTest() { 10337 if (this.test == null) 10338 this.test = new ArrayList<TestScriptTestComponent>(); 10339 return this.test; 10340 } 10341 10342 public boolean hasTest() { 10343 if (this.test == null) 10344 return false; 10345 for (TestScriptTestComponent item : this.test) 10346 if (!item.isEmpty()) 10347 return true; 10348 return false; 10349 } 10350 10351 /** 10352 * @return {@link #test} (A test in this script.) 10353 */ 10354 // syntactic sugar 10355 public TestScriptTestComponent addTest() { //3 10356 TestScriptTestComponent t = new TestScriptTestComponent(); 10357 if (this.test == null) 10358 this.test = new ArrayList<TestScriptTestComponent>(); 10359 this.test.add(t); 10360 return t; 10361 } 10362 10363 // syntactic sugar 10364 public TestScript addTest(TestScriptTestComponent t) { //3 10365 if (t == null) 10366 return this; 10367 if (this.test == null) 10368 this.test = new ArrayList<TestScriptTestComponent>(); 10369 this.test.add(t); 10370 return this; 10371 } 10372 10373 /** 10374 * @return {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 10375 */ 10376 public TestScriptTeardownComponent getTeardown() { 10377 if (this.teardown == null) 10378 if (Configuration.errorOnAutoCreate()) 10379 throw new Error("Attempt to auto-create TestScript.teardown"); 10380 else if (Configuration.doAutoCreate()) 10381 this.teardown = new TestScriptTeardownComponent(); // cc 10382 return this.teardown; 10383 } 10384 10385 public boolean hasTeardown() { 10386 return this.teardown != null && !this.teardown.isEmpty(); 10387 } 10388 10389 /** 10390 * @param value {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 10391 */ 10392 public TestScript setTeardown(TestScriptTeardownComponent value) { 10393 this.teardown = value; 10394 return this; 10395 } 10396 10397 protected void listChildren(List<Property> childrenList) { 10398 super.listChildren(childrenList); 10399 childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this Test Script. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this Test Script is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); 10400 childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually.", 0, java.lang.Integer.MAX_VALUE, version)); 10401 childrenList.add(new Property("name", "string", "A free text natural language name identifying the TestScript.", 0, java.lang.Integer.MAX_VALUE, name)); 10402 childrenList.add(new Property("status", "code", "The status of the TestScript.", 0, java.lang.Integer.MAX_VALUE, status)); 10403 childrenList.add(new Property("identifier", "Identifier", "Identifier for the TestScript assigned for external purposes outside the context of FHIR.", 0, java.lang.Integer.MAX_VALUE, identifier)); 10404 childrenList.add(new Property("experimental", "boolean", "This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); 10405 childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the Test Script.", 0, java.lang.Integer.MAX_VALUE, publisher)); 10406 childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 10407 childrenList.add(new Property("date", "dateTime", "The date this version of the test tcript was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the test cases change.", 0, java.lang.Integer.MAX_VALUE, date)); 10408 childrenList.add(new Property("description", "string", "A free text natural language description of the TestScript and its use.", 0, java.lang.Integer.MAX_VALUE, description)); 10409 childrenList.add(new Property("useContext", "CodeableConcept", "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 of Test Scripts.", 0, java.lang.Integer.MAX_VALUE, useContext)); 10410 childrenList.add(new Property("requirements", "string", "Explains why this Test Script is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); 10411 childrenList.add(new Property("copyright", "string", "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 details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); 10412 childrenList.add(new Property("origin", "", "An abstract server used in operations within this test script in the origin element.", 0, java.lang.Integer.MAX_VALUE, origin)); 10413 childrenList.add(new Property("destination", "", "An abstract server used in operations within this test script in the destination element.", 0, java.lang.Integer.MAX_VALUE, destination)); 10414 childrenList.add(new Property("metadata", "", "The required capability must exist and are assumed to function correctly on the FHIR server being tested.", 0, java.lang.Integer.MAX_VALUE, metadata)); 10415 childrenList.add(new Property("fixture", "", "Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.", 0, java.lang.Integer.MAX_VALUE, fixture)); 10416 childrenList.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile)); 10417 childrenList.add(new Property("variable", "", "Variable is set based either on element value in response body or on header field value in the response headers.", 0, java.lang.Integer.MAX_VALUE, variable)); 10418 childrenList.add(new Property("rule", "", "Assert rule to be used in one or more asserts within the test script.", 0, java.lang.Integer.MAX_VALUE, rule)); 10419 childrenList.add(new Property("ruleset", "", "Contains one or more rules. Offers a way to group rules so assertions could reference the group of rules and have them all applied.", 0, java.lang.Integer.MAX_VALUE, ruleset)); 10420 childrenList.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, java.lang.Integer.MAX_VALUE, setup)); 10421 childrenList.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test)); 10422 childrenList.add(new Property("teardown", "", "A series of operations required to clean up after the all the tests are executed (successfully or otherwise).", 0, java.lang.Integer.MAX_VALUE, teardown)); 10423 } 10424 10425 @Override 10426 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 10427 switch (hash) { 10428 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 10429 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 10430 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 10431 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConformanceResourceStatus> 10432 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 10433 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 10434 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 10435 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // TestScriptContactComponent 10436 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 10437 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 10438 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // CodeableConcept 10439 case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // StringType 10440 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // StringType 10441 case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : this.origin.toArray(new Base[this.origin.size()]); // TestScriptOriginComponent 10442 case -1429847026: /*destination*/ return this.destination == null ? new Base[0] : this.destination.toArray(new Base[this.destination.size()]); // TestScriptDestinationComponent 10443 case -450004177: /*metadata*/ return this.metadata == null ? new Base[0] : new Base[] {this.metadata}; // TestScriptMetadataComponent 10444 case -843449847: /*fixture*/ return this.fixture == null ? new Base[0] : this.fixture.toArray(new Base[this.fixture.size()]); // TestScriptFixtureComponent 10445 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // Reference 10446 case -1249586564: /*variable*/ return this.variable == null ? new Base[0] : this.variable.toArray(new Base[this.variable.size()]); // TestScriptVariableComponent 10447 case 3512060: /*rule*/ return this.rule == null ? new Base[0] : this.rule.toArray(new Base[this.rule.size()]); // TestScriptRuleComponent 10448 case 1548678118: /*ruleset*/ return this.ruleset == null ? new Base[0] : this.ruleset.toArray(new Base[this.ruleset.size()]); // TestScriptRulesetComponent 10449 case 109329021: /*setup*/ return this.setup == null ? new Base[0] : new Base[] {this.setup}; // TestScriptSetupComponent 10450 case 3556498: /*test*/ return this.test == null ? new Base[0] : this.test.toArray(new Base[this.test.size()]); // TestScriptTestComponent 10451 case -1663474172: /*teardown*/ return this.teardown == null ? new Base[0] : new Base[] {this.teardown}; // TestScriptTeardownComponent 10452 default: return super.getProperty(hash, name, checkValid); 10453 } 10454 10455 } 10456 10457 @Override 10458 public void setProperty(int hash, String name, Base value) throws FHIRException { 10459 switch (hash) { 10460 case 116079: // url 10461 this.url = castToUri(value); // UriType 10462 break; 10463 case 351608024: // version 10464 this.version = castToString(value); // StringType 10465 break; 10466 case 3373707: // name 10467 this.name = castToString(value); // StringType 10468 break; 10469 case -892481550: // status 10470 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 10471 break; 10472 case -1618432855: // identifier 10473 this.identifier = castToIdentifier(value); // Identifier 10474 break; 10475 case -404562712: // experimental 10476 this.experimental = castToBoolean(value); // BooleanType 10477 break; 10478 case 1447404028: // publisher 10479 this.publisher = castToString(value); // StringType 10480 break; 10481 case 951526432: // contact 10482 this.getContact().add((TestScriptContactComponent) value); // TestScriptContactComponent 10483 break; 10484 case 3076014: // date 10485 this.date = castToDateTime(value); // DateTimeType 10486 break; 10487 case -1724546052: // description 10488 this.description = castToString(value); // StringType 10489 break; 10490 case -669707736: // useContext 10491 this.getUseContext().add(castToCodeableConcept(value)); // CodeableConcept 10492 break; 10493 case -1619874672: // requirements 10494 this.requirements = castToString(value); // StringType 10495 break; 10496 case 1522889671: // copyright 10497 this.copyright = castToString(value); // StringType 10498 break; 10499 case -1008619738: // origin 10500 this.getOrigin().add((TestScriptOriginComponent) value); // TestScriptOriginComponent 10501 break; 10502 case -1429847026: // destination 10503 this.getDestination().add((TestScriptDestinationComponent) value); // TestScriptDestinationComponent 10504 break; 10505 case -450004177: // metadata 10506 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 10507 break; 10508 case -843449847: // fixture 10509 this.getFixture().add((TestScriptFixtureComponent) value); // TestScriptFixtureComponent 10510 break; 10511 case -309425751: // profile 10512 this.getProfile().add(castToReference(value)); // Reference 10513 break; 10514 case -1249586564: // variable 10515 this.getVariable().add((TestScriptVariableComponent) value); // TestScriptVariableComponent 10516 break; 10517 case 3512060: // rule 10518 this.getRule().add((TestScriptRuleComponent) value); // TestScriptRuleComponent 10519 break; 10520 case 1548678118: // ruleset 10521 this.getRuleset().add((TestScriptRulesetComponent) value); // TestScriptRulesetComponent 10522 break; 10523 case 109329021: // setup 10524 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 10525 break; 10526 case 3556498: // test 10527 this.getTest().add((TestScriptTestComponent) value); // TestScriptTestComponent 10528 break; 10529 case -1663474172: // teardown 10530 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 10531 break; 10532 default: super.setProperty(hash, name, value); 10533 } 10534 10535 } 10536 10537 @Override 10538 public void setProperty(String name, Base value) throws FHIRException { 10539 if (name.equals("url")) 10540 this.url = castToUri(value); // UriType 10541 else if (name.equals("version")) 10542 this.version = castToString(value); // StringType 10543 else if (name.equals("name")) 10544 this.name = castToString(value); // StringType 10545 else if (name.equals("status")) 10546 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 10547 else if (name.equals("identifier")) 10548 this.identifier = castToIdentifier(value); // Identifier 10549 else if (name.equals("experimental")) 10550 this.experimental = castToBoolean(value); // BooleanType 10551 else if (name.equals("publisher")) 10552 this.publisher = castToString(value); // StringType 10553 else if (name.equals("contact")) 10554 this.getContact().add((TestScriptContactComponent) value); 10555 else if (name.equals("date")) 10556 this.date = castToDateTime(value); // DateTimeType 10557 else if (name.equals("description")) 10558 this.description = castToString(value); // StringType 10559 else if (name.equals("useContext")) 10560 this.getUseContext().add(castToCodeableConcept(value)); 10561 else if (name.equals("requirements")) 10562 this.requirements = castToString(value); // StringType 10563 else if (name.equals("copyright")) 10564 this.copyright = castToString(value); // StringType 10565 else if (name.equals("origin")) 10566 this.getOrigin().add((TestScriptOriginComponent) value); 10567 else if (name.equals("destination")) 10568 this.getDestination().add((TestScriptDestinationComponent) value); 10569 else if (name.equals("metadata")) 10570 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 10571 else if (name.equals("fixture")) 10572 this.getFixture().add((TestScriptFixtureComponent) value); 10573 else if (name.equals("profile")) 10574 this.getProfile().add(castToReference(value)); 10575 else if (name.equals("variable")) 10576 this.getVariable().add((TestScriptVariableComponent) value); 10577 else if (name.equals("rule")) 10578 this.getRule().add((TestScriptRuleComponent) value); 10579 else if (name.equals("ruleset")) 10580 this.getRuleset().add((TestScriptRulesetComponent) value); 10581 else if (name.equals("setup")) 10582 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 10583 else if (name.equals("test")) 10584 this.getTest().add((TestScriptTestComponent) value); 10585 else if (name.equals("teardown")) 10586 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 10587 else 10588 super.setProperty(name, value); 10589 } 10590 10591 @Override 10592 public Base makeProperty(int hash, String name) throws FHIRException { 10593 switch (hash) { 10594 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 10595 case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType 10596 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 10597 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ConformanceResourceStatus> 10598 case -1618432855: return getIdentifier(); // Identifier 10599 case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType 10600 case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType 10601 case 951526432: return addContact(); // TestScriptContactComponent 10602 case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType 10603 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 10604 case -669707736: return addUseContext(); // CodeableConcept 10605 case -1619874672: throw new FHIRException("Cannot make property requirements as it is not a complex type"); // StringType 10606 case 1522889671: throw new FHIRException("Cannot make property copyright as it is not a complex type"); // StringType 10607 case -1008619738: return addOrigin(); // TestScriptOriginComponent 10608 case -1429847026: return addDestination(); // TestScriptDestinationComponent 10609 case -450004177: return getMetadata(); // TestScriptMetadataComponent 10610 case -843449847: return addFixture(); // TestScriptFixtureComponent 10611 case -309425751: return addProfile(); // Reference 10612 case -1249586564: return addVariable(); // TestScriptVariableComponent 10613 case 3512060: return addRule(); // TestScriptRuleComponent 10614 case 1548678118: return addRuleset(); // TestScriptRulesetComponent 10615 case 109329021: return getSetup(); // TestScriptSetupComponent 10616 case 3556498: return addTest(); // TestScriptTestComponent 10617 case -1663474172: return getTeardown(); // TestScriptTeardownComponent 10618 default: return super.makeProperty(hash, name); 10619 } 10620 10621 } 10622 10623 @Override 10624 public Base addChild(String name) throws FHIRException { 10625 if (name.equals("url")) { 10626 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 10627 } 10628 else if (name.equals("version")) { 10629 throw new FHIRException("Cannot call addChild on a primitive type TestScript.version"); 10630 } 10631 else if (name.equals("name")) { 10632 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 10633 } 10634 else if (name.equals("status")) { 10635 throw new FHIRException("Cannot call addChild on a primitive type TestScript.status"); 10636 } 10637 else if (name.equals("identifier")) { 10638 this.identifier = new Identifier(); 10639 return this.identifier; 10640 } 10641 else if (name.equals("experimental")) { 10642 throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental"); 10643 } 10644 else if (name.equals("publisher")) { 10645 throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher"); 10646 } 10647 else if (name.equals("contact")) { 10648 return addContact(); 10649 } 10650 else if (name.equals("date")) { 10651 throw new FHIRException("Cannot call addChild on a primitive type TestScript.date"); 10652 } 10653 else if (name.equals("description")) { 10654 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 10655 } 10656 else if (name.equals("useContext")) { 10657 return addUseContext(); 10658 } 10659 else if (name.equals("requirements")) { 10660 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requirements"); 10661 } 10662 else if (name.equals("copyright")) { 10663 throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright"); 10664 } 10665 else if (name.equals("origin")) { 10666 return addOrigin(); 10667 } 10668 else if (name.equals("destination")) { 10669 return addDestination(); 10670 } 10671 else if (name.equals("metadata")) { 10672 this.metadata = new TestScriptMetadataComponent(); 10673 return this.metadata; 10674 } 10675 else if (name.equals("fixture")) { 10676 return addFixture(); 10677 } 10678 else if (name.equals("profile")) { 10679 return addProfile(); 10680 } 10681 else if (name.equals("variable")) { 10682 return addVariable(); 10683 } 10684 else if (name.equals("rule")) { 10685 return addRule(); 10686 } 10687 else if (name.equals("ruleset")) { 10688 return addRuleset(); 10689 } 10690 else if (name.equals("setup")) { 10691 this.setup = new TestScriptSetupComponent(); 10692 return this.setup; 10693 } 10694 else if (name.equals("test")) { 10695 return addTest(); 10696 } 10697 else if (name.equals("teardown")) { 10698 this.teardown = new TestScriptTeardownComponent(); 10699 return this.teardown; 10700 } 10701 else 10702 return super.addChild(name); 10703 } 10704 10705 public String fhirType() { 10706 return "TestScript"; 10707 10708 } 10709 10710 public TestScript copy() { 10711 TestScript dst = new TestScript(); 10712 copyValues(dst); 10713 dst.url = url == null ? null : url.copy(); 10714 dst.version = version == null ? null : version.copy(); 10715 dst.name = name == null ? null : name.copy(); 10716 dst.status = status == null ? null : status.copy(); 10717 dst.identifier = identifier == null ? null : identifier.copy(); 10718 dst.experimental = experimental == null ? null : experimental.copy(); 10719 dst.publisher = publisher == null ? null : publisher.copy(); 10720 if (contact != null) { 10721 dst.contact = new ArrayList<TestScriptContactComponent>(); 10722 for (TestScriptContactComponent i : contact) 10723 dst.contact.add(i.copy()); 10724 }; 10725 dst.date = date == null ? null : date.copy(); 10726 dst.description = description == null ? null : description.copy(); 10727 if (useContext != null) { 10728 dst.useContext = new ArrayList<CodeableConcept>(); 10729 for (CodeableConcept i : useContext) 10730 dst.useContext.add(i.copy()); 10731 }; 10732 dst.requirements = requirements == null ? null : requirements.copy(); 10733 dst.copyright = copyright == null ? null : copyright.copy(); 10734 if (origin != null) { 10735 dst.origin = new ArrayList<TestScriptOriginComponent>(); 10736 for (TestScriptOriginComponent i : origin) 10737 dst.origin.add(i.copy()); 10738 }; 10739 if (destination != null) { 10740 dst.destination = new ArrayList<TestScriptDestinationComponent>(); 10741 for (TestScriptDestinationComponent i : destination) 10742 dst.destination.add(i.copy()); 10743 }; 10744 dst.metadata = metadata == null ? null : metadata.copy(); 10745 if (fixture != null) { 10746 dst.fixture = new ArrayList<TestScriptFixtureComponent>(); 10747 for (TestScriptFixtureComponent i : fixture) 10748 dst.fixture.add(i.copy()); 10749 }; 10750 if (profile != null) { 10751 dst.profile = new ArrayList<Reference>(); 10752 for (Reference i : profile) 10753 dst.profile.add(i.copy()); 10754 }; 10755 if (variable != null) { 10756 dst.variable = new ArrayList<TestScriptVariableComponent>(); 10757 for (TestScriptVariableComponent i : variable) 10758 dst.variable.add(i.copy()); 10759 }; 10760 if (rule != null) { 10761 dst.rule = new ArrayList<TestScriptRuleComponent>(); 10762 for (TestScriptRuleComponent i : rule) 10763 dst.rule.add(i.copy()); 10764 }; 10765 if (ruleset != null) { 10766 dst.ruleset = new ArrayList<TestScriptRulesetComponent>(); 10767 for (TestScriptRulesetComponent i : ruleset) 10768 dst.ruleset.add(i.copy()); 10769 }; 10770 dst.setup = setup == null ? null : setup.copy(); 10771 if (test != null) { 10772 dst.test = new ArrayList<TestScriptTestComponent>(); 10773 for (TestScriptTestComponent i : test) 10774 dst.test.add(i.copy()); 10775 }; 10776 dst.teardown = teardown == null ? null : teardown.copy(); 10777 return dst; 10778 } 10779 10780 protected TestScript typedCopy() { 10781 return copy(); 10782 } 10783 10784 @Override 10785 public boolean equalsDeep(Base other) { 10786 if (!super.equalsDeep(other)) 10787 return false; 10788 if (!(other instanceof TestScript)) 10789 return false; 10790 TestScript o = (TestScript) other; 10791 return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) 10792 && compareDeep(status, o.status, true) && compareDeep(identifier, o.identifier, true) && compareDeep(experimental, o.experimental, true) 10793 && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) 10794 && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) 10795 && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) 10796 && compareDeep(origin, o.origin, true) && compareDeep(destination, o.destination, true) && compareDeep(metadata, o.metadata, true) 10797 && compareDeep(fixture, o.fixture, true) && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true) 10798 && compareDeep(rule, o.rule, true) && compareDeep(ruleset, o.ruleset, true) && compareDeep(setup, o.setup, true) 10799 && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true); 10800 } 10801 10802 @Override 10803 public boolean equalsShallow(Base other) { 10804 if (!super.equalsShallow(other)) 10805 return false; 10806 if (!(other instanceof TestScript)) 10807 return false; 10808 TestScript o = (TestScript) other; 10809 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) 10810 && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) 10811 && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) 10812 && compareValues(copyright, o.copyright, true); 10813 } 10814 10815 public boolean isEmpty() { 10816 return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) 10817 && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (identifier == null || identifier.isEmpty()) 10818 && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) 10819 && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) 10820 && (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty()) 10821 && (copyright == null || copyright.isEmpty()) && (origin == null || origin.isEmpty()) && (destination == null || destination.isEmpty()) 10822 && (metadata == null || metadata.isEmpty()) && (fixture == null || fixture.isEmpty()) && (profile == null || profile.isEmpty()) 10823 && (variable == null || variable.isEmpty()) && (rule == null || rule.isEmpty()) && (ruleset == null || ruleset.isEmpty()) 10824 && (setup == null || setup.isEmpty()) && (test == null || test.isEmpty()) && (teardown == null || teardown.isEmpty()) 10825 ; 10826 } 10827 10828 @Override 10829 public ResourceType getResourceType() { 10830 return ResourceType.TestScript; 10831 } 10832 10833 /** 10834 * Search parameter: <b>testscript-test-capability</b> 10835 * <p> 10836 * Description: <b>TestScript test required and validated capability</b><br> 10837 * Type: <b>string</b><br> 10838 * Path: <b>TestScript.test.metadata.capability.description</b><br> 10839 * </p> 10840 */ 10841 @SearchParamDefinition(name="testscript-test-capability", path="TestScript.test.metadata.capability.description", description="TestScript test required and validated capability", type="string" ) 10842 public static final String SP_TESTSCRIPT_TEST_CAPABILITY = "testscript-test-capability"; 10843 /** 10844 * <b>Fluent Client</b> search parameter constant for <b>testscript-test-capability</b> 10845 * <p> 10846 * Description: <b>TestScript test required and validated capability</b><br> 10847 * Type: <b>string</b><br> 10848 * Path: <b>TestScript.test.metadata.capability.description</b><br> 10849 * </p> 10850 */ 10851 public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_TEST_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_TEST_CAPABILITY); 10852 10853 /** 10854 * Search parameter: <b>testscript-setup-capability</b> 10855 * <p> 10856 * Description: <b>TestScript setup required and validated capability</b><br> 10857 * Type: <b>string</b><br> 10858 * Path: <b>TestScript.setup.metadata.capability.description</b><br> 10859 * </p> 10860 */ 10861 @SearchParamDefinition(name="testscript-setup-capability", path="TestScript.setup.metadata.capability.description", description="TestScript setup required and validated capability", type="string" ) 10862 public static final String SP_TESTSCRIPT_SETUP_CAPABILITY = "testscript-setup-capability"; 10863 /** 10864 * <b>Fluent Client</b> search parameter constant for <b>testscript-setup-capability</b> 10865 * <p> 10866 * Description: <b>TestScript setup required and validated capability</b><br> 10867 * Type: <b>string</b><br> 10868 * Path: <b>TestScript.setup.metadata.capability.description</b><br> 10869 * </p> 10870 */ 10871 public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_SETUP_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_SETUP_CAPABILITY); 10872 10873 /** 10874 * Search parameter: <b>description</b> 10875 * <p> 10876 * Description: <b>Natural language description of the TestScript</b><br> 10877 * Type: <b>string</b><br> 10878 * Path: <b>TestScript.description</b><br> 10879 * </p> 10880 */ 10881 @SearchParamDefinition(name="description", path="TestScript.description", description="Natural language description of the TestScript", type="string" ) 10882 public static final String SP_DESCRIPTION = "description"; 10883 /** 10884 * <b>Fluent Client</b> search parameter constant for <b>description</b> 10885 * <p> 10886 * Description: <b>Natural language description of the TestScript</b><br> 10887 * Type: <b>string</b><br> 10888 * Path: <b>TestScript.description</b><br> 10889 * </p> 10890 */ 10891 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 10892 10893 /** 10894 * Search parameter: <b>name</b> 10895 * <p> 10896 * Description: <b>Informal name for this TestScript</b><br> 10897 * Type: <b>string</b><br> 10898 * Path: <b>TestScript.name</b><br> 10899 * </p> 10900 */ 10901 @SearchParamDefinition(name="name", path="TestScript.name", description="Informal name for this TestScript", type="string" ) 10902 public static final String SP_NAME = "name"; 10903 /** 10904 * <b>Fluent Client</b> search parameter constant for <b>name</b> 10905 * <p> 10906 * Description: <b>Informal name for this TestScript</b><br> 10907 * Type: <b>string</b><br> 10908 * Path: <b>TestScript.name</b><br> 10909 * </p> 10910 */ 10911 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 10912 10913 /** 10914 * Search parameter: <b>testscript-capability</b> 10915 * <p> 10916 * Description: <b>TestScript required and validated capability</b><br> 10917 * Type: <b>string</b><br> 10918 * Path: <b>TestScript.metadata.capability.description</b><br> 10919 * </p> 10920 */ 10921 @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" ) 10922 public static final String SP_TESTSCRIPT_CAPABILITY = "testscript-capability"; 10923 /** 10924 * <b>Fluent Client</b> search parameter constant for <b>testscript-capability</b> 10925 * <p> 10926 * Description: <b>TestScript required and validated capability</b><br> 10927 * Type: <b>string</b><br> 10928 * Path: <b>TestScript.metadata.capability.description</b><br> 10929 * </p> 10930 */ 10931 public static final ca.uhn.fhir.rest.gclient.StringClientParam TESTSCRIPT_CAPABILITY = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_TESTSCRIPT_CAPABILITY); 10932 10933 /** 10934 * Search parameter: <b>identifier</b> 10935 * <p> 10936 * Description: <b>External identifier</b><br> 10937 * Type: <b>token</b><br> 10938 * Path: <b>TestScript.identifier</b><br> 10939 * </p> 10940 */ 10941 @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier", type="token" ) 10942 public static final String SP_IDENTIFIER = "identifier"; 10943 /** 10944 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 10945 * <p> 10946 * Description: <b>External identifier</b><br> 10947 * Type: <b>token</b><br> 10948 * Path: <b>TestScript.identifier</b><br> 10949 * </p> 10950 */ 10951 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 10952 10953 /** 10954 * Search parameter: <b>url</b> 10955 * <p> 10956 * Description: <b>Absolute URL used to reference this TestScript</b><br> 10957 * Type: <b>uri</b><br> 10958 * Path: <b>TestScript.url</b><br> 10959 * </p> 10960 */ 10961 @SearchParamDefinition(name="url", path="TestScript.url", description="Absolute URL used to reference this TestScript", type="uri" ) 10962 public static final String SP_URL = "url"; 10963 /** 10964 * <b>Fluent Client</b> search parameter constant for <b>url</b> 10965 * <p> 10966 * Description: <b>Absolute URL used to reference this TestScript</b><br> 10967 * Type: <b>uri</b><br> 10968 * Path: <b>TestScript.url</b><br> 10969 * </p> 10970 */ 10971 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 10972 10973 10974}