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