001package org.hl7.fhir.instance.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 Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 033import java.util.*; 034 035import org.hl7.fhir.exceptions.FHIRException; 036import org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatus; 037import org.hl7.fhir.instance.model.Enumerations.ConformanceResourceStatusEnumFactory; 038import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 039import org.hl7.fhir.utilities.Utilities; 040 041import ca.uhn.fhir.model.api.annotation.*; 042/** 043 * TestScript is a resource that specifies a suite of tests against a FHIR server implementation to determine compliance against the FHIR specification. 044 */ 045@ResourceDef(name="TestScript", profile="http://hl7.org/fhir/Profile/TestScript") 046public class TestScript extends DomainResource { 047 048 public enum ContentType { 049 /** 050 * XML content-type corresponding to the application/xml+fhir mime-type. 051 */ 052 XML, 053 /** 054 * JSON content-type corresponding to the application/json+fhir mime-type. 055 */ 056 JSON, 057 /** 058 * added to help the parsers 059 */ 060 NULL; 061 public static ContentType fromCode(String codeString) throws FHIRException { 062 if (codeString == null || "".equals(codeString)) 063 return null; 064 if ("xml".equals(codeString)) 065 return XML; 066 if ("json".equals(codeString)) 067 return JSON; 068 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 069 } 070 public String toCode() { 071 switch (this) { 072 case XML: return "xml"; 073 case JSON: return "json"; 074 default: return "?"; 075 } 076 } 077 public String getSystem() { 078 switch (this) { 079 case XML: return "http://hl7.org/fhir/content-type"; 080 case JSON: return "http://hl7.org/fhir/content-type"; 081 default: return "?"; 082 } 083 } 084 public String getDefinition() { 085 switch (this) { 086 case XML: return "XML content-type corresponding to the application/xml+fhir mime-type."; 087 case JSON: return "JSON content-type corresponding to the application/json+fhir mime-type."; 088 default: return "?"; 089 } 090 } 091 public String getDisplay() { 092 switch (this) { 093 case XML: return "xml"; 094 case JSON: return "json"; 095 default: return "?"; 096 } 097 } 098 } 099 100 public static class ContentTypeEnumFactory implements EnumFactory<ContentType> { 101 public ContentType fromCode(String codeString) throws IllegalArgumentException { 102 if (codeString == null || "".equals(codeString)) 103 if (codeString == null || "".equals(codeString)) 104 return null; 105 if ("xml".equals(codeString)) 106 return ContentType.XML; 107 if ("json".equals(codeString)) 108 return ContentType.JSON; 109 throw new IllegalArgumentException("Unknown ContentType code '"+codeString+"'"); 110 } 111 public Enumeration<ContentType> fromType(Base code) throws FHIRException { 112 if (code == null || code.isEmpty()) 113 return null; 114 String codeString = ((PrimitiveType) code).asStringValue(); 115 if (codeString == null || "".equals(codeString)) 116 return null; 117 if ("xml".equals(codeString)) 118 return new Enumeration<ContentType>(this, ContentType.XML); 119 if ("json".equals(codeString)) 120 return new Enumeration<ContentType>(this, ContentType.JSON); 121 throw new FHIRException("Unknown ContentType code '"+codeString+"'"); 122 } 123 public String toCode(ContentType code) { 124 if (code == ContentType.XML) 125 return "xml"; 126 if (code == ContentType.JSON) 127 return "json"; 128 return "?"; 129 } 130 } 131 132 public enum AssertionDirectionType { 133 /** 134 * The assertion is evaluated on the response. This is the default value. 135 */ 136 RESPONSE, 137 /** 138 * The assertion is evaluated on the request. 139 */ 140 REQUEST, 141 /** 142 * added to help the parsers 143 */ 144 NULL; 145 public static AssertionDirectionType fromCode(String codeString) throws FHIRException { 146 if (codeString == null || "".equals(codeString)) 147 return null; 148 if ("response".equals(codeString)) 149 return RESPONSE; 150 if ("request".equals(codeString)) 151 return REQUEST; 152 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 153 } 154 public String toCode() { 155 switch (this) { 156 case RESPONSE: return "response"; 157 case REQUEST: return "request"; 158 default: return "?"; 159 } 160 } 161 public String getSystem() { 162 switch (this) { 163 case RESPONSE: return "http://hl7.org/fhir/assert-direction-codes"; 164 case REQUEST: return "http://hl7.org/fhir/assert-direction-codes"; 165 default: return "?"; 166 } 167 } 168 public String getDefinition() { 169 switch (this) { 170 case RESPONSE: return "The assertion is evaluated on the response. This is the default value."; 171 case REQUEST: return "The assertion is evaluated on the request."; 172 default: return "?"; 173 } 174 } 175 public String getDisplay() { 176 switch (this) { 177 case RESPONSE: return "response"; 178 case REQUEST: return "request"; 179 default: return "?"; 180 } 181 } 182 } 183 184 public static class AssertionDirectionTypeEnumFactory implements EnumFactory<AssertionDirectionType> { 185 public AssertionDirectionType fromCode(String codeString) throws IllegalArgumentException { 186 if (codeString == null || "".equals(codeString)) 187 if (codeString == null || "".equals(codeString)) 188 return null; 189 if ("response".equals(codeString)) 190 return AssertionDirectionType.RESPONSE; 191 if ("request".equals(codeString)) 192 return AssertionDirectionType.REQUEST; 193 throw new IllegalArgumentException("Unknown AssertionDirectionType code '"+codeString+"'"); 194 } 195 public Enumeration<AssertionDirectionType> fromType(Base code) throws FHIRException { 196 if (code == null || code.isEmpty()) 197 return null; 198 String codeString = ((PrimitiveType) code).asStringValue(); 199 if (codeString == null || "".equals(codeString)) 200 return null; 201 if ("response".equals(codeString)) 202 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.RESPONSE); 203 if ("request".equals(codeString)) 204 return new Enumeration<AssertionDirectionType>(this, AssertionDirectionType.REQUEST); 205 throw new FHIRException("Unknown AssertionDirectionType code '"+codeString+"'"); 206 } 207 public String toCode(AssertionDirectionType code) { 208 if (code == AssertionDirectionType.RESPONSE) 209 return "response"; 210 if (code == AssertionDirectionType.REQUEST) 211 return "request"; 212 return "?"; 213 } 214 } 215 216 public enum AssertionOperatorType { 217 /** 218 * Default value. Equals comparison. 219 */ 220 EQUALS, 221 /** 222 * Not equals comparison. 223 */ 224 NOTEQUALS, 225 /** 226 * Compare value within a known set of values. 227 */ 228 IN, 229 /** 230 * Compare value not within a known set of values. 231 */ 232 NOTIN, 233 /** 234 * Compare value to be greater than a known value. 235 */ 236 GREATERTHAN, 237 /** 238 * Compare value to be less than a known value. 239 */ 240 LESSTHAN, 241 /** 242 * Compare value is empty. 243 */ 244 EMPTY, 245 /** 246 * Compare value is not empty. 247 */ 248 NOTEMPTY, 249 /** 250 * Compare value string contains a known value. 251 */ 252 CONTAINS, 253 /** 254 * Compare value string does not contain a known value. 255 */ 256 NOTCONTAINS, 257 /** 258 * added to help the parsers 259 */ 260 NULL; 261 public static AssertionOperatorType fromCode(String codeString) throws FHIRException { 262 if (codeString == null || "".equals(codeString)) 263 return null; 264 if ("equals".equals(codeString)) 265 return EQUALS; 266 if ("notEquals".equals(codeString)) 267 return NOTEQUALS; 268 if ("in".equals(codeString)) 269 return IN; 270 if ("notIn".equals(codeString)) 271 return NOTIN; 272 if ("greaterThan".equals(codeString)) 273 return GREATERTHAN; 274 if ("lessThan".equals(codeString)) 275 return LESSTHAN; 276 if ("empty".equals(codeString)) 277 return EMPTY; 278 if ("notEmpty".equals(codeString)) 279 return NOTEMPTY; 280 if ("contains".equals(codeString)) 281 return CONTAINS; 282 if ("notContains".equals(codeString)) 283 return NOTCONTAINS; 284 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 285 } 286 public String toCode() { 287 switch (this) { 288 case EQUALS: return "equals"; 289 case NOTEQUALS: return "notEquals"; 290 case IN: return "in"; 291 case NOTIN: return "notIn"; 292 case GREATERTHAN: return "greaterThan"; 293 case LESSTHAN: return "lessThan"; 294 case EMPTY: return "empty"; 295 case NOTEMPTY: return "notEmpty"; 296 case CONTAINS: return "contains"; 297 case NOTCONTAINS: return "notContains"; 298 default: return "?"; 299 } 300 } 301 public String getSystem() { 302 switch (this) { 303 case EQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 304 case NOTEQUALS: return "http://hl7.org/fhir/assert-operator-codes"; 305 case IN: return "http://hl7.org/fhir/assert-operator-codes"; 306 case NOTIN: return "http://hl7.org/fhir/assert-operator-codes"; 307 case GREATERTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 308 case LESSTHAN: return "http://hl7.org/fhir/assert-operator-codes"; 309 case EMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 310 case NOTEMPTY: return "http://hl7.org/fhir/assert-operator-codes"; 311 case CONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 312 case NOTCONTAINS: return "http://hl7.org/fhir/assert-operator-codes"; 313 default: return "?"; 314 } 315 } 316 public String getDefinition() { 317 switch (this) { 318 case EQUALS: return "Default value. Equals comparison."; 319 case NOTEQUALS: return "Not equals comparison."; 320 case IN: return "Compare value within a known set of values."; 321 case NOTIN: return "Compare value not within a known set of values."; 322 case GREATERTHAN: return "Compare value to be greater than a known value."; 323 case LESSTHAN: return "Compare value to be less than a known value."; 324 case EMPTY: return "Compare value is empty."; 325 case NOTEMPTY: return "Compare value is not empty."; 326 case CONTAINS: return "Compare value string contains a known value."; 327 case NOTCONTAINS: return "Compare value string does not contain a known value."; 328 default: return "?"; 329 } 330 } 331 public String getDisplay() { 332 switch (this) { 333 case EQUALS: return "equals"; 334 case NOTEQUALS: return "notEquals"; 335 case IN: return "in"; 336 case NOTIN: return "notIn"; 337 case GREATERTHAN: return "greaterThan"; 338 case LESSTHAN: return "lessThan"; 339 case EMPTY: return "empty"; 340 case NOTEMPTY: return "notEmpty"; 341 case CONTAINS: return "contains"; 342 case NOTCONTAINS: return "notContains"; 343 default: return "?"; 344 } 345 } 346 } 347 348 public static class AssertionOperatorTypeEnumFactory implements EnumFactory<AssertionOperatorType> { 349 public AssertionOperatorType fromCode(String codeString) throws IllegalArgumentException { 350 if (codeString == null || "".equals(codeString)) 351 if (codeString == null || "".equals(codeString)) 352 return null; 353 if ("equals".equals(codeString)) 354 return AssertionOperatorType.EQUALS; 355 if ("notEquals".equals(codeString)) 356 return AssertionOperatorType.NOTEQUALS; 357 if ("in".equals(codeString)) 358 return AssertionOperatorType.IN; 359 if ("notIn".equals(codeString)) 360 return AssertionOperatorType.NOTIN; 361 if ("greaterThan".equals(codeString)) 362 return AssertionOperatorType.GREATERTHAN; 363 if ("lessThan".equals(codeString)) 364 return AssertionOperatorType.LESSTHAN; 365 if ("empty".equals(codeString)) 366 return AssertionOperatorType.EMPTY; 367 if ("notEmpty".equals(codeString)) 368 return AssertionOperatorType.NOTEMPTY; 369 if ("contains".equals(codeString)) 370 return AssertionOperatorType.CONTAINS; 371 if ("notContains".equals(codeString)) 372 return AssertionOperatorType.NOTCONTAINS; 373 throw new IllegalArgumentException("Unknown AssertionOperatorType code '"+codeString+"'"); 374 } 375 public Enumeration<AssertionOperatorType> fromType(Base code) throws FHIRException { 376 if (code == null || code.isEmpty()) 377 return null; 378 String codeString = ((PrimitiveType) code).asStringValue(); 379 if (codeString == null || "".equals(codeString)) 380 return null; 381 if ("equals".equals(codeString)) 382 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EQUALS); 383 if ("notEquals".equals(codeString)) 384 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEQUALS); 385 if ("in".equals(codeString)) 386 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.IN); 387 if ("notIn".equals(codeString)) 388 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTIN); 389 if ("greaterThan".equals(codeString)) 390 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.GREATERTHAN); 391 if ("lessThan".equals(codeString)) 392 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.LESSTHAN); 393 if ("empty".equals(codeString)) 394 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.EMPTY); 395 if ("notEmpty".equals(codeString)) 396 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTEMPTY); 397 if ("contains".equals(codeString)) 398 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.CONTAINS); 399 if ("notContains".equals(codeString)) 400 return new Enumeration<AssertionOperatorType>(this, AssertionOperatorType.NOTCONTAINS); 401 throw new FHIRException("Unknown AssertionOperatorType code '"+codeString+"'"); 402 } 403 public String toCode(AssertionOperatorType code) { 404 if (code == AssertionOperatorType.EQUALS) 405 return "equals"; 406 if (code == AssertionOperatorType.NOTEQUALS) 407 return "notEquals"; 408 if (code == AssertionOperatorType.IN) 409 return "in"; 410 if (code == AssertionOperatorType.NOTIN) 411 return "notIn"; 412 if (code == AssertionOperatorType.GREATERTHAN) 413 return "greaterThan"; 414 if (code == AssertionOperatorType.LESSTHAN) 415 return "lessThan"; 416 if (code == AssertionOperatorType.EMPTY) 417 return "empty"; 418 if (code == AssertionOperatorType.NOTEMPTY) 419 return "notEmpty"; 420 if (code == AssertionOperatorType.CONTAINS) 421 return "contains"; 422 if (code == AssertionOperatorType.NOTCONTAINS) 423 return "notContains"; 424 return "?"; 425 } 426 } 427 428 public enum AssertionResponseTypes { 429 /** 430 * Response code is 200. 431 */ 432 OKAY, 433 /** 434 * Response code is 201. 435 */ 436 CREATED, 437 /** 438 * Response code is 204. 439 */ 440 NOCONTENT, 441 /** 442 * Response code is 304. 443 */ 444 NOTMODIFIED, 445 /** 446 * Response code is 400. 447 */ 448 BAD, 449 /** 450 * Response code is 403. 451 */ 452 FORBIDDEN, 453 /** 454 * Response code is 404. 455 */ 456 NOTFOUND, 457 /** 458 * Response code is 405. 459 */ 460 METHODNOTALLOWED, 461 /** 462 * Response code is 409. 463 */ 464 CONFLICT, 465 /** 466 * Response code is 410. 467 */ 468 GONE, 469 /** 470 * Response code is 412. 471 */ 472 PRECONDITIONFAILED, 473 /** 474 * Response code is 422. 475 */ 476 UNPROCESSABLE, 477 /** 478 * added to help the parsers 479 */ 480 NULL; 481 public static AssertionResponseTypes fromCode(String codeString) throws FHIRException { 482 if (codeString == null || "".equals(codeString)) 483 return null; 484 if ("okay".equals(codeString)) 485 return OKAY; 486 if ("created".equals(codeString)) 487 return CREATED; 488 if ("noContent".equals(codeString)) 489 return NOCONTENT; 490 if ("notModified".equals(codeString)) 491 return NOTMODIFIED; 492 if ("bad".equals(codeString)) 493 return BAD; 494 if ("forbidden".equals(codeString)) 495 return FORBIDDEN; 496 if ("notFound".equals(codeString)) 497 return NOTFOUND; 498 if ("methodNotAllowed".equals(codeString)) 499 return METHODNOTALLOWED; 500 if ("conflict".equals(codeString)) 501 return CONFLICT; 502 if ("gone".equals(codeString)) 503 return GONE; 504 if ("preconditionFailed".equals(codeString)) 505 return PRECONDITIONFAILED; 506 if ("unprocessable".equals(codeString)) 507 return UNPROCESSABLE; 508 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 509 } 510 public String toCode() { 511 switch (this) { 512 case OKAY: return "okay"; 513 case CREATED: return "created"; 514 case NOCONTENT: return "noContent"; 515 case NOTMODIFIED: return "notModified"; 516 case BAD: return "bad"; 517 case FORBIDDEN: return "forbidden"; 518 case NOTFOUND: return "notFound"; 519 case METHODNOTALLOWED: return "methodNotAllowed"; 520 case CONFLICT: return "conflict"; 521 case GONE: return "gone"; 522 case PRECONDITIONFAILED: return "preconditionFailed"; 523 case UNPROCESSABLE: return "unprocessable"; 524 default: return "?"; 525 } 526 } 527 public String getSystem() { 528 switch (this) { 529 case OKAY: return "http://hl7.org/fhir/assert-response-code-types"; 530 case CREATED: return "http://hl7.org/fhir/assert-response-code-types"; 531 case NOCONTENT: return "http://hl7.org/fhir/assert-response-code-types"; 532 case NOTMODIFIED: return "http://hl7.org/fhir/assert-response-code-types"; 533 case BAD: return "http://hl7.org/fhir/assert-response-code-types"; 534 case FORBIDDEN: return "http://hl7.org/fhir/assert-response-code-types"; 535 case NOTFOUND: return "http://hl7.org/fhir/assert-response-code-types"; 536 case METHODNOTALLOWED: return "http://hl7.org/fhir/assert-response-code-types"; 537 case CONFLICT: return "http://hl7.org/fhir/assert-response-code-types"; 538 case GONE: return "http://hl7.org/fhir/assert-response-code-types"; 539 case PRECONDITIONFAILED: return "http://hl7.org/fhir/assert-response-code-types"; 540 case UNPROCESSABLE: return "http://hl7.org/fhir/assert-response-code-types"; 541 default: return "?"; 542 } 543 } 544 public String getDefinition() { 545 switch (this) { 546 case OKAY: return "Response code is 200."; 547 case CREATED: return "Response code is 201."; 548 case NOCONTENT: return "Response code is 204."; 549 case NOTMODIFIED: return "Response code is 304."; 550 case BAD: return "Response code is 400."; 551 case FORBIDDEN: return "Response code is 403."; 552 case NOTFOUND: return "Response code is 404."; 553 case METHODNOTALLOWED: return "Response code is 405."; 554 case CONFLICT: return "Response code is 409."; 555 case GONE: return "Response code is 410."; 556 case PRECONDITIONFAILED: return "Response code is 412."; 557 case UNPROCESSABLE: return "Response code is 422."; 558 default: return "?"; 559 } 560 } 561 public String getDisplay() { 562 switch (this) { 563 case OKAY: return "okay"; 564 case CREATED: return "created"; 565 case NOCONTENT: return "noContent"; 566 case NOTMODIFIED: return "notModified"; 567 case BAD: return "bad"; 568 case FORBIDDEN: return "forbidden"; 569 case NOTFOUND: return "notFound"; 570 case METHODNOTALLOWED: return "methodNotAllowed"; 571 case CONFLICT: return "conflict"; 572 case GONE: return "gone"; 573 case PRECONDITIONFAILED: return "preconditionFailed"; 574 case UNPROCESSABLE: return "unprocessable"; 575 default: return "?"; 576 } 577 } 578 } 579 580 public static class AssertionResponseTypesEnumFactory implements EnumFactory<AssertionResponseTypes> { 581 public AssertionResponseTypes fromCode(String codeString) throws IllegalArgumentException { 582 if (codeString == null || "".equals(codeString)) 583 if (codeString == null || "".equals(codeString)) 584 return null; 585 if ("okay".equals(codeString)) 586 return AssertionResponseTypes.OKAY; 587 if ("created".equals(codeString)) 588 return AssertionResponseTypes.CREATED; 589 if ("noContent".equals(codeString)) 590 return AssertionResponseTypes.NOCONTENT; 591 if ("notModified".equals(codeString)) 592 return AssertionResponseTypes.NOTMODIFIED; 593 if ("bad".equals(codeString)) 594 return AssertionResponseTypes.BAD; 595 if ("forbidden".equals(codeString)) 596 return AssertionResponseTypes.FORBIDDEN; 597 if ("notFound".equals(codeString)) 598 return AssertionResponseTypes.NOTFOUND; 599 if ("methodNotAllowed".equals(codeString)) 600 return AssertionResponseTypes.METHODNOTALLOWED; 601 if ("conflict".equals(codeString)) 602 return AssertionResponseTypes.CONFLICT; 603 if ("gone".equals(codeString)) 604 return AssertionResponseTypes.GONE; 605 if ("preconditionFailed".equals(codeString)) 606 return AssertionResponseTypes.PRECONDITIONFAILED; 607 if ("unprocessable".equals(codeString)) 608 return AssertionResponseTypes.UNPROCESSABLE; 609 throw new IllegalArgumentException("Unknown AssertionResponseTypes code '"+codeString+"'"); 610 } 611 public Enumeration<AssertionResponseTypes> fromType(Base code) throws FHIRException { 612 if (code == null || code.isEmpty()) 613 return null; 614 String codeString = ((PrimitiveType) code).asStringValue(); 615 if (codeString == null || "".equals(codeString)) 616 return null; 617 if ("okay".equals(codeString)) 618 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.OKAY); 619 if ("created".equals(codeString)) 620 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CREATED); 621 if ("noContent".equals(codeString)) 622 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOCONTENT); 623 if ("notModified".equals(codeString)) 624 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTMODIFIED); 625 if ("bad".equals(codeString)) 626 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.BAD); 627 if ("forbidden".equals(codeString)) 628 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.FORBIDDEN); 629 if ("notFound".equals(codeString)) 630 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.NOTFOUND); 631 if ("methodNotAllowed".equals(codeString)) 632 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.METHODNOTALLOWED); 633 if ("conflict".equals(codeString)) 634 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.CONFLICT); 635 if ("gone".equals(codeString)) 636 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.GONE); 637 if ("preconditionFailed".equals(codeString)) 638 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.PRECONDITIONFAILED); 639 if ("unprocessable".equals(codeString)) 640 return new Enumeration<AssertionResponseTypes>(this, AssertionResponseTypes.UNPROCESSABLE); 641 throw new FHIRException("Unknown AssertionResponseTypes code '"+codeString+"'"); 642 } 643 public String toCode(AssertionResponseTypes code) { 644 if (code == AssertionResponseTypes.OKAY) 645 return "okay"; 646 if (code == AssertionResponseTypes.CREATED) 647 return "created"; 648 if (code == AssertionResponseTypes.NOCONTENT) 649 return "noContent"; 650 if (code == AssertionResponseTypes.NOTMODIFIED) 651 return "notModified"; 652 if (code == AssertionResponseTypes.BAD) 653 return "bad"; 654 if (code == AssertionResponseTypes.FORBIDDEN) 655 return "forbidden"; 656 if (code == AssertionResponseTypes.NOTFOUND) 657 return "notFound"; 658 if (code == AssertionResponseTypes.METHODNOTALLOWED) 659 return "methodNotAllowed"; 660 if (code == AssertionResponseTypes.CONFLICT) 661 return "conflict"; 662 if (code == AssertionResponseTypes.GONE) 663 return "gone"; 664 if (code == AssertionResponseTypes.PRECONDITIONFAILED) 665 return "preconditionFailed"; 666 if (code == AssertionResponseTypes.UNPROCESSABLE) 667 return "unprocessable"; 668 return "?"; 669 } 670 } 671 672 @Block() 673 public static class TestScriptContactComponent extends BackboneElement implements IBaseBackboneElement { 674 /** 675 * The name of an individual to contact regarding the Test Script. 676 */ 677 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 678 @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the Test Script." ) 679 protected StringType name; 680 681 /** 682 * Contact details for individual (if a name was provided) or the publisher. 683 */ 684 @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 685 @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) 686 protected List<ContactPoint> telecom; 687 688 private static final long serialVersionUID = -1179697803L; 689 690 /* 691 * Constructor 692 */ 693 public TestScriptContactComponent() { 694 super(); 695 } 696 697 /** 698 * @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 699 */ 700 public StringType getNameElement() { 701 if (this.name == null) 702 if (Configuration.errorOnAutoCreate()) 703 throw new Error("Attempt to auto-create TestScriptContactComponent.name"); 704 else if (Configuration.doAutoCreate()) 705 this.name = new StringType(); // bb 706 return this.name; 707 } 708 709 public boolean hasNameElement() { 710 return this.name != null && !this.name.isEmpty(); 711 } 712 713 public boolean hasName() { 714 return this.name != null && !this.name.isEmpty(); 715 } 716 717 /** 718 * @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 719 */ 720 public TestScriptContactComponent setNameElement(StringType value) { 721 this.name = value; 722 return this; 723 } 724 725 /** 726 * @return The name of an individual to contact regarding the Test Script. 727 */ 728 public String getName() { 729 return this.name == null ? null : this.name.getValue(); 730 } 731 732 /** 733 * @param value The name of an individual to contact regarding the Test Script. 734 */ 735 public TestScriptContactComponent setName(String value) { 736 if (Utilities.noString(value)) 737 this.name = null; 738 else { 739 if (this.name == null) 740 this.name = new StringType(); 741 this.name.setValue(value); 742 } 743 return this; 744 } 745 746 /** 747 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 748 */ 749 public List<ContactPoint> getTelecom() { 750 if (this.telecom == null) 751 this.telecom = new ArrayList<ContactPoint>(); 752 return this.telecom; 753 } 754 755 public boolean hasTelecom() { 756 if (this.telecom == null) 757 return false; 758 for (ContactPoint item : this.telecom) 759 if (!item.isEmpty()) 760 return true; 761 return false; 762 } 763 764 /** 765 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 766 */ 767 // syntactic sugar 768 public ContactPoint addTelecom() { //3 769 ContactPoint t = new ContactPoint(); 770 if (this.telecom == null) 771 this.telecom = new ArrayList<ContactPoint>(); 772 this.telecom.add(t); 773 return t; 774 } 775 776 // syntactic sugar 777 public TestScriptContactComponent addTelecom(ContactPoint t) { //3 778 if (t == null) 779 return this; 780 if (this.telecom == null) 781 this.telecom = new ArrayList<ContactPoint>(); 782 this.telecom.add(t); 783 return this; 784 } 785 786 protected void listChildren(List<Property> childrenList) { 787 super.listChildren(childrenList); 788 childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the Test Script.", 0, java.lang.Integer.MAX_VALUE, name)); 789 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)); 790 } 791 792 @Override 793 public void setProperty(String name, Base value) throws FHIRException { 794 if (name.equals("name")) 795 this.name = castToString(value); // StringType 796 else if (name.equals("telecom")) 797 this.getTelecom().add(castToContactPoint(value)); 798 else 799 super.setProperty(name, value); 800 } 801 802 @Override 803 public Base addChild(String name) throws FHIRException { 804 if (name.equals("name")) { 805 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 806 } 807 else if (name.equals("telecom")) { 808 return addTelecom(); 809 } 810 else 811 return super.addChild(name); 812 } 813 814 public TestScriptContactComponent copy() { 815 TestScriptContactComponent dst = new TestScriptContactComponent(); 816 copyValues(dst); 817 dst.name = name == null ? null : name.copy(); 818 if (telecom != null) { 819 dst.telecom = new ArrayList<ContactPoint>(); 820 for (ContactPoint i : telecom) 821 dst.telecom.add(i.copy()); 822 }; 823 return dst; 824 } 825 826 @Override 827 public boolean equalsDeep(Base other) { 828 if (!super.equalsDeep(other)) 829 return false; 830 if (!(other instanceof TestScriptContactComponent)) 831 return false; 832 TestScriptContactComponent o = (TestScriptContactComponent) other; 833 return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); 834 } 835 836 @Override 837 public boolean equalsShallow(Base other) { 838 if (!super.equalsShallow(other)) 839 return false; 840 if (!(other instanceof TestScriptContactComponent)) 841 return false; 842 TestScriptContactComponent o = (TestScriptContactComponent) other; 843 return compareValues(name, o.name, true); 844 } 845 846 public boolean isEmpty() { 847 return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) 848 ; 849 } 850 851 public String fhirType() { 852 return "TestScript.contact"; 853 854 } 855 856 } 857 858 @Block() 859 public static class TestScriptMetadataComponent extends BackboneElement implements IBaseBackboneElement { 860 /** 861 * A link to the FHIR specification that this test is covering. 862 */ 863 @Child(name = "link", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 864 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="A link to the FHIR specification that this test is covering." ) 865 protected List<TestScriptMetadataLinkComponent> link; 866 867 /** 868 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 869 */ 870 @Child(name = "capability", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 871 @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." ) 872 protected List<TestScriptMetadataCapabilityComponent> capability; 873 874 private static final long serialVersionUID = 745183328L; 875 876 /* 877 * Constructor 878 */ 879 public TestScriptMetadataComponent() { 880 super(); 881 } 882 883 /** 884 * @return {@link #link} (A link to the FHIR specification that this test is covering.) 885 */ 886 public List<TestScriptMetadataLinkComponent> getLink() { 887 if (this.link == null) 888 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 889 return this.link; 890 } 891 892 public boolean hasLink() { 893 if (this.link == null) 894 return false; 895 for (TestScriptMetadataLinkComponent item : this.link) 896 if (!item.isEmpty()) 897 return true; 898 return false; 899 } 900 901 /** 902 * @return {@link #link} (A link to the FHIR specification that this test is covering.) 903 */ 904 // syntactic sugar 905 public TestScriptMetadataLinkComponent addLink() { //3 906 TestScriptMetadataLinkComponent t = new TestScriptMetadataLinkComponent(); 907 if (this.link == null) 908 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 909 this.link.add(t); 910 return t; 911 } 912 913 // syntactic sugar 914 public TestScriptMetadataComponent addLink(TestScriptMetadataLinkComponent t) { //3 915 if (t == null) 916 return this; 917 if (this.link == null) 918 this.link = new ArrayList<TestScriptMetadataLinkComponent>(); 919 this.link.add(t); 920 return this; 921 } 922 923 /** 924 * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 925 */ 926 public List<TestScriptMetadataCapabilityComponent> getCapability() { 927 if (this.capability == null) 928 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 929 return this.capability; 930 } 931 932 public boolean hasCapability() { 933 if (this.capability == null) 934 return false; 935 for (TestScriptMetadataCapabilityComponent item : this.capability) 936 if (!item.isEmpty()) 937 return true; 938 return false; 939 } 940 941 /** 942 * @return {@link #capability} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 943 */ 944 // syntactic sugar 945 public TestScriptMetadataCapabilityComponent addCapability() { //3 946 TestScriptMetadataCapabilityComponent t = new TestScriptMetadataCapabilityComponent(); 947 if (this.capability == null) 948 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 949 this.capability.add(t); 950 return t; 951 } 952 953 // syntactic sugar 954 public TestScriptMetadataComponent addCapability(TestScriptMetadataCapabilityComponent t) { //3 955 if (t == null) 956 return this; 957 if (this.capability == null) 958 this.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 959 this.capability.add(t); 960 return this; 961 } 962 963 protected void listChildren(List<Property> childrenList) { 964 super.listChildren(childrenList); 965 childrenList.add(new Property("link", "", "A link to the FHIR specification that this test is covering.", 0, java.lang.Integer.MAX_VALUE, link)); 966 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)); 967 } 968 969 @Override 970 public void setProperty(String name, Base value) throws FHIRException { 971 if (name.equals("link")) 972 this.getLink().add((TestScriptMetadataLinkComponent) value); 973 else if (name.equals("capability")) 974 this.getCapability().add((TestScriptMetadataCapabilityComponent) value); 975 else 976 super.setProperty(name, value); 977 } 978 979 @Override 980 public Base addChild(String name) throws FHIRException { 981 if (name.equals("link")) { 982 return addLink(); 983 } 984 else if (name.equals("capability")) { 985 return addCapability(); 986 } 987 else 988 return super.addChild(name); 989 } 990 991 public TestScriptMetadataComponent copy() { 992 TestScriptMetadataComponent dst = new TestScriptMetadataComponent(); 993 copyValues(dst); 994 if (link != null) { 995 dst.link = new ArrayList<TestScriptMetadataLinkComponent>(); 996 for (TestScriptMetadataLinkComponent i : link) 997 dst.link.add(i.copy()); 998 }; 999 if (capability != null) { 1000 dst.capability = new ArrayList<TestScriptMetadataCapabilityComponent>(); 1001 for (TestScriptMetadataCapabilityComponent i : capability) 1002 dst.capability.add(i.copy()); 1003 }; 1004 return dst; 1005 } 1006 1007 @Override 1008 public boolean equalsDeep(Base other) { 1009 if (!super.equalsDeep(other)) 1010 return false; 1011 if (!(other instanceof TestScriptMetadataComponent)) 1012 return false; 1013 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other; 1014 return compareDeep(link, o.link, true) && compareDeep(capability, o.capability, true); 1015 } 1016 1017 @Override 1018 public boolean equalsShallow(Base other) { 1019 if (!super.equalsShallow(other)) 1020 return false; 1021 if (!(other instanceof TestScriptMetadataComponent)) 1022 return false; 1023 TestScriptMetadataComponent o = (TestScriptMetadataComponent) other; 1024 return true; 1025 } 1026 1027 public boolean isEmpty() { 1028 return super.isEmpty() && (link == null || link.isEmpty()) && (capability == null || capability.isEmpty()) 1029 ; 1030 } 1031 1032 public String fhirType() { 1033 return "TestScript.metadata"; 1034 1035 } 1036 1037 } 1038 1039 @Block() 1040 public static class TestScriptMetadataLinkComponent extends BackboneElement implements IBaseBackboneElement { 1041 /** 1042 * URL to a particular requirement or feature within the FHIR specification. 1043 */ 1044 @Child(name = "url", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1045 @Description(shortDefinition="URL to the specification", formalDefinition="URL to a particular requirement or feature within the FHIR specification." ) 1046 protected UriType url; 1047 1048 /** 1049 * Short description of the link. 1050 */ 1051 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1052 @Description(shortDefinition="Short description", formalDefinition="Short description of the link." ) 1053 protected StringType description; 1054 1055 private static final long serialVersionUID = 213372298L; 1056 1057 /* 1058 * Constructor 1059 */ 1060 public TestScriptMetadataLinkComponent() { 1061 super(); 1062 } 1063 1064 /* 1065 * Constructor 1066 */ 1067 public TestScriptMetadataLinkComponent(UriType url) { 1068 super(); 1069 this.url = url; 1070 } 1071 1072 /** 1073 * @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 1074 */ 1075 public UriType getUrlElement() { 1076 if (this.url == null) 1077 if (Configuration.errorOnAutoCreate()) 1078 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.url"); 1079 else if (Configuration.doAutoCreate()) 1080 this.url = new UriType(); // bb 1081 return this.url; 1082 } 1083 1084 public boolean hasUrlElement() { 1085 return this.url != null && !this.url.isEmpty(); 1086 } 1087 1088 public boolean hasUrl() { 1089 return this.url != null && !this.url.isEmpty(); 1090 } 1091 1092 /** 1093 * @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 1094 */ 1095 public TestScriptMetadataLinkComponent setUrlElement(UriType value) { 1096 this.url = value; 1097 return this; 1098 } 1099 1100 /** 1101 * @return URL to a particular requirement or feature within the FHIR specification. 1102 */ 1103 public String getUrl() { 1104 return this.url == null ? null : this.url.getValue(); 1105 } 1106 1107 /** 1108 * @param value URL to a particular requirement or feature within the FHIR specification. 1109 */ 1110 public TestScriptMetadataLinkComponent setUrl(String value) { 1111 if (this.url == null) 1112 this.url = new UriType(); 1113 this.url.setValue(value); 1114 return this; 1115 } 1116 1117 /** 1118 * @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 1119 */ 1120 public StringType getDescriptionElement() { 1121 if (this.description == null) 1122 if (Configuration.errorOnAutoCreate()) 1123 throw new Error("Attempt to auto-create TestScriptMetadataLinkComponent.description"); 1124 else if (Configuration.doAutoCreate()) 1125 this.description = new StringType(); // bb 1126 return this.description; 1127 } 1128 1129 public boolean hasDescriptionElement() { 1130 return this.description != null && !this.description.isEmpty(); 1131 } 1132 1133 public boolean hasDescription() { 1134 return this.description != null && !this.description.isEmpty(); 1135 } 1136 1137 /** 1138 * @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 1139 */ 1140 public TestScriptMetadataLinkComponent setDescriptionElement(StringType value) { 1141 this.description = value; 1142 return this; 1143 } 1144 1145 /** 1146 * @return Short description of the link. 1147 */ 1148 public String getDescription() { 1149 return this.description == null ? null : this.description.getValue(); 1150 } 1151 1152 /** 1153 * @param value Short description of the link. 1154 */ 1155 public TestScriptMetadataLinkComponent setDescription(String value) { 1156 if (Utilities.noString(value)) 1157 this.description = null; 1158 else { 1159 if (this.description == null) 1160 this.description = new StringType(); 1161 this.description.setValue(value); 1162 } 1163 return this; 1164 } 1165 1166 protected void listChildren(List<Property> childrenList) { 1167 super.listChildren(childrenList); 1168 childrenList.add(new Property("url", "uri", "URL to a particular requirement or feature within the FHIR specification.", 0, java.lang.Integer.MAX_VALUE, url)); 1169 childrenList.add(new Property("description", "string", "Short description of the link.", 0, java.lang.Integer.MAX_VALUE, description)); 1170 } 1171 1172 @Override 1173 public void setProperty(String name, Base value) throws FHIRException { 1174 if (name.equals("url")) 1175 this.url = castToUri(value); // UriType 1176 else if (name.equals("description")) 1177 this.description = castToString(value); // StringType 1178 else 1179 super.setProperty(name, value); 1180 } 1181 1182 @Override 1183 public Base addChild(String name) throws FHIRException { 1184 if (name.equals("url")) { 1185 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 1186 } 1187 else if (name.equals("description")) { 1188 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 1189 } 1190 else 1191 return super.addChild(name); 1192 } 1193 1194 public TestScriptMetadataLinkComponent copy() { 1195 TestScriptMetadataLinkComponent dst = new TestScriptMetadataLinkComponent(); 1196 copyValues(dst); 1197 dst.url = url == null ? null : url.copy(); 1198 dst.description = description == null ? null : description.copy(); 1199 return dst; 1200 } 1201 1202 @Override 1203 public boolean equalsDeep(Base other) { 1204 if (!super.equalsDeep(other)) 1205 return false; 1206 if (!(other instanceof TestScriptMetadataLinkComponent)) 1207 return false; 1208 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other; 1209 return compareDeep(url, o.url, true) && compareDeep(description, o.description, true); 1210 } 1211 1212 @Override 1213 public boolean equalsShallow(Base other) { 1214 if (!super.equalsShallow(other)) 1215 return false; 1216 if (!(other instanceof TestScriptMetadataLinkComponent)) 1217 return false; 1218 TestScriptMetadataLinkComponent o = (TestScriptMetadataLinkComponent) other; 1219 return compareValues(url, o.url, true) && compareValues(description, o.description, true); 1220 } 1221 1222 public boolean isEmpty() { 1223 return super.isEmpty() && (url == null || url.isEmpty()) && (description == null || description.isEmpty()) 1224 ; 1225 } 1226 1227 public String fhirType() { 1228 return "TestScript.metadata.link"; 1229 1230 } 1231 1232 } 1233 1234 @Block() 1235 public static class TestScriptMetadataCapabilityComponent extends BackboneElement implements IBaseBackboneElement { 1236 /** 1237 * Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1238 */ 1239 @Child(name = "required", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1240 @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." ) 1241 protected BooleanType required; 1242 1243 /** 1244 * Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1245 */ 1246 @Child(name = "validated", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1247 @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." ) 1248 protected BooleanType validated; 1249 1250 /** 1251 * Description of the capabilities that this test script is requiring the server to support. 1252 */ 1253 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1254 @Description(shortDefinition="The expected capabilities of the server", formalDefinition="Description of the capabilities that this test script is requiring the server to support." ) 1255 protected StringType description; 1256 1257 /** 1258 * Which server these requirements apply to. 1259 */ 1260 @Child(name = "destination", type = {IntegerType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1261 @Description(shortDefinition="Which server these requirements apply to", formalDefinition="Which server these requirements apply to." ) 1262 protected IntegerType destination; 1263 1264 /** 1265 * Links to the FHIR specification that describes this interaction and the resources involved in more detail. 1266 */ 1267 @Child(name = "link", type = {UriType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1268 @Description(shortDefinition="Links to the FHIR specification", formalDefinition="Links to the FHIR specification that describes this interaction and the resources involved in more detail." ) 1269 protected List<UriType> link; 1270 1271 /** 1272 * 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. 1273 */ 1274 @Child(name = "conformance", type = {Conformance.class}, order=6, min=1, max=1, modifier=false, summary=false) 1275 @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." ) 1276 protected Reference conformance; 1277 1278 /** 1279 * 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.) 1280 */ 1281 protected Conformance conformanceTarget; 1282 1283 private static final long serialVersionUID = 1318523355L; 1284 1285 /* 1286 * Constructor 1287 */ 1288 public TestScriptMetadataCapabilityComponent() { 1289 super(); 1290 } 1291 1292 /* 1293 * Constructor 1294 */ 1295 public TestScriptMetadataCapabilityComponent(Reference conformance) { 1296 super(); 1297 this.conformance = conformance; 1298 } 1299 1300 /** 1301 * @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 1302 */ 1303 public BooleanType getRequiredElement() { 1304 if (this.required == null) 1305 if (Configuration.errorOnAutoCreate()) 1306 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.required"); 1307 else if (Configuration.doAutoCreate()) 1308 this.required = new BooleanType(); // bb 1309 return this.required; 1310 } 1311 1312 public boolean hasRequiredElement() { 1313 return this.required != null && !this.required.isEmpty(); 1314 } 1315 1316 public boolean hasRequired() { 1317 return this.required != null && !this.required.isEmpty(); 1318 } 1319 1320 /** 1321 * @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 1322 */ 1323 public TestScriptMetadataCapabilityComponent setRequiredElement(BooleanType value) { 1324 this.required = value; 1325 return this; 1326 } 1327 1328 /** 1329 * @return Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1330 */ 1331 public boolean getRequired() { 1332 return this.required == null || this.required.isEmpty() ? false : this.required.getValue(); 1333 } 1334 1335 /** 1336 * @param value Whether or not the test execution will require the given capabilities of the server in order for this test script to execute. 1337 */ 1338 public TestScriptMetadataCapabilityComponent setRequired(boolean value) { 1339 if (this.required == null) 1340 this.required = new BooleanType(); 1341 this.required.setValue(value); 1342 return this; 1343 } 1344 1345 /** 1346 * @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 1347 */ 1348 public BooleanType getValidatedElement() { 1349 if (this.validated == null) 1350 if (Configuration.errorOnAutoCreate()) 1351 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.validated"); 1352 else if (Configuration.doAutoCreate()) 1353 this.validated = new BooleanType(); // bb 1354 return this.validated; 1355 } 1356 1357 public boolean hasValidatedElement() { 1358 return this.validated != null && !this.validated.isEmpty(); 1359 } 1360 1361 public boolean hasValidated() { 1362 return this.validated != null && !this.validated.isEmpty(); 1363 } 1364 1365 /** 1366 * @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 1367 */ 1368 public TestScriptMetadataCapabilityComponent setValidatedElement(BooleanType value) { 1369 this.validated = value; 1370 return this; 1371 } 1372 1373 /** 1374 * @return Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1375 */ 1376 public boolean getValidated() { 1377 return this.validated == null || this.validated.isEmpty() ? false : this.validated.getValue(); 1378 } 1379 1380 /** 1381 * @param value Whether or not the test execution will validate the given capabilities of the server in order for this test script to execute. 1382 */ 1383 public TestScriptMetadataCapabilityComponent setValidated(boolean value) { 1384 if (this.validated == null) 1385 this.validated = new BooleanType(); 1386 this.validated.setValue(value); 1387 return this; 1388 } 1389 1390 /** 1391 * @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 1392 */ 1393 public StringType getDescriptionElement() { 1394 if (this.description == null) 1395 if (Configuration.errorOnAutoCreate()) 1396 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.description"); 1397 else if (Configuration.doAutoCreate()) 1398 this.description = new StringType(); // bb 1399 return this.description; 1400 } 1401 1402 public boolean hasDescriptionElement() { 1403 return this.description != null && !this.description.isEmpty(); 1404 } 1405 1406 public boolean hasDescription() { 1407 return this.description != null && !this.description.isEmpty(); 1408 } 1409 1410 /** 1411 * @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 1412 */ 1413 public TestScriptMetadataCapabilityComponent setDescriptionElement(StringType value) { 1414 this.description = value; 1415 return this; 1416 } 1417 1418 /** 1419 * @return Description of the capabilities that this test script is requiring the server to support. 1420 */ 1421 public String getDescription() { 1422 return this.description == null ? null : this.description.getValue(); 1423 } 1424 1425 /** 1426 * @param value Description of the capabilities that this test script is requiring the server to support. 1427 */ 1428 public TestScriptMetadataCapabilityComponent setDescription(String value) { 1429 if (Utilities.noString(value)) 1430 this.description = null; 1431 else { 1432 if (this.description == null) 1433 this.description = new StringType(); 1434 this.description.setValue(value); 1435 } 1436 return this; 1437 } 1438 1439 /** 1440 * @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 1441 */ 1442 public IntegerType getDestinationElement() { 1443 if (this.destination == null) 1444 if (Configuration.errorOnAutoCreate()) 1445 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.destination"); 1446 else if (Configuration.doAutoCreate()) 1447 this.destination = new IntegerType(); // bb 1448 return this.destination; 1449 } 1450 1451 public boolean hasDestinationElement() { 1452 return this.destination != null && !this.destination.isEmpty(); 1453 } 1454 1455 public boolean hasDestination() { 1456 return this.destination != null && !this.destination.isEmpty(); 1457 } 1458 1459 /** 1460 * @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 1461 */ 1462 public TestScriptMetadataCapabilityComponent setDestinationElement(IntegerType value) { 1463 this.destination = value; 1464 return this; 1465 } 1466 1467 /** 1468 * @return Which server these requirements apply to. 1469 */ 1470 public int getDestination() { 1471 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 1472 } 1473 1474 /** 1475 * @param value Which server these requirements apply to. 1476 */ 1477 public TestScriptMetadataCapabilityComponent setDestination(int value) { 1478 if (this.destination == null) 1479 this.destination = new IntegerType(); 1480 this.destination.setValue(value); 1481 return this; 1482 } 1483 1484 /** 1485 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 1486 */ 1487 public List<UriType> getLink() { 1488 if (this.link == null) 1489 this.link = new ArrayList<UriType>(); 1490 return this.link; 1491 } 1492 1493 public boolean hasLink() { 1494 if (this.link == null) 1495 return false; 1496 for (UriType item : this.link) 1497 if (!item.isEmpty()) 1498 return true; 1499 return false; 1500 } 1501 1502 /** 1503 * @return {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 1504 */ 1505 // syntactic sugar 1506 public UriType addLinkElement() {//2 1507 UriType t = new UriType(); 1508 if (this.link == null) 1509 this.link = new ArrayList<UriType>(); 1510 this.link.add(t); 1511 return t; 1512 } 1513 1514 /** 1515 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 1516 */ 1517 public TestScriptMetadataCapabilityComponent addLink(String value) { //1 1518 UriType t = new UriType(); 1519 t.setValue(value); 1520 if (this.link == null) 1521 this.link = new ArrayList<UriType>(); 1522 this.link.add(t); 1523 return this; 1524 } 1525 1526 /** 1527 * @param value {@link #link} (Links to the FHIR specification that describes this interaction and the resources involved in more detail.) 1528 */ 1529 public boolean hasLink(String value) { 1530 if (this.link == null) 1531 return false; 1532 for (UriType v : this.link) 1533 if (v.equals(value)) // uri 1534 return true; 1535 return false; 1536 } 1537 1538 /** 1539 * @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.) 1540 */ 1541 public Reference getConformance() { 1542 if (this.conformance == null) 1543 if (Configuration.errorOnAutoCreate()) 1544 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.conformance"); 1545 else if (Configuration.doAutoCreate()) 1546 this.conformance = new Reference(); // cc 1547 return this.conformance; 1548 } 1549 1550 public boolean hasConformance() { 1551 return this.conformance != null && !this.conformance.isEmpty(); 1552 } 1553 1554 /** 1555 * @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.) 1556 */ 1557 public TestScriptMetadataCapabilityComponent setConformance(Reference value) { 1558 this.conformance = value; 1559 return this; 1560 } 1561 1562 /** 1563 * @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.) 1564 */ 1565 public Conformance getConformanceTarget() { 1566 if (this.conformanceTarget == null) 1567 if (Configuration.errorOnAutoCreate()) 1568 throw new Error("Attempt to auto-create TestScriptMetadataCapabilityComponent.conformance"); 1569 else if (Configuration.doAutoCreate()) 1570 this.conformanceTarget = new Conformance(); // aa 1571 return this.conformanceTarget; 1572 } 1573 1574 /** 1575 * @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.) 1576 */ 1577 public TestScriptMetadataCapabilityComponent setConformanceTarget(Conformance value) { 1578 this.conformanceTarget = value; 1579 return this; 1580 } 1581 1582 protected void listChildren(List<Property> childrenList) { 1583 super.listChildren(childrenList); 1584 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)); 1585 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)); 1586 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)); 1587 childrenList.add(new Property("destination", "integer", "Which server these requirements apply to.", 0, java.lang.Integer.MAX_VALUE, destination)); 1588 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)); 1589 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)); 1590 } 1591 1592 @Override 1593 public void setProperty(String name, Base value) throws FHIRException { 1594 if (name.equals("required")) 1595 this.required = castToBoolean(value); // BooleanType 1596 else if (name.equals("validated")) 1597 this.validated = castToBoolean(value); // BooleanType 1598 else if (name.equals("description")) 1599 this.description = castToString(value); // StringType 1600 else if (name.equals("destination")) 1601 this.destination = castToInteger(value); // IntegerType 1602 else if (name.equals("link")) 1603 this.getLink().add(castToUri(value)); 1604 else if (name.equals("conformance")) 1605 this.conformance = castToReference(value); // Reference 1606 else 1607 super.setProperty(name, value); 1608 } 1609 1610 @Override 1611 public Base addChild(String name) throws FHIRException { 1612 if (name.equals("required")) { 1613 throw new FHIRException("Cannot call addChild on a primitive type TestScript.required"); 1614 } 1615 else if (name.equals("validated")) { 1616 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validated"); 1617 } 1618 else if (name.equals("description")) { 1619 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 1620 } 1621 else if (name.equals("destination")) { 1622 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 1623 } 1624 else if (name.equals("link")) { 1625 throw new FHIRException("Cannot call addChild on a primitive type TestScript.link"); 1626 } 1627 else if (name.equals("conformance")) { 1628 this.conformance = new Reference(); 1629 return this.conformance; 1630 } 1631 else 1632 return super.addChild(name); 1633 } 1634 1635 public TestScriptMetadataCapabilityComponent copy() { 1636 TestScriptMetadataCapabilityComponent dst = new TestScriptMetadataCapabilityComponent(); 1637 copyValues(dst); 1638 dst.required = required == null ? null : required.copy(); 1639 dst.validated = validated == null ? null : validated.copy(); 1640 dst.description = description == null ? null : description.copy(); 1641 dst.destination = destination == null ? null : destination.copy(); 1642 if (link != null) { 1643 dst.link = new ArrayList<UriType>(); 1644 for (UriType i : link) 1645 dst.link.add(i.copy()); 1646 }; 1647 dst.conformance = conformance == null ? null : conformance.copy(); 1648 return dst; 1649 } 1650 1651 @Override 1652 public boolean equalsDeep(Base other) { 1653 if (!super.equalsDeep(other)) 1654 return false; 1655 if (!(other instanceof TestScriptMetadataCapabilityComponent)) 1656 return false; 1657 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other; 1658 return compareDeep(required, o.required, true) && compareDeep(validated, o.validated, true) && compareDeep(description, o.description, true) 1659 && compareDeep(destination, o.destination, true) && compareDeep(link, o.link, true) && compareDeep(conformance, o.conformance, true) 1660 ; 1661 } 1662 1663 @Override 1664 public boolean equalsShallow(Base other) { 1665 if (!super.equalsShallow(other)) 1666 return false; 1667 if (!(other instanceof TestScriptMetadataCapabilityComponent)) 1668 return false; 1669 TestScriptMetadataCapabilityComponent o = (TestScriptMetadataCapabilityComponent) other; 1670 return compareValues(required, o.required, true) && compareValues(validated, o.validated, true) && compareValues(description, o.description, true) 1671 && compareValues(destination, o.destination, true) && compareValues(link, o.link, true); 1672 } 1673 1674 public boolean isEmpty() { 1675 return super.isEmpty() && (required == null || required.isEmpty()) && (validated == null || validated.isEmpty()) 1676 && (description == null || description.isEmpty()) && (destination == null || destination.isEmpty()) 1677 && (link == null || link.isEmpty()) && (conformance == null || conformance.isEmpty()); 1678 } 1679 1680 public String fhirType() { 1681 return "TestScript.metadata.capability"; 1682 1683 } 1684 1685 } 1686 1687 @Block() 1688 public static class TestScriptFixtureComponent extends BackboneElement implements IBaseBackboneElement { 1689 /** 1690 * 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. 1691 */ 1692 @Child(name = "autocreate", type = {BooleanType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1693 @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." ) 1694 protected BooleanType autocreate; 1695 1696 /** 1697 * 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. 1698 */ 1699 @Child(name = "autodelete", type = {BooleanType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1700 @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." ) 1701 protected BooleanType autodelete; 1702 1703 /** 1704 * Reference to the resource (containing the contents of the resource needed for operations). 1705 */ 1706 @Child(name = "resource", type = {}, order=3, min=0, max=1, modifier=false, summary=false) 1707 @Description(shortDefinition="Reference of the resource", formalDefinition="Reference to the resource (containing the contents of the resource needed for operations)." ) 1708 protected Reference resource; 1709 1710 /** 1711 * The actual object that is the target of the reference (Reference to the resource (containing the contents of the resource needed for operations).) 1712 */ 1713 protected Resource resourceTarget; 1714 1715 private static final long serialVersionUID = 1110683307L; 1716 1717 /* 1718 * Constructor 1719 */ 1720 public TestScriptFixtureComponent() { 1721 super(); 1722 } 1723 1724 /** 1725 * @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 1726 */ 1727 public BooleanType getAutocreateElement() { 1728 if (this.autocreate == null) 1729 if (Configuration.errorOnAutoCreate()) 1730 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autocreate"); 1731 else if (Configuration.doAutoCreate()) 1732 this.autocreate = new BooleanType(); // bb 1733 return this.autocreate; 1734 } 1735 1736 public boolean hasAutocreateElement() { 1737 return this.autocreate != null && !this.autocreate.isEmpty(); 1738 } 1739 1740 public boolean hasAutocreate() { 1741 return this.autocreate != null && !this.autocreate.isEmpty(); 1742 } 1743 1744 /** 1745 * @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 1746 */ 1747 public TestScriptFixtureComponent setAutocreateElement(BooleanType value) { 1748 this.autocreate = value; 1749 return this; 1750 } 1751 1752 /** 1753 * @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. 1754 */ 1755 public boolean getAutocreate() { 1756 return this.autocreate == null || this.autocreate.isEmpty() ? false : this.autocreate.getValue(); 1757 } 1758 1759 /** 1760 * @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. 1761 */ 1762 public TestScriptFixtureComponent setAutocreate(boolean value) { 1763 if (this.autocreate == null) 1764 this.autocreate = new BooleanType(); 1765 this.autocreate.setValue(value); 1766 return this; 1767 } 1768 1769 /** 1770 * @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 1771 */ 1772 public BooleanType getAutodeleteElement() { 1773 if (this.autodelete == null) 1774 if (Configuration.errorOnAutoCreate()) 1775 throw new Error("Attempt to auto-create TestScriptFixtureComponent.autodelete"); 1776 else if (Configuration.doAutoCreate()) 1777 this.autodelete = new BooleanType(); // bb 1778 return this.autodelete; 1779 } 1780 1781 public boolean hasAutodeleteElement() { 1782 return this.autodelete != null && !this.autodelete.isEmpty(); 1783 } 1784 1785 public boolean hasAutodelete() { 1786 return this.autodelete != null && !this.autodelete.isEmpty(); 1787 } 1788 1789 /** 1790 * @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 1791 */ 1792 public TestScriptFixtureComponent setAutodeleteElement(BooleanType value) { 1793 this.autodelete = value; 1794 return this; 1795 } 1796 1797 /** 1798 * @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. 1799 */ 1800 public boolean getAutodelete() { 1801 return this.autodelete == null || this.autodelete.isEmpty() ? false : this.autodelete.getValue(); 1802 } 1803 1804 /** 1805 * @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. 1806 */ 1807 public TestScriptFixtureComponent setAutodelete(boolean value) { 1808 if (this.autodelete == null) 1809 this.autodelete = new BooleanType(); 1810 this.autodelete.setValue(value); 1811 return this; 1812 } 1813 1814 /** 1815 * @return {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 1816 */ 1817 public Reference getResource() { 1818 if (this.resource == null) 1819 if (Configuration.errorOnAutoCreate()) 1820 throw new Error("Attempt to auto-create TestScriptFixtureComponent.resource"); 1821 else if (Configuration.doAutoCreate()) 1822 this.resource = new Reference(); // cc 1823 return this.resource; 1824 } 1825 1826 public boolean hasResource() { 1827 return this.resource != null && !this.resource.isEmpty(); 1828 } 1829 1830 /** 1831 * @param value {@link #resource} (Reference to the resource (containing the contents of the resource needed for operations).) 1832 */ 1833 public TestScriptFixtureComponent setResource(Reference value) { 1834 this.resource = value; 1835 return this; 1836 } 1837 1838 /** 1839 * @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).) 1840 */ 1841 public Resource getResourceTarget() { 1842 return this.resourceTarget; 1843 } 1844 1845 /** 1846 * @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).) 1847 */ 1848 public TestScriptFixtureComponent setResourceTarget(Resource value) { 1849 this.resourceTarget = value; 1850 return this; 1851 } 1852 1853 protected void listChildren(List<Property> childrenList) { 1854 super.listChildren(childrenList); 1855 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)); 1856 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)); 1857 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)); 1858 } 1859 1860 @Override 1861 public void setProperty(String name, Base value) throws FHIRException { 1862 if (name.equals("autocreate")) 1863 this.autocreate = castToBoolean(value); // BooleanType 1864 else if (name.equals("autodelete")) 1865 this.autodelete = castToBoolean(value); // BooleanType 1866 else if (name.equals("resource")) 1867 this.resource = castToReference(value); // Reference 1868 else 1869 super.setProperty(name, value); 1870 } 1871 1872 @Override 1873 public Base addChild(String name) throws FHIRException { 1874 if (name.equals("autocreate")) { 1875 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autocreate"); 1876 } 1877 else if (name.equals("autodelete")) { 1878 throw new FHIRException("Cannot call addChild on a primitive type TestScript.autodelete"); 1879 } 1880 else if (name.equals("resource")) { 1881 this.resource = new Reference(); 1882 return this.resource; 1883 } 1884 else 1885 return super.addChild(name); 1886 } 1887 1888 public TestScriptFixtureComponent copy() { 1889 TestScriptFixtureComponent dst = new TestScriptFixtureComponent(); 1890 copyValues(dst); 1891 dst.autocreate = autocreate == null ? null : autocreate.copy(); 1892 dst.autodelete = autodelete == null ? null : autodelete.copy(); 1893 dst.resource = resource == null ? null : resource.copy(); 1894 return dst; 1895 } 1896 1897 @Override 1898 public boolean equalsDeep(Base other) { 1899 if (!super.equalsDeep(other)) 1900 return false; 1901 if (!(other instanceof TestScriptFixtureComponent)) 1902 return false; 1903 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other; 1904 return compareDeep(autocreate, o.autocreate, true) && compareDeep(autodelete, o.autodelete, true) 1905 && compareDeep(resource, o.resource, true); 1906 } 1907 1908 @Override 1909 public boolean equalsShallow(Base other) { 1910 if (!super.equalsShallow(other)) 1911 return false; 1912 if (!(other instanceof TestScriptFixtureComponent)) 1913 return false; 1914 TestScriptFixtureComponent o = (TestScriptFixtureComponent) other; 1915 return compareValues(autocreate, o.autocreate, true) && compareValues(autodelete, o.autodelete, true) 1916 ; 1917 } 1918 1919 public boolean isEmpty() { 1920 return super.isEmpty() && (autocreate == null || autocreate.isEmpty()) && (autodelete == null || autodelete.isEmpty()) 1921 && (resource == null || resource.isEmpty()); 1922 } 1923 1924 public String fhirType() { 1925 return "TestScript.fixture"; 1926 1927 } 1928 1929 } 1930 1931 @Block() 1932 public static class TestScriptVariableComponent extends BackboneElement implements IBaseBackboneElement { 1933 /** 1934 * Descriptive name for this variable. 1935 */ 1936 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1937 @Description(shortDefinition="Descriptive name for this variable", formalDefinition="Descriptive name for this variable." ) 1938 protected StringType name; 1939 1940 /** 1941 * Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 1942 */ 1943 @Child(name = "headerField", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1944 @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." ) 1945 protected StringType headerField; 1946 1947 /** 1948 * XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. 1949 */ 1950 @Child(name = "path", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1951 @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." ) 1952 protected StringType path; 1953 1954 /** 1955 * Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 1956 */ 1957 @Child(name = "sourceId", type = {IdType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1958 @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." ) 1959 protected IdType sourceId; 1960 1961 private static final long serialVersionUID = 1128806685L; 1962 1963 /* 1964 * Constructor 1965 */ 1966 public TestScriptVariableComponent() { 1967 super(); 1968 } 1969 1970 /* 1971 * Constructor 1972 */ 1973 public TestScriptVariableComponent(StringType name) { 1974 super(); 1975 this.name = name; 1976 } 1977 1978 /** 1979 * @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 1980 */ 1981 public StringType getNameElement() { 1982 if (this.name == null) 1983 if (Configuration.errorOnAutoCreate()) 1984 throw new Error("Attempt to auto-create TestScriptVariableComponent.name"); 1985 else if (Configuration.doAutoCreate()) 1986 this.name = new StringType(); // bb 1987 return this.name; 1988 } 1989 1990 public boolean hasNameElement() { 1991 return this.name != null && !this.name.isEmpty(); 1992 } 1993 1994 public boolean hasName() { 1995 return this.name != null && !this.name.isEmpty(); 1996 } 1997 1998 /** 1999 * @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 2000 */ 2001 public TestScriptVariableComponent setNameElement(StringType value) { 2002 this.name = value; 2003 return this; 2004 } 2005 2006 /** 2007 * @return Descriptive name for this variable. 2008 */ 2009 public String getName() { 2010 return this.name == null ? null : this.name.getValue(); 2011 } 2012 2013 /** 2014 * @param value Descriptive name for this variable. 2015 */ 2016 public TestScriptVariableComponent setName(String value) { 2017 if (this.name == null) 2018 this.name = new StringType(); 2019 this.name.setValue(value); 2020 return this; 2021 } 2022 2023 /** 2024 * @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 2025 */ 2026 public StringType getHeaderFieldElement() { 2027 if (this.headerField == null) 2028 if (Configuration.errorOnAutoCreate()) 2029 throw new Error("Attempt to auto-create TestScriptVariableComponent.headerField"); 2030 else if (Configuration.doAutoCreate()) 2031 this.headerField = new StringType(); // bb 2032 return this.headerField; 2033 } 2034 2035 public boolean hasHeaderFieldElement() { 2036 return this.headerField != null && !this.headerField.isEmpty(); 2037 } 2038 2039 public boolean hasHeaderField() { 2040 return this.headerField != null && !this.headerField.isEmpty(); 2041 } 2042 2043 /** 2044 * @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 2045 */ 2046 public TestScriptVariableComponent setHeaderFieldElement(StringType value) { 2047 this.headerField = value; 2048 return this; 2049 } 2050 2051 /** 2052 * @return Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2053 */ 2054 public String getHeaderField() { 2055 return this.headerField == null ? null : this.headerField.getValue(); 2056 } 2057 2058 /** 2059 * @param value Will be used to grab the HTTP header field value from the headers that sourceId is pointing to. 2060 */ 2061 public TestScriptVariableComponent setHeaderField(String value) { 2062 if (Utilities.noString(value)) 2063 this.headerField = null; 2064 else { 2065 if (this.headerField == null) 2066 this.headerField = new StringType(); 2067 this.headerField.setValue(value); 2068 } 2069 return this; 2070 } 2071 2072 /** 2073 * @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 2074 */ 2075 public StringType getPathElement() { 2076 if (this.path == null) 2077 if (Configuration.errorOnAutoCreate()) 2078 throw new Error("Attempt to auto-create TestScriptVariableComponent.path"); 2079 else if (Configuration.doAutoCreate()) 2080 this.path = new StringType(); // bb 2081 return this.path; 2082 } 2083 2084 public boolean hasPathElement() { 2085 return this.path != null && !this.path.isEmpty(); 2086 } 2087 2088 public boolean hasPath() { 2089 return this.path != null && !this.path.isEmpty(); 2090 } 2091 2092 /** 2093 * @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 2094 */ 2095 public TestScriptVariableComponent setPathElement(StringType value) { 2096 this.path = value; 2097 return this; 2098 } 2099 2100 /** 2101 * @return XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. 2102 */ 2103 public String getPath() { 2104 return this.path == null ? null : this.path.getValue(); 2105 } 2106 2107 /** 2108 * @param value XPath or JSONPath against the fixture body. When variables are defined, either headerField must be specified or path, but not both. 2109 */ 2110 public TestScriptVariableComponent setPath(String value) { 2111 if (Utilities.noString(value)) 2112 this.path = null; 2113 else { 2114 if (this.path == null) 2115 this.path = new StringType(); 2116 this.path.setValue(value); 2117 } 2118 return this; 2119 } 2120 2121 /** 2122 * @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 2123 */ 2124 public IdType getSourceIdElement() { 2125 if (this.sourceId == null) 2126 if (Configuration.errorOnAutoCreate()) 2127 throw new Error("Attempt to auto-create TestScriptVariableComponent.sourceId"); 2128 else if (Configuration.doAutoCreate()) 2129 this.sourceId = new IdType(); // bb 2130 return this.sourceId; 2131 } 2132 2133 public boolean hasSourceIdElement() { 2134 return this.sourceId != null && !this.sourceId.isEmpty(); 2135 } 2136 2137 public boolean hasSourceId() { 2138 return this.sourceId != null && !this.sourceId.isEmpty(); 2139 } 2140 2141 /** 2142 * @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 2143 */ 2144 public TestScriptVariableComponent setSourceIdElement(IdType value) { 2145 this.sourceId = value; 2146 return this; 2147 } 2148 2149 /** 2150 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2151 */ 2152 public String getSourceId() { 2153 return this.sourceId == null ? null : this.sourceId.getValue(); 2154 } 2155 2156 /** 2157 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against within this variable. 2158 */ 2159 public TestScriptVariableComponent setSourceId(String value) { 2160 if (Utilities.noString(value)) 2161 this.sourceId = null; 2162 else { 2163 if (this.sourceId == null) 2164 this.sourceId = new IdType(); 2165 this.sourceId.setValue(value); 2166 } 2167 return this; 2168 } 2169 2170 protected void listChildren(List<Property> childrenList) { 2171 super.listChildren(childrenList); 2172 childrenList.add(new Property("name", "string", "Descriptive name for this variable.", 0, java.lang.Integer.MAX_VALUE, name)); 2173 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)); 2174 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)); 2175 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)); 2176 } 2177 2178 @Override 2179 public void setProperty(String name, Base value) throws FHIRException { 2180 if (name.equals("name")) 2181 this.name = castToString(value); // StringType 2182 else if (name.equals("headerField")) 2183 this.headerField = castToString(value); // StringType 2184 else if (name.equals("path")) 2185 this.path = castToString(value); // StringType 2186 else if (name.equals("sourceId")) 2187 this.sourceId = castToId(value); // IdType 2188 else 2189 super.setProperty(name, value); 2190 } 2191 2192 @Override 2193 public Base addChild(String name) throws FHIRException { 2194 if (name.equals("name")) { 2195 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 2196 } 2197 else if (name.equals("headerField")) { 2198 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 2199 } 2200 else if (name.equals("path")) { 2201 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 2202 } 2203 else if (name.equals("sourceId")) { 2204 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 2205 } 2206 else 2207 return super.addChild(name); 2208 } 2209 2210 public TestScriptVariableComponent copy() { 2211 TestScriptVariableComponent dst = new TestScriptVariableComponent(); 2212 copyValues(dst); 2213 dst.name = name == null ? null : name.copy(); 2214 dst.headerField = headerField == null ? null : headerField.copy(); 2215 dst.path = path == null ? null : path.copy(); 2216 dst.sourceId = sourceId == null ? null : sourceId.copy(); 2217 return dst; 2218 } 2219 2220 @Override 2221 public boolean equalsDeep(Base other) { 2222 if (!super.equalsDeep(other)) 2223 return false; 2224 if (!(other instanceof TestScriptVariableComponent)) 2225 return false; 2226 TestScriptVariableComponent o = (TestScriptVariableComponent) other; 2227 return compareDeep(name, o.name, true) && compareDeep(headerField, o.headerField, true) && compareDeep(path, o.path, true) 2228 && compareDeep(sourceId, o.sourceId, true); 2229 } 2230 2231 @Override 2232 public boolean equalsShallow(Base other) { 2233 if (!super.equalsShallow(other)) 2234 return false; 2235 if (!(other instanceof TestScriptVariableComponent)) 2236 return false; 2237 TestScriptVariableComponent o = (TestScriptVariableComponent) other; 2238 return compareValues(name, o.name, true) && compareValues(headerField, o.headerField, true) && compareValues(path, o.path, true) 2239 && compareValues(sourceId, o.sourceId, true); 2240 } 2241 2242 public boolean isEmpty() { 2243 return super.isEmpty() && (name == null || name.isEmpty()) && (headerField == null || headerField.isEmpty()) 2244 && (path == null || path.isEmpty()) && (sourceId == null || sourceId.isEmpty()); 2245 } 2246 2247 public String fhirType() { 2248 return "TestScript.variable"; 2249 2250 } 2251 2252 } 2253 2254 @Block() 2255 public static class TestScriptSetupComponent extends BackboneElement implements IBaseBackboneElement { 2256 /** 2257 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 2258 */ 2259 @Child(name = "metadata", type = {TestScriptMetadataComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 2260 @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." ) 2261 protected TestScriptMetadataComponent metadata; 2262 2263 /** 2264 * Action would contain either an operation or an assertion. 2265 */ 2266 @Child(name = "action", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2267 @Description(shortDefinition="A setup operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 2268 protected List<TestScriptSetupActionComponent> action; 2269 2270 private static final long serialVersionUID = -1836543723L; 2271 2272 /* 2273 * Constructor 2274 */ 2275 public TestScriptSetupComponent() { 2276 super(); 2277 } 2278 2279 /** 2280 * @return {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 2281 */ 2282 public TestScriptMetadataComponent getMetadata() { 2283 if (this.metadata == null) 2284 if (Configuration.errorOnAutoCreate()) 2285 throw new Error("Attempt to auto-create TestScriptSetupComponent.metadata"); 2286 else if (Configuration.doAutoCreate()) 2287 this.metadata = new TestScriptMetadataComponent(); // cc 2288 return this.metadata; 2289 } 2290 2291 public boolean hasMetadata() { 2292 return this.metadata != null && !this.metadata.isEmpty(); 2293 } 2294 2295 /** 2296 * @param value {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 2297 */ 2298 public TestScriptSetupComponent setMetadata(TestScriptMetadataComponent value) { 2299 this.metadata = value; 2300 return this; 2301 } 2302 2303 /** 2304 * @return {@link #action} (Action would contain either an operation or an assertion.) 2305 */ 2306 public List<TestScriptSetupActionComponent> getAction() { 2307 if (this.action == null) 2308 this.action = new ArrayList<TestScriptSetupActionComponent>(); 2309 return this.action; 2310 } 2311 2312 public boolean hasAction() { 2313 if (this.action == null) 2314 return false; 2315 for (TestScriptSetupActionComponent item : this.action) 2316 if (!item.isEmpty()) 2317 return true; 2318 return false; 2319 } 2320 2321 /** 2322 * @return {@link #action} (Action would contain either an operation or an assertion.) 2323 */ 2324 // syntactic sugar 2325 public TestScriptSetupActionComponent addAction() { //3 2326 TestScriptSetupActionComponent t = new TestScriptSetupActionComponent(); 2327 if (this.action == null) 2328 this.action = new ArrayList<TestScriptSetupActionComponent>(); 2329 this.action.add(t); 2330 return t; 2331 } 2332 2333 // syntactic sugar 2334 public TestScriptSetupComponent addAction(TestScriptSetupActionComponent t) { //3 2335 if (t == null) 2336 return this; 2337 if (this.action == null) 2338 this.action = new ArrayList<TestScriptSetupActionComponent>(); 2339 this.action.add(t); 2340 return this; 2341 } 2342 2343 protected void listChildren(List<Property> childrenList) { 2344 super.listChildren(childrenList); 2345 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)); 2346 childrenList.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 2347 } 2348 2349 @Override 2350 public void setProperty(String name, Base value) throws FHIRException { 2351 if (name.equals("metadata")) 2352 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 2353 else if (name.equals("action")) 2354 this.getAction().add((TestScriptSetupActionComponent) value); 2355 else 2356 super.setProperty(name, value); 2357 } 2358 2359 @Override 2360 public Base addChild(String name) throws FHIRException { 2361 if (name.equals("metadata")) { 2362 this.metadata = new TestScriptMetadataComponent(); 2363 return this.metadata; 2364 } 2365 else if (name.equals("action")) { 2366 return addAction(); 2367 } 2368 else 2369 return super.addChild(name); 2370 } 2371 2372 public TestScriptSetupComponent copy() { 2373 TestScriptSetupComponent dst = new TestScriptSetupComponent(); 2374 copyValues(dst); 2375 dst.metadata = metadata == null ? null : metadata.copy(); 2376 if (action != null) { 2377 dst.action = new ArrayList<TestScriptSetupActionComponent>(); 2378 for (TestScriptSetupActionComponent i : action) 2379 dst.action.add(i.copy()); 2380 }; 2381 return dst; 2382 } 2383 2384 @Override 2385 public boolean equalsDeep(Base other) { 2386 if (!super.equalsDeep(other)) 2387 return false; 2388 if (!(other instanceof TestScriptSetupComponent)) 2389 return false; 2390 TestScriptSetupComponent o = (TestScriptSetupComponent) other; 2391 return compareDeep(metadata, o.metadata, true) && compareDeep(action, o.action, true); 2392 } 2393 2394 @Override 2395 public boolean equalsShallow(Base other) { 2396 if (!super.equalsShallow(other)) 2397 return false; 2398 if (!(other instanceof TestScriptSetupComponent)) 2399 return false; 2400 TestScriptSetupComponent o = (TestScriptSetupComponent) other; 2401 return true; 2402 } 2403 2404 public boolean isEmpty() { 2405 return super.isEmpty() && (metadata == null || metadata.isEmpty()) && (action == null || action.isEmpty()) 2406 ; 2407 } 2408 2409 public String fhirType() { 2410 return "TestScript.setup"; 2411 2412 } 2413 2414 } 2415 2416 @Block() 2417 public static class TestScriptSetupActionComponent extends BackboneElement implements IBaseBackboneElement { 2418 /** 2419 * The operation to perform. 2420 */ 2421 @Child(name = "operation", type = {}, order=1, min=0, max=1, modifier=false, summary=false) 2422 @Description(shortDefinition="The setup operation to perform", formalDefinition="The operation to perform." ) 2423 protected TestScriptSetupActionOperationComponent operation; 2424 2425 /** 2426 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 2427 */ 2428 @Child(name = "assert", type = {}, order=2, min=0, max=1, modifier=false, summary=false) 2429 @Description(shortDefinition="The assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 2430 protected TestScriptSetupActionAssertComponent assert_; 2431 2432 private static final long serialVersionUID = 1411550037L; 2433 2434 /* 2435 * Constructor 2436 */ 2437 public TestScriptSetupActionComponent() { 2438 super(); 2439 } 2440 2441 /** 2442 * @return {@link #operation} (The operation to perform.) 2443 */ 2444 public TestScriptSetupActionOperationComponent getOperation() { 2445 if (this.operation == null) 2446 if (Configuration.errorOnAutoCreate()) 2447 throw new Error("Attempt to auto-create TestScriptSetupActionComponent.operation"); 2448 else if (Configuration.doAutoCreate()) 2449 this.operation = new TestScriptSetupActionOperationComponent(); // cc 2450 return this.operation; 2451 } 2452 2453 public boolean hasOperation() { 2454 return this.operation != null && !this.operation.isEmpty(); 2455 } 2456 2457 /** 2458 * @param value {@link #operation} (The operation to perform.) 2459 */ 2460 public TestScriptSetupActionComponent setOperation(TestScriptSetupActionOperationComponent value) { 2461 this.operation = value; 2462 return this; 2463 } 2464 2465 /** 2466 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 2467 */ 2468 public TestScriptSetupActionAssertComponent getAssert() { 2469 if (this.assert_ == null) 2470 if (Configuration.errorOnAutoCreate()) 2471 throw new Error("Attempt to auto-create TestScriptSetupActionComponent.assert_"); 2472 else if (Configuration.doAutoCreate()) 2473 this.assert_ = new TestScriptSetupActionAssertComponent(); // cc 2474 return this.assert_; 2475 } 2476 2477 public boolean hasAssert() { 2478 return this.assert_ != null && !this.assert_.isEmpty(); 2479 } 2480 2481 /** 2482 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 2483 */ 2484 public TestScriptSetupActionComponent setAssert(TestScriptSetupActionAssertComponent value) { 2485 this.assert_ = value; 2486 return this; 2487 } 2488 2489 protected void listChildren(List<Property> childrenList) { 2490 super.listChildren(childrenList); 2491 childrenList.add(new Property("operation", "", "The operation to perform.", 0, java.lang.Integer.MAX_VALUE, operation)); 2492 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_)); 2493 } 2494 2495 @Override 2496 public void setProperty(String name, Base value) throws FHIRException { 2497 if (name.equals("operation")) 2498 this.operation = (TestScriptSetupActionOperationComponent) value; // TestScriptSetupActionOperationComponent 2499 else if (name.equals("assert")) 2500 this.assert_ = (TestScriptSetupActionAssertComponent) value; // TestScriptSetupActionAssertComponent 2501 else 2502 super.setProperty(name, value); 2503 } 2504 2505 @Override 2506 public Base addChild(String name) throws FHIRException { 2507 if (name.equals("operation")) { 2508 this.operation = new TestScriptSetupActionOperationComponent(); 2509 return this.operation; 2510 } 2511 else if (name.equals("assert")) { 2512 this.assert_ = new TestScriptSetupActionAssertComponent(); 2513 return this.assert_; 2514 } 2515 else 2516 return super.addChild(name); 2517 } 2518 2519 public TestScriptSetupActionComponent copy() { 2520 TestScriptSetupActionComponent dst = new TestScriptSetupActionComponent(); 2521 copyValues(dst); 2522 dst.operation = operation == null ? null : operation.copy(); 2523 dst.assert_ = assert_ == null ? null : assert_.copy(); 2524 return dst; 2525 } 2526 2527 @Override 2528 public boolean equalsDeep(Base other) { 2529 if (!super.equalsDeep(other)) 2530 return false; 2531 if (!(other instanceof TestScriptSetupActionComponent)) 2532 return false; 2533 TestScriptSetupActionComponent o = (TestScriptSetupActionComponent) other; 2534 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 2535 } 2536 2537 @Override 2538 public boolean equalsShallow(Base other) { 2539 if (!super.equalsShallow(other)) 2540 return false; 2541 if (!(other instanceof TestScriptSetupActionComponent)) 2542 return false; 2543 TestScriptSetupActionComponent o = (TestScriptSetupActionComponent) other; 2544 return true; 2545 } 2546 2547 public boolean isEmpty() { 2548 return super.isEmpty() && (operation == null || operation.isEmpty()) && (assert_ == null || assert_.isEmpty()) 2549 ; 2550 } 2551 2552 public String fhirType() { 2553 return "TestScript.setup.action"; 2554 2555 } 2556 2557 } 2558 2559 @Block() 2560 public static class TestScriptSetupActionOperationComponent extends BackboneElement implements IBaseBackboneElement { 2561 /** 2562 * Server interaction or operation type. 2563 */ 2564 @Child(name = "type", type = {Coding.class}, order=1, min=0, max=1, modifier=false, summary=false) 2565 @Description(shortDefinition="The setup operation type that will be executed", formalDefinition="Server interaction or operation type." ) 2566 protected Coding type; 2567 2568 /** 2569 * The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 2570 */ 2571 @Child(name = "resource", type = {CodeType.class}, order=2, min=0, max=1, modifier=false, summary=false) 2572 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://hl7-fhir.github.io/resourcelist.html." ) 2573 protected CodeType resource; 2574 2575 /** 2576 * The label would be used for tracking/logging purposes by test engines. 2577 */ 2578 @Child(name = "label", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2579 @Description(shortDefinition="Tracking/logging operation label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 2580 protected StringType label; 2581 2582 /** 2583 * The description would be used by test engines for tracking and reporting purposes. 2584 */ 2585 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 2586 @Description(shortDefinition="Tracking/reporting operation description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 2587 protected StringType description; 2588 2589 /** 2590 * The content-type or mime-type to use for RESTful operation in the 'Accept' header. 2591 */ 2592 @Child(name = "accept", type = {CodeType.class}, order=5, min=0, max=1, modifier=false, summary=false) 2593 @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Accept' header." ) 2594 protected Enumeration<ContentType> accept; 2595 2596 /** 2597 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 2598 */ 2599 @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 2600 @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 2601 protected Enumeration<ContentType> contentType; 2602 2603 /** 2604 * Which server to perform the operation on. 2605 */ 2606 @Child(name = "destination", type = {IntegerType.class}, order=7, min=0, max=1, modifier=false, summary=false) 2607 @Description(shortDefinition="Which server to perform the operation on", formalDefinition="Which server to perform the operation on." ) 2608 protected IntegerType destination; 2609 2610 /** 2611 * 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. 2612 */ 2613 @Child(name = "encodeRequestUrl", type = {BooleanType.class}, order=8, min=0, max=1, modifier=false, summary=false) 2614 @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." ) 2615 protected BooleanType encodeRequestUrl; 2616 2617 /** 2618 * Path plus parameters after [type]. Used to set parts of the request URL explicitly. 2619 */ 2620 @Child(name = "params", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 2621 @Description(shortDefinition="Explicitly defined path parameters", formalDefinition="Path plus parameters after [type]. Used to set parts of the request URL explicitly." ) 2622 protected StringType params; 2623 2624 /** 2625 * Header elements would be used to set HTTP headers. 2626 */ 2627 @Child(name = "requestHeader", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2628 @Description(shortDefinition="Each operation can have one ore more header elements", formalDefinition="Header elements would be used to set HTTP headers." ) 2629 protected List<TestScriptSetupActionOperationRequestHeaderComponent> requestHeader; 2630 2631 /** 2632 * The fixture id (maybe new) to map to the response. 2633 */ 2634 @Child(name = "responseId", type = {IdType.class}, order=11, min=0, max=1, modifier=false, summary=false) 2635 @Description(shortDefinition="Fixture Id of mapped response", formalDefinition="The fixture id (maybe new) to map to the response." ) 2636 protected IdType responseId; 2637 2638 /** 2639 * The id of the fixture used as the body of a PUT or POST request. 2640 */ 2641 @Child(name = "sourceId", type = {IdType.class}, order=12, min=0, max=1, modifier=false, summary=false) 2642 @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." ) 2643 protected IdType sourceId; 2644 2645 /** 2646 * Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 2647 */ 2648 @Child(name = "targetId", type = {IdType.class}, order=13, min=0, max=1, modifier=false, summary=false) 2649 @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." ) 2650 protected IdType targetId; 2651 2652 /** 2653 * Complete request URL. 2654 */ 2655 @Child(name = "url", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) 2656 @Description(shortDefinition="Request URL", formalDefinition="Complete request URL." ) 2657 protected StringType url; 2658 2659 private static final long serialVersionUID = -590188078L; 2660 2661 /* 2662 * Constructor 2663 */ 2664 public TestScriptSetupActionOperationComponent() { 2665 super(); 2666 } 2667 2668 /** 2669 * @return {@link #type} (Server interaction or operation type.) 2670 */ 2671 public Coding getType() { 2672 if (this.type == null) 2673 if (Configuration.errorOnAutoCreate()) 2674 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.type"); 2675 else if (Configuration.doAutoCreate()) 2676 this.type = new Coding(); // cc 2677 return this.type; 2678 } 2679 2680 public boolean hasType() { 2681 return this.type != null && !this.type.isEmpty(); 2682 } 2683 2684 /** 2685 * @param value {@link #type} (Server interaction or operation type.) 2686 */ 2687 public TestScriptSetupActionOperationComponent setType(Coding value) { 2688 this.type = value; 2689 return this; 2690 } 2691 2692 /** 2693 * @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 2694 */ 2695 public CodeType getResourceElement() { 2696 if (this.resource == null) 2697 if (Configuration.errorOnAutoCreate()) 2698 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.resource"); 2699 else if (Configuration.doAutoCreate()) 2700 this.resource = new CodeType(); // bb 2701 return this.resource; 2702 } 2703 2704 public boolean hasResourceElement() { 2705 return this.resource != null && !this.resource.isEmpty(); 2706 } 2707 2708 public boolean hasResource() { 2709 return this.resource != null && !this.resource.isEmpty(); 2710 } 2711 2712 /** 2713 * @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 2714 */ 2715 public TestScriptSetupActionOperationComponent setResourceElement(CodeType value) { 2716 this.resource = value; 2717 return this; 2718 } 2719 2720 /** 2721 * @return The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 2722 */ 2723 public String getResource() { 2724 return this.resource == null ? null : this.resource.getValue(); 2725 } 2726 2727 /** 2728 * @param value The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 2729 */ 2730 public TestScriptSetupActionOperationComponent setResource(String value) { 2731 if (Utilities.noString(value)) 2732 this.resource = null; 2733 else { 2734 if (this.resource == null) 2735 this.resource = new CodeType(); 2736 this.resource.setValue(value); 2737 } 2738 return this; 2739 } 2740 2741 /** 2742 * @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 2743 */ 2744 public StringType getLabelElement() { 2745 if (this.label == null) 2746 if (Configuration.errorOnAutoCreate()) 2747 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.label"); 2748 else if (Configuration.doAutoCreate()) 2749 this.label = new StringType(); // bb 2750 return this.label; 2751 } 2752 2753 public boolean hasLabelElement() { 2754 return this.label != null && !this.label.isEmpty(); 2755 } 2756 2757 public boolean hasLabel() { 2758 return this.label != null && !this.label.isEmpty(); 2759 } 2760 2761 /** 2762 * @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 2763 */ 2764 public TestScriptSetupActionOperationComponent setLabelElement(StringType value) { 2765 this.label = value; 2766 return this; 2767 } 2768 2769 /** 2770 * @return The label would be used for tracking/logging purposes by test engines. 2771 */ 2772 public String getLabel() { 2773 return this.label == null ? null : this.label.getValue(); 2774 } 2775 2776 /** 2777 * @param value The label would be used for tracking/logging purposes by test engines. 2778 */ 2779 public TestScriptSetupActionOperationComponent setLabel(String value) { 2780 if (Utilities.noString(value)) 2781 this.label = null; 2782 else { 2783 if (this.label == null) 2784 this.label = new StringType(); 2785 this.label.setValue(value); 2786 } 2787 return this; 2788 } 2789 2790 /** 2791 * @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 2792 */ 2793 public StringType getDescriptionElement() { 2794 if (this.description == null) 2795 if (Configuration.errorOnAutoCreate()) 2796 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.description"); 2797 else if (Configuration.doAutoCreate()) 2798 this.description = new StringType(); // bb 2799 return this.description; 2800 } 2801 2802 public boolean hasDescriptionElement() { 2803 return this.description != null && !this.description.isEmpty(); 2804 } 2805 2806 public boolean hasDescription() { 2807 return this.description != null && !this.description.isEmpty(); 2808 } 2809 2810 /** 2811 * @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 2812 */ 2813 public TestScriptSetupActionOperationComponent setDescriptionElement(StringType value) { 2814 this.description = value; 2815 return this; 2816 } 2817 2818 /** 2819 * @return The description would be used by test engines for tracking and reporting purposes. 2820 */ 2821 public String getDescription() { 2822 return this.description == null ? null : this.description.getValue(); 2823 } 2824 2825 /** 2826 * @param value The description would be used by test engines for tracking and reporting purposes. 2827 */ 2828 public TestScriptSetupActionOperationComponent setDescription(String value) { 2829 if (Utilities.noString(value)) 2830 this.description = null; 2831 else { 2832 if (this.description == null) 2833 this.description = new StringType(); 2834 this.description.setValue(value); 2835 } 2836 return this; 2837 } 2838 2839 /** 2840 * @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 2841 */ 2842 public Enumeration<ContentType> getAcceptElement() { 2843 if (this.accept == null) 2844 if (Configuration.errorOnAutoCreate()) 2845 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.accept"); 2846 else if (Configuration.doAutoCreate()) 2847 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 2848 return this.accept; 2849 } 2850 2851 public boolean hasAcceptElement() { 2852 return this.accept != null && !this.accept.isEmpty(); 2853 } 2854 2855 public boolean hasAccept() { 2856 return this.accept != null && !this.accept.isEmpty(); 2857 } 2858 2859 /** 2860 * @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 2861 */ 2862 public TestScriptSetupActionOperationComponent setAcceptElement(Enumeration<ContentType> value) { 2863 this.accept = value; 2864 return this; 2865 } 2866 2867 /** 2868 * @return The content-type or mime-type to use for RESTful operation in the 'Accept' header. 2869 */ 2870 public ContentType getAccept() { 2871 return this.accept == null ? null : this.accept.getValue(); 2872 } 2873 2874 /** 2875 * @param value The content-type or mime-type to use for RESTful operation in the 'Accept' header. 2876 */ 2877 public TestScriptSetupActionOperationComponent setAccept(ContentType value) { 2878 if (value == null) 2879 this.accept = null; 2880 else { 2881 if (this.accept == null) 2882 this.accept = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 2883 this.accept.setValue(value); 2884 } 2885 return this; 2886 } 2887 2888 /** 2889 * @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 2890 */ 2891 public Enumeration<ContentType> getContentTypeElement() { 2892 if (this.contentType == null) 2893 if (Configuration.errorOnAutoCreate()) 2894 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.contentType"); 2895 else if (Configuration.doAutoCreate()) 2896 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 2897 return this.contentType; 2898 } 2899 2900 public boolean hasContentTypeElement() { 2901 return this.contentType != null && !this.contentType.isEmpty(); 2902 } 2903 2904 public boolean hasContentType() { 2905 return this.contentType != null && !this.contentType.isEmpty(); 2906 } 2907 2908 /** 2909 * @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 2910 */ 2911 public TestScriptSetupActionOperationComponent setContentTypeElement(Enumeration<ContentType> value) { 2912 this.contentType = value; 2913 return this; 2914 } 2915 2916 /** 2917 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 2918 */ 2919 public ContentType getContentType() { 2920 return this.contentType == null ? null : this.contentType.getValue(); 2921 } 2922 2923 /** 2924 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 2925 */ 2926 public TestScriptSetupActionOperationComponent setContentType(ContentType value) { 2927 if (value == null) 2928 this.contentType = null; 2929 else { 2930 if (this.contentType == null) 2931 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 2932 this.contentType.setValue(value); 2933 } 2934 return this; 2935 } 2936 2937 /** 2938 * @return {@link #destination} (Which server to perform the operation on.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value 2939 */ 2940 public IntegerType getDestinationElement() { 2941 if (this.destination == null) 2942 if (Configuration.errorOnAutoCreate()) 2943 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.destination"); 2944 else if (Configuration.doAutoCreate()) 2945 this.destination = new IntegerType(); // bb 2946 return this.destination; 2947 } 2948 2949 public boolean hasDestinationElement() { 2950 return this.destination != null && !this.destination.isEmpty(); 2951 } 2952 2953 public boolean hasDestination() { 2954 return this.destination != null && !this.destination.isEmpty(); 2955 } 2956 2957 /** 2958 * @param value {@link #destination} (Which server to perform the operation on.). This is the underlying object with id, value and extensions. The accessor "getDestination" gives direct access to the value 2959 */ 2960 public TestScriptSetupActionOperationComponent setDestinationElement(IntegerType value) { 2961 this.destination = value; 2962 return this; 2963 } 2964 2965 /** 2966 * @return Which server to perform the operation on. 2967 */ 2968 public int getDestination() { 2969 return this.destination == null || this.destination.isEmpty() ? 0 : this.destination.getValue(); 2970 } 2971 2972 /** 2973 * @param value Which server to perform the operation on. 2974 */ 2975 public TestScriptSetupActionOperationComponent setDestination(int value) { 2976 if (this.destination == null) 2977 this.destination = new IntegerType(); 2978 this.destination.setValue(value); 2979 return this; 2980 } 2981 2982 /** 2983 * @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 2984 */ 2985 public BooleanType getEncodeRequestUrlElement() { 2986 if (this.encodeRequestUrl == null) 2987 if (Configuration.errorOnAutoCreate()) 2988 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.encodeRequestUrl"); 2989 else if (Configuration.doAutoCreate()) 2990 this.encodeRequestUrl = new BooleanType(); // bb 2991 return this.encodeRequestUrl; 2992 } 2993 2994 public boolean hasEncodeRequestUrlElement() { 2995 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 2996 } 2997 2998 public boolean hasEncodeRequestUrl() { 2999 return this.encodeRequestUrl != null && !this.encodeRequestUrl.isEmpty(); 3000 } 3001 3002 /** 3003 * @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 3004 */ 3005 public TestScriptSetupActionOperationComponent setEncodeRequestUrlElement(BooleanType value) { 3006 this.encodeRequestUrl = value; 3007 return this; 3008 } 3009 3010 /** 3011 * @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. 3012 */ 3013 public boolean getEncodeRequestUrl() { 3014 return this.encodeRequestUrl == null || this.encodeRequestUrl.isEmpty() ? false : this.encodeRequestUrl.getValue(); 3015 } 3016 3017 /** 3018 * @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. 3019 */ 3020 public TestScriptSetupActionOperationComponent setEncodeRequestUrl(boolean value) { 3021 if (this.encodeRequestUrl == null) 3022 this.encodeRequestUrl = new BooleanType(); 3023 this.encodeRequestUrl.setValue(value); 3024 return this; 3025 } 3026 3027 /** 3028 * @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 3029 */ 3030 public StringType getParamsElement() { 3031 if (this.params == null) 3032 if (Configuration.errorOnAutoCreate()) 3033 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.params"); 3034 else if (Configuration.doAutoCreate()) 3035 this.params = new StringType(); // bb 3036 return this.params; 3037 } 3038 3039 public boolean hasParamsElement() { 3040 return this.params != null && !this.params.isEmpty(); 3041 } 3042 3043 public boolean hasParams() { 3044 return this.params != null && !this.params.isEmpty(); 3045 } 3046 3047 /** 3048 * @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 3049 */ 3050 public TestScriptSetupActionOperationComponent setParamsElement(StringType value) { 3051 this.params = value; 3052 return this; 3053 } 3054 3055 /** 3056 * @return Path plus parameters after [type]. Used to set parts of the request URL explicitly. 3057 */ 3058 public String getParams() { 3059 return this.params == null ? null : this.params.getValue(); 3060 } 3061 3062 /** 3063 * @param value Path plus parameters after [type]. Used to set parts of the request URL explicitly. 3064 */ 3065 public TestScriptSetupActionOperationComponent setParams(String value) { 3066 if (Utilities.noString(value)) 3067 this.params = null; 3068 else { 3069 if (this.params == null) 3070 this.params = new StringType(); 3071 this.params.setValue(value); 3072 } 3073 return this; 3074 } 3075 3076 /** 3077 * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) 3078 */ 3079 public List<TestScriptSetupActionOperationRequestHeaderComponent> getRequestHeader() { 3080 if (this.requestHeader == null) 3081 this.requestHeader = new ArrayList<TestScriptSetupActionOperationRequestHeaderComponent>(); 3082 return this.requestHeader; 3083 } 3084 3085 public boolean hasRequestHeader() { 3086 if (this.requestHeader == null) 3087 return false; 3088 for (TestScriptSetupActionOperationRequestHeaderComponent item : this.requestHeader) 3089 if (!item.isEmpty()) 3090 return true; 3091 return false; 3092 } 3093 3094 /** 3095 * @return {@link #requestHeader} (Header elements would be used to set HTTP headers.) 3096 */ 3097 // syntactic sugar 3098 public TestScriptSetupActionOperationRequestHeaderComponent addRequestHeader() { //3 3099 TestScriptSetupActionOperationRequestHeaderComponent t = new TestScriptSetupActionOperationRequestHeaderComponent(); 3100 if (this.requestHeader == null) 3101 this.requestHeader = new ArrayList<TestScriptSetupActionOperationRequestHeaderComponent>(); 3102 this.requestHeader.add(t); 3103 return t; 3104 } 3105 3106 // syntactic sugar 3107 public TestScriptSetupActionOperationComponent addRequestHeader(TestScriptSetupActionOperationRequestHeaderComponent t) { //3 3108 if (t == null) 3109 return this; 3110 if (this.requestHeader == null) 3111 this.requestHeader = new ArrayList<TestScriptSetupActionOperationRequestHeaderComponent>(); 3112 this.requestHeader.add(t); 3113 return this; 3114 } 3115 3116 /** 3117 * @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 3118 */ 3119 public IdType getResponseIdElement() { 3120 if (this.responseId == null) 3121 if (Configuration.errorOnAutoCreate()) 3122 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.responseId"); 3123 else if (Configuration.doAutoCreate()) 3124 this.responseId = new IdType(); // bb 3125 return this.responseId; 3126 } 3127 3128 public boolean hasResponseIdElement() { 3129 return this.responseId != null && !this.responseId.isEmpty(); 3130 } 3131 3132 public boolean hasResponseId() { 3133 return this.responseId != null && !this.responseId.isEmpty(); 3134 } 3135 3136 /** 3137 * @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 3138 */ 3139 public TestScriptSetupActionOperationComponent setResponseIdElement(IdType value) { 3140 this.responseId = value; 3141 return this; 3142 } 3143 3144 /** 3145 * @return The fixture id (maybe new) to map to the response. 3146 */ 3147 public String getResponseId() { 3148 return this.responseId == null ? null : this.responseId.getValue(); 3149 } 3150 3151 /** 3152 * @param value The fixture id (maybe new) to map to the response. 3153 */ 3154 public TestScriptSetupActionOperationComponent setResponseId(String value) { 3155 if (Utilities.noString(value)) 3156 this.responseId = null; 3157 else { 3158 if (this.responseId == null) 3159 this.responseId = new IdType(); 3160 this.responseId.setValue(value); 3161 } 3162 return this; 3163 } 3164 3165 /** 3166 * @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 3167 */ 3168 public IdType getSourceIdElement() { 3169 if (this.sourceId == null) 3170 if (Configuration.errorOnAutoCreate()) 3171 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.sourceId"); 3172 else if (Configuration.doAutoCreate()) 3173 this.sourceId = new IdType(); // bb 3174 return this.sourceId; 3175 } 3176 3177 public boolean hasSourceIdElement() { 3178 return this.sourceId != null && !this.sourceId.isEmpty(); 3179 } 3180 3181 public boolean hasSourceId() { 3182 return this.sourceId != null && !this.sourceId.isEmpty(); 3183 } 3184 3185 /** 3186 * @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 3187 */ 3188 public TestScriptSetupActionOperationComponent setSourceIdElement(IdType value) { 3189 this.sourceId = value; 3190 return this; 3191 } 3192 3193 /** 3194 * @return The id of the fixture used as the body of a PUT or POST request. 3195 */ 3196 public String getSourceId() { 3197 return this.sourceId == null ? null : this.sourceId.getValue(); 3198 } 3199 3200 /** 3201 * @param value The id of the fixture used as the body of a PUT or POST request. 3202 */ 3203 public TestScriptSetupActionOperationComponent setSourceId(String value) { 3204 if (Utilities.noString(value)) 3205 this.sourceId = null; 3206 else { 3207 if (this.sourceId == null) 3208 this.sourceId = new IdType(); 3209 this.sourceId.setValue(value); 3210 } 3211 return this; 3212 } 3213 3214 /** 3215 * @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 3216 */ 3217 public IdType getTargetIdElement() { 3218 if (this.targetId == null) 3219 if (Configuration.errorOnAutoCreate()) 3220 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.targetId"); 3221 else if (Configuration.doAutoCreate()) 3222 this.targetId = new IdType(); // bb 3223 return this.targetId; 3224 } 3225 3226 public boolean hasTargetIdElement() { 3227 return this.targetId != null && !this.targetId.isEmpty(); 3228 } 3229 3230 public boolean hasTargetId() { 3231 return this.targetId != null && !this.targetId.isEmpty(); 3232 } 3233 3234 /** 3235 * @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 3236 */ 3237 public TestScriptSetupActionOperationComponent setTargetIdElement(IdType value) { 3238 this.targetId = value; 3239 return this; 3240 } 3241 3242 /** 3243 * @return Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 3244 */ 3245 public String getTargetId() { 3246 return this.targetId == null ? null : this.targetId.getValue(); 3247 } 3248 3249 /** 3250 * @param value Id of fixture used for extracting the [id], [type], and [vid] for GET requests. 3251 */ 3252 public TestScriptSetupActionOperationComponent setTargetId(String value) { 3253 if (Utilities.noString(value)) 3254 this.targetId = null; 3255 else { 3256 if (this.targetId == null) 3257 this.targetId = new IdType(); 3258 this.targetId.setValue(value); 3259 } 3260 return this; 3261 } 3262 3263 /** 3264 * @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 3265 */ 3266 public StringType getUrlElement() { 3267 if (this.url == null) 3268 if (Configuration.errorOnAutoCreate()) 3269 throw new Error("Attempt to auto-create TestScriptSetupActionOperationComponent.url"); 3270 else if (Configuration.doAutoCreate()) 3271 this.url = new StringType(); // bb 3272 return this.url; 3273 } 3274 3275 public boolean hasUrlElement() { 3276 return this.url != null && !this.url.isEmpty(); 3277 } 3278 3279 public boolean hasUrl() { 3280 return this.url != null && !this.url.isEmpty(); 3281 } 3282 3283 /** 3284 * @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 3285 */ 3286 public TestScriptSetupActionOperationComponent setUrlElement(StringType value) { 3287 this.url = value; 3288 return this; 3289 } 3290 3291 /** 3292 * @return Complete request URL. 3293 */ 3294 public String getUrl() { 3295 return this.url == null ? null : this.url.getValue(); 3296 } 3297 3298 /** 3299 * @param value Complete request URL. 3300 */ 3301 public TestScriptSetupActionOperationComponent setUrl(String value) { 3302 if (Utilities.noString(value)) 3303 this.url = null; 3304 else { 3305 if (this.url == null) 3306 this.url = new StringType(); 3307 this.url.setValue(value); 3308 } 3309 return this; 3310 } 3311 3312 protected void listChildren(List<Property> childrenList) { 3313 super.listChildren(childrenList); 3314 childrenList.add(new Property("type", "Coding", "Server interaction or operation type.", 0, java.lang.Integer.MAX_VALUE, type)); 3315 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)); 3316 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)); 3317 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)); 3318 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)); 3319 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)); 3320 childrenList.add(new Property("destination", "integer", "Which server to perform the operation on.", 0, java.lang.Integer.MAX_VALUE, destination)); 3321 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)); 3322 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)); 3323 childrenList.add(new Property("requestHeader", "", "Header elements would be used to set HTTP headers.", 0, java.lang.Integer.MAX_VALUE, requestHeader)); 3324 childrenList.add(new Property("responseId", "id", "The fixture id (maybe new) to map to the response.", 0, java.lang.Integer.MAX_VALUE, responseId)); 3325 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)); 3326 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)); 3327 childrenList.add(new Property("url", "string", "Complete request URL.", 0, java.lang.Integer.MAX_VALUE, url)); 3328 } 3329 3330 @Override 3331 public void setProperty(String name, Base value) throws FHIRException { 3332 if (name.equals("type")) 3333 this.type = castToCoding(value); // Coding 3334 else if (name.equals("resource")) 3335 this.resource = castToCode(value); // CodeType 3336 else if (name.equals("label")) 3337 this.label = castToString(value); // StringType 3338 else if (name.equals("description")) 3339 this.description = castToString(value); // StringType 3340 else if (name.equals("accept")) 3341 this.accept = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 3342 else if (name.equals("contentType")) 3343 this.contentType = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 3344 else if (name.equals("destination")) 3345 this.destination = castToInteger(value); // IntegerType 3346 else if (name.equals("encodeRequestUrl")) 3347 this.encodeRequestUrl = castToBoolean(value); // BooleanType 3348 else if (name.equals("params")) 3349 this.params = castToString(value); // StringType 3350 else if (name.equals("requestHeader")) 3351 this.getRequestHeader().add((TestScriptSetupActionOperationRequestHeaderComponent) value); 3352 else if (name.equals("responseId")) 3353 this.responseId = castToId(value); // IdType 3354 else if (name.equals("sourceId")) 3355 this.sourceId = castToId(value); // IdType 3356 else if (name.equals("targetId")) 3357 this.targetId = castToId(value); // IdType 3358 else if (name.equals("url")) 3359 this.url = castToString(value); // StringType 3360 else 3361 super.setProperty(name, value); 3362 } 3363 3364 @Override 3365 public Base addChild(String name) throws FHIRException { 3366 if (name.equals("type")) { 3367 this.type = new Coding(); 3368 return this.type; 3369 } 3370 else if (name.equals("resource")) { 3371 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 3372 } 3373 else if (name.equals("label")) { 3374 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 3375 } 3376 else if (name.equals("description")) { 3377 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 3378 } 3379 else if (name.equals("accept")) { 3380 throw new FHIRException("Cannot call addChild on a primitive type TestScript.accept"); 3381 } 3382 else if (name.equals("contentType")) { 3383 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 3384 } 3385 else if (name.equals("destination")) { 3386 throw new FHIRException("Cannot call addChild on a primitive type TestScript.destination"); 3387 } 3388 else if (name.equals("encodeRequestUrl")) { 3389 throw new FHIRException("Cannot call addChild on a primitive type TestScript.encodeRequestUrl"); 3390 } 3391 else if (name.equals("params")) { 3392 throw new FHIRException("Cannot call addChild on a primitive type TestScript.params"); 3393 } 3394 else if (name.equals("requestHeader")) { 3395 return addRequestHeader(); 3396 } 3397 else if (name.equals("responseId")) { 3398 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseId"); 3399 } 3400 else if (name.equals("sourceId")) { 3401 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 3402 } 3403 else if (name.equals("targetId")) { 3404 throw new FHIRException("Cannot call addChild on a primitive type TestScript.targetId"); 3405 } 3406 else if (name.equals("url")) { 3407 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 3408 } 3409 else 3410 return super.addChild(name); 3411 } 3412 3413 public TestScriptSetupActionOperationComponent copy() { 3414 TestScriptSetupActionOperationComponent dst = new TestScriptSetupActionOperationComponent(); 3415 copyValues(dst); 3416 dst.type = type == null ? null : type.copy(); 3417 dst.resource = resource == null ? null : resource.copy(); 3418 dst.label = label == null ? null : label.copy(); 3419 dst.description = description == null ? null : description.copy(); 3420 dst.accept = accept == null ? null : accept.copy(); 3421 dst.contentType = contentType == null ? null : contentType.copy(); 3422 dst.destination = destination == null ? null : destination.copy(); 3423 dst.encodeRequestUrl = encodeRequestUrl == null ? null : encodeRequestUrl.copy(); 3424 dst.params = params == null ? null : params.copy(); 3425 if (requestHeader != null) { 3426 dst.requestHeader = new ArrayList<TestScriptSetupActionOperationRequestHeaderComponent>(); 3427 for (TestScriptSetupActionOperationRequestHeaderComponent i : requestHeader) 3428 dst.requestHeader.add(i.copy()); 3429 }; 3430 dst.responseId = responseId == null ? null : responseId.copy(); 3431 dst.sourceId = sourceId == null ? null : sourceId.copy(); 3432 dst.targetId = targetId == null ? null : targetId.copy(); 3433 dst.url = url == null ? null : url.copy(); 3434 return dst; 3435 } 3436 3437 @Override 3438 public boolean equalsDeep(Base other) { 3439 if (!super.equalsDeep(other)) 3440 return false; 3441 if (!(other instanceof TestScriptSetupActionOperationComponent)) 3442 return false; 3443 TestScriptSetupActionOperationComponent o = (TestScriptSetupActionOperationComponent) other; 3444 return compareDeep(type, o.type, true) && compareDeep(resource, o.resource, true) && compareDeep(label, o.label, true) 3445 && compareDeep(description, o.description, true) && compareDeep(accept, o.accept, true) && compareDeep(contentType, o.contentType, true) 3446 && compareDeep(destination, o.destination, true) && compareDeep(encodeRequestUrl, o.encodeRequestUrl, true) 3447 && compareDeep(params, o.params, true) && compareDeep(requestHeader, o.requestHeader, true) && compareDeep(responseId, o.responseId, true) 3448 && compareDeep(sourceId, o.sourceId, true) && compareDeep(targetId, o.targetId, true) && compareDeep(url, o.url, true) 3449 ; 3450 } 3451 3452 @Override 3453 public boolean equalsShallow(Base other) { 3454 if (!super.equalsShallow(other)) 3455 return false; 3456 if (!(other instanceof TestScriptSetupActionOperationComponent)) 3457 return false; 3458 TestScriptSetupActionOperationComponent o = (TestScriptSetupActionOperationComponent) other; 3459 return compareValues(resource, o.resource, true) && compareValues(label, o.label, true) && compareValues(description, o.description, true) 3460 && compareValues(accept, o.accept, true) && compareValues(contentType, o.contentType, true) && compareValues(destination, o.destination, true) 3461 && compareValues(encodeRequestUrl, o.encodeRequestUrl, true) && compareValues(params, o.params, true) 3462 && compareValues(responseId, o.responseId, true) && compareValues(sourceId, o.sourceId, true) && compareValues(targetId, o.targetId, true) 3463 && compareValues(url, o.url, true); 3464 } 3465 3466 public boolean isEmpty() { 3467 return super.isEmpty() && (type == null || type.isEmpty()) && (resource == null || resource.isEmpty()) 3468 && (label == null || label.isEmpty()) && (description == null || description.isEmpty()) && (accept == null || accept.isEmpty()) 3469 && (contentType == null || contentType.isEmpty()) && (destination == null || destination.isEmpty()) 3470 && (encodeRequestUrl == null || encodeRequestUrl.isEmpty()) && (params == null || params.isEmpty()) 3471 && (requestHeader == null || requestHeader.isEmpty()) && (responseId == null || responseId.isEmpty()) 3472 && (sourceId == null || sourceId.isEmpty()) && (targetId == null || targetId.isEmpty()) && (url == null || url.isEmpty()) 3473 ; 3474 } 3475 3476 public String fhirType() { 3477 return "TestScript.setup.action.operation"; 3478 3479 } 3480 3481 } 3482 3483 @Block() 3484 public static class TestScriptSetupActionOperationRequestHeaderComponent extends BackboneElement implements IBaseBackboneElement { 3485 /** 3486 * The HTTP header field e.g. "Accept". 3487 */ 3488 @Child(name = "field", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3489 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field e.g. \"Accept\"." ) 3490 protected StringType field; 3491 3492 /** 3493 * The value of the header e.g. "application/xml". 3494 */ 3495 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 3496 @Description(shortDefinition="HTTP headerfield value", formalDefinition="The value of the header e.g. \"application/xml\"." ) 3497 protected StringType value; 3498 3499 private static final long serialVersionUID = 274395337L; 3500 3501 /* 3502 * Constructor 3503 */ 3504 public TestScriptSetupActionOperationRequestHeaderComponent() { 3505 super(); 3506 } 3507 3508 /* 3509 * Constructor 3510 */ 3511 public TestScriptSetupActionOperationRequestHeaderComponent(StringType field, StringType value) { 3512 super(); 3513 this.field = field; 3514 this.value = value; 3515 } 3516 3517 /** 3518 * @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 3519 */ 3520 public StringType getFieldElement() { 3521 if (this.field == null) 3522 if (Configuration.errorOnAutoCreate()) 3523 throw new Error("Attempt to auto-create TestScriptSetupActionOperationRequestHeaderComponent.field"); 3524 else if (Configuration.doAutoCreate()) 3525 this.field = new StringType(); // bb 3526 return this.field; 3527 } 3528 3529 public boolean hasFieldElement() { 3530 return this.field != null && !this.field.isEmpty(); 3531 } 3532 3533 public boolean hasField() { 3534 return this.field != null && !this.field.isEmpty(); 3535 } 3536 3537 /** 3538 * @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 3539 */ 3540 public TestScriptSetupActionOperationRequestHeaderComponent setFieldElement(StringType value) { 3541 this.field = value; 3542 return this; 3543 } 3544 3545 /** 3546 * @return The HTTP header field e.g. "Accept". 3547 */ 3548 public String getField() { 3549 return this.field == null ? null : this.field.getValue(); 3550 } 3551 3552 /** 3553 * @param value The HTTP header field e.g. "Accept". 3554 */ 3555 public TestScriptSetupActionOperationRequestHeaderComponent setField(String value) { 3556 if (this.field == null) 3557 this.field = new StringType(); 3558 this.field.setValue(value); 3559 return this; 3560 } 3561 3562 /** 3563 * @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 3564 */ 3565 public StringType getValueElement() { 3566 if (this.value == null) 3567 if (Configuration.errorOnAutoCreate()) 3568 throw new Error("Attempt to auto-create TestScriptSetupActionOperationRequestHeaderComponent.value"); 3569 else if (Configuration.doAutoCreate()) 3570 this.value = new StringType(); // bb 3571 return this.value; 3572 } 3573 3574 public boolean hasValueElement() { 3575 return this.value != null && !this.value.isEmpty(); 3576 } 3577 3578 public boolean hasValue() { 3579 return this.value != null && !this.value.isEmpty(); 3580 } 3581 3582 /** 3583 * @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 3584 */ 3585 public TestScriptSetupActionOperationRequestHeaderComponent setValueElement(StringType value) { 3586 this.value = value; 3587 return this; 3588 } 3589 3590 /** 3591 * @return The value of the header e.g. "application/xml". 3592 */ 3593 public String getValue() { 3594 return this.value == null ? null : this.value.getValue(); 3595 } 3596 3597 /** 3598 * @param value The value of the header e.g. "application/xml". 3599 */ 3600 public TestScriptSetupActionOperationRequestHeaderComponent setValue(String value) { 3601 if (this.value == null) 3602 this.value = new StringType(); 3603 this.value.setValue(value); 3604 return this; 3605 } 3606 3607 protected void listChildren(List<Property> childrenList) { 3608 super.listChildren(childrenList); 3609 childrenList.add(new Property("field", "string", "The HTTP header field e.g. \"Accept\".", 0, java.lang.Integer.MAX_VALUE, field)); 3610 childrenList.add(new Property("value", "string", "The value of the header e.g. \"application/xml\".", 0, java.lang.Integer.MAX_VALUE, value)); 3611 } 3612 3613 @Override 3614 public void setProperty(String name, Base value) throws FHIRException { 3615 if (name.equals("field")) 3616 this.field = castToString(value); // StringType 3617 else if (name.equals("value")) 3618 this.value = castToString(value); // StringType 3619 else 3620 super.setProperty(name, value); 3621 } 3622 3623 @Override 3624 public Base addChild(String name) throws FHIRException { 3625 if (name.equals("field")) { 3626 throw new FHIRException("Cannot call addChild on a primitive type TestScript.field"); 3627 } 3628 else if (name.equals("value")) { 3629 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 3630 } 3631 else 3632 return super.addChild(name); 3633 } 3634 3635 public TestScriptSetupActionOperationRequestHeaderComponent copy() { 3636 TestScriptSetupActionOperationRequestHeaderComponent dst = new TestScriptSetupActionOperationRequestHeaderComponent(); 3637 copyValues(dst); 3638 dst.field = field == null ? null : field.copy(); 3639 dst.value = value == null ? null : value.copy(); 3640 return dst; 3641 } 3642 3643 @Override 3644 public boolean equalsDeep(Base other) { 3645 if (!super.equalsDeep(other)) 3646 return false; 3647 if (!(other instanceof TestScriptSetupActionOperationRequestHeaderComponent)) 3648 return false; 3649 TestScriptSetupActionOperationRequestHeaderComponent o = (TestScriptSetupActionOperationRequestHeaderComponent) other; 3650 return compareDeep(field, o.field, true) && compareDeep(value, o.value, true); 3651 } 3652 3653 @Override 3654 public boolean equalsShallow(Base other) { 3655 if (!super.equalsShallow(other)) 3656 return false; 3657 if (!(other instanceof TestScriptSetupActionOperationRequestHeaderComponent)) 3658 return false; 3659 TestScriptSetupActionOperationRequestHeaderComponent o = (TestScriptSetupActionOperationRequestHeaderComponent) other; 3660 return compareValues(field, o.field, true) && compareValues(value, o.value, true); 3661 } 3662 3663 public boolean isEmpty() { 3664 return super.isEmpty() && (field == null || field.isEmpty()) && (value == null || value.isEmpty()) 3665 ; 3666 } 3667 3668 public String fhirType() { 3669 return "TestScript.setup.action.operation.requestHeader"; 3670 3671 } 3672 3673 } 3674 3675 @Block() 3676 public static class TestScriptSetupActionAssertComponent extends BackboneElement implements IBaseBackboneElement { 3677 /** 3678 * The label would be used for tracking/logging purposes by test engines. 3679 */ 3680 @Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 3681 @Description(shortDefinition="Tracking/logging assertion label", formalDefinition="The label would be used for tracking/logging purposes by test engines." ) 3682 protected StringType label; 3683 3684 /** 3685 * The description would be used by test engines for tracking and reporting purposes. 3686 */ 3687 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3688 @Description(shortDefinition="Tracking/reporting assertion description", formalDefinition="The description would be used by test engines for tracking and reporting purposes." ) 3689 protected StringType description; 3690 3691 /** 3692 * The direction to use for the assertion. 3693 */ 3694 @Child(name = "direction", type = {CodeType.class}, order=3, min=0, max=1, modifier=false, summary=false) 3695 @Description(shortDefinition="response | request", formalDefinition="The direction to use for the assertion." ) 3696 protected Enumeration<AssertionDirectionType> direction; 3697 3698 /** 3699 * Id of fixture used to compare the "sourceId/path" evaluations to. 3700 */ 3701 @Child(name = "compareToSourceId", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 3702 @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." ) 3703 protected StringType compareToSourceId; 3704 3705 /** 3706 * XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. 3707 */ 3708 @Child(name = "compareToSourcePath", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 3709 @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." ) 3710 protected StringType compareToSourcePath; 3711 3712 /** 3713 * The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 3714 */ 3715 @Child(name = "contentType", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 3716 @Description(shortDefinition="xml | json", formalDefinition="The content-type or mime-type to use for RESTful operation in the 'Content-Type' header." ) 3717 protected Enumeration<ContentType> contentType; 3718 3719 /** 3720 * The HTTP header field name e.g. 'Location'. 3721 */ 3722 @Child(name = "headerField", type = {StringType.class}, order=7, min=0, max=1, modifier=false, summary=false) 3723 @Description(shortDefinition="HTTP header field name", formalDefinition="The HTTP header field name e.g. 'Location'." ) 3724 protected StringType headerField; 3725 3726 /** 3727 * The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. 3728 */ 3729 @Child(name = "minimumId", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=false) 3730 @Description(shortDefinition="Fixture Id of minimum content resource", formalDefinition="The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId." ) 3731 protected StringType minimumId; 3732 3733 /** 3734 * Whether or not the test execution performs validation on the bundle navigation links. 3735 */ 3736 @Child(name = "navigationLinks", type = {BooleanType.class}, order=9, min=0, max=1, modifier=false, summary=false) 3737 @Description(shortDefinition="Perform validation on navigation links?", formalDefinition="Whether or not the test execution performs validation on the bundle navigation links." ) 3738 protected BooleanType navigationLinks; 3739 3740 /** 3741 * The operator type. 3742 */ 3743 @Child(name = "operator", type = {CodeType.class}, order=10, min=0, max=1, modifier=false, summary=false) 3744 @Description(shortDefinition="equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains", formalDefinition="The operator type." ) 3745 protected Enumeration<AssertionOperatorType> operator; 3746 3747 /** 3748 * The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 3749 */ 3750 @Child(name = "path", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 3751 @Description(shortDefinition="XPath or JSONPath expression", formalDefinition="The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server." ) 3752 protected StringType path; 3753 3754 /** 3755 * The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 3756 */ 3757 @Child(name = "resource", type = {CodeType.class}, order=12, min=0, max=1, modifier=false, summary=false) 3758 @Description(shortDefinition="Resource type", formalDefinition="The type of the resource. See http://hl7-fhir.github.io/resourcelist.html." ) 3759 protected CodeType resource; 3760 3761 /** 3762 * okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 3763 */ 3764 @Child(name = "response", type = {CodeType.class}, order=13, min=0, max=1, modifier=false, summary=false) 3765 @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." ) 3766 protected Enumeration<AssertionResponseTypes> response; 3767 3768 /** 3769 * The value of the HTTP response code to be tested. 3770 */ 3771 @Child(name = "responseCode", type = {StringType.class}, order=14, min=0, max=1, modifier=false, summary=false) 3772 @Description(shortDefinition="HTTP response code to test", formalDefinition="The value of the HTTP response code to be tested." ) 3773 protected StringType responseCode; 3774 3775 /** 3776 * Fixture to evaluate the XPath/JSONPath expression or the headerField against. 3777 */ 3778 @Child(name = "sourceId", type = {IdType.class}, order=15, min=0, max=1, modifier=false, summary=false) 3779 @Description(shortDefinition="Fixture Id of source expression or headerField", formalDefinition="Fixture to evaluate the XPath/JSONPath expression or the headerField against." ) 3780 protected IdType sourceId; 3781 3782 /** 3783 * The ID of the Profile to validate against. 3784 */ 3785 @Child(name = "validateProfileId", type = {IdType.class}, order=16, min=0, max=1, modifier=false, summary=false) 3786 @Description(shortDefinition="Profile Id of validation profile reference", formalDefinition="The ID of the Profile to validate against." ) 3787 protected IdType validateProfileId; 3788 3789 /** 3790 * The value to compare to. 3791 */ 3792 @Child(name = "value", type = {StringType.class}, order=17, min=0, max=1, modifier=false, summary=false) 3793 @Description(shortDefinition="The value to compare to", formalDefinition="The value to compare to." ) 3794 protected StringType value; 3795 3796 /** 3797 * Whether or not the test execution will produce a warning only on error for this assert. 3798 */ 3799 @Child(name = "warningOnly", type = {BooleanType.class}, order=18, min=0, max=1, modifier=false, summary=false) 3800 @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." ) 3801 protected BooleanType warningOnly; 3802 3803 private static final long serialVersionUID = -607939856L; 3804 3805 /* 3806 * Constructor 3807 */ 3808 public TestScriptSetupActionAssertComponent() { 3809 super(); 3810 } 3811 3812 /** 3813 * @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 3814 */ 3815 public StringType getLabelElement() { 3816 if (this.label == null) 3817 if (Configuration.errorOnAutoCreate()) 3818 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.label"); 3819 else if (Configuration.doAutoCreate()) 3820 this.label = new StringType(); // bb 3821 return this.label; 3822 } 3823 3824 public boolean hasLabelElement() { 3825 return this.label != null && !this.label.isEmpty(); 3826 } 3827 3828 public boolean hasLabel() { 3829 return this.label != null && !this.label.isEmpty(); 3830 } 3831 3832 /** 3833 * @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 3834 */ 3835 public TestScriptSetupActionAssertComponent setLabelElement(StringType value) { 3836 this.label = value; 3837 return this; 3838 } 3839 3840 /** 3841 * @return The label would be used for tracking/logging purposes by test engines. 3842 */ 3843 public String getLabel() { 3844 return this.label == null ? null : this.label.getValue(); 3845 } 3846 3847 /** 3848 * @param value The label would be used for tracking/logging purposes by test engines. 3849 */ 3850 public TestScriptSetupActionAssertComponent setLabel(String value) { 3851 if (Utilities.noString(value)) 3852 this.label = null; 3853 else { 3854 if (this.label == null) 3855 this.label = new StringType(); 3856 this.label.setValue(value); 3857 } 3858 return this; 3859 } 3860 3861 /** 3862 * @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 3863 */ 3864 public StringType getDescriptionElement() { 3865 if (this.description == null) 3866 if (Configuration.errorOnAutoCreate()) 3867 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.description"); 3868 else if (Configuration.doAutoCreate()) 3869 this.description = new StringType(); // bb 3870 return this.description; 3871 } 3872 3873 public boolean hasDescriptionElement() { 3874 return this.description != null && !this.description.isEmpty(); 3875 } 3876 3877 public boolean hasDescription() { 3878 return this.description != null && !this.description.isEmpty(); 3879 } 3880 3881 /** 3882 * @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 3883 */ 3884 public TestScriptSetupActionAssertComponent setDescriptionElement(StringType value) { 3885 this.description = value; 3886 return this; 3887 } 3888 3889 /** 3890 * @return The description would be used by test engines for tracking and reporting purposes. 3891 */ 3892 public String getDescription() { 3893 return this.description == null ? null : this.description.getValue(); 3894 } 3895 3896 /** 3897 * @param value The description would be used by test engines for tracking and reporting purposes. 3898 */ 3899 public TestScriptSetupActionAssertComponent setDescription(String value) { 3900 if (Utilities.noString(value)) 3901 this.description = null; 3902 else { 3903 if (this.description == null) 3904 this.description = new StringType(); 3905 this.description.setValue(value); 3906 } 3907 return this; 3908 } 3909 3910 /** 3911 * @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 3912 */ 3913 public Enumeration<AssertionDirectionType> getDirectionElement() { 3914 if (this.direction == null) 3915 if (Configuration.errorOnAutoCreate()) 3916 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.direction"); 3917 else if (Configuration.doAutoCreate()) 3918 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); // bb 3919 return this.direction; 3920 } 3921 3922 public boolean hasDirectionElement() { 3923 return this.direction != null && !this.direction.isEmpty(); 3924 } 3925 3926 public boolean hasDirection() { 3927 return this.direction != null && !this.direction.isEmpty(); 3928 } 3929 3930 /** 3931 * @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 3932 */ 3933 public TestScriptSetupActionAssertComponent setDirectionElement(Enumeration<AssertionDirectionType> value) { 3934 this.direction = value; 3935 return this; 3936 } 3937 3938 /** 3939 * @return The direction to use for the assertion. 3940 */ 3941 public AssertionDirectionType getDirection() { 3942 return this.direction == null ? null : this.direction.getValue(); 3943 } 3944 3945 /** 3946 * @param value The direction to use for the assertion. 3947 */ 3948 public TestScriptSetupActionAssertComponent setDirection(AssertionDirectionType value) { 3949 if (value == null) 3950 this.direction = null; 3951 else { 3952 if (this.direction == null) 3953 this.direction = new Enumeration<AssertionDirectionType>(new AssertionDirectionTypeEnumFactory()); 3954 this.direction.setValue(value); 3955 } 3956 return this; 3957 } 3958 3959 /** 3960 * @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 3961 */ 3962 public StringType getCompareToSourceIdElement() { 3963 if (this.compareToSourceId == null) 3964 if (Configuration.errorOnAutoCreate()) 3965 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.compareToSourceId"); 3966 else if (Configuration.doAutoCreate()) 3967 this.compareToSourceId = new StringType(); // bb 3968 return this.compareToSourceId; 3969 } 3970 3971 public boolean hasCompareToSourceIdElement() { 3972 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 3973 } 3974 3975 public boolean hasCompareToSourceId() { 3976 return this.compareToSourceId != null && !this.compareToSourceId.isEmpty(); 3977 } 3978 3979 /** 3980 * @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 3981 */ 3982 public TestScriptSetupActionAssertComponent setCompareToSourceIdElement(StringType value) { 3983 this.compareToSourceId = value; 3984 return this; 3985 } 3986 3987 /** 3988 * @return Id of fixture used to compare the "sourceId/path" evaluations to. 3989 */ 3990 public String getCompareToSourceId() { 3991 return this.compareToSourceId == null ? null : this.compareToSourceId.getValue(); 3992 } 3993 3994 /** 3995 * @param value Id of fixture used to compare the "sourceId/path" evaluations to. 3996 */ 3997 public TestScriptSetupActionAssertComponent setCompareToSourceId(String value) { 3998 if (Utilities.noString(value)) 3999 this.compareToSourceId = null; 4000 else { 4001 if (this.compareToSourceId == null) 4002 this.compareToSourceId = new StringType(); 4003 this.compareToSourceId.setValue(value); 4004 } 4005 return this; 4006 } 4007 4008 /** 4009 * @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 4010 */ 4011 public StringType getCompareToSourcePathElement() { 4012 if (this.compareToSourcePath == null) 4013 if (Configuration.errorOnAutoCreate()) 4014 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.compareToSourcePath"); 4015 else if (Configuration.doAutoCreate()) 4016 this.compareToSourcePath = new StringType(); // bb 4017 return this.compareToSourcePath; 4018 } 4019 4020 public boolean hasCompareToSourcePathElement() { 4021 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 4022 } 4023 4024 public boolean hasCompareToSourcePath() { 4025 return this.compareToSourcePath != null && !this.compareToSourcePath.isEmpty(); 4026 } 4027 4028 /** 4029 * @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 4030 */ 4031 public TestScriptSetupActionAssertComponent setCompareToSourcePathElement(StringType value) { 4032 this.compareToSourcePath = value; 4033 return this; 4034 } 4035 4036 /** 4037 * @return XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. 4038 */ 4039 public String getCompareToSourcePath() { 4040 return this.compareToSourcePath == null ? null : this.compareToSourcePath.getValue(); 4041 } 4042 4043 /** 4044 * @param value XPath or JSONPath expression against fixture used to compare the "sourceId/path" evaluations to. 4045 */ 4046 public TestScriptSetupActionAssertComponent setCompareToSourcePath(String value) { 4047 if (Utilities.noString(value)) 4048 this.compareToSourcePath = null; 4049 else { 4050 if (this.compareToSourcePath == null) 4051 this.compareToSourcePath = new StringType(); 4052 this.compareToSourcePath.setValue(value); 4053 } 4054 return this; 4055 } 4056 4057 /** 4058 * @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 4059 */ 4060 public Enumeration<ContentType> getContentTypeElement() { 4061 if (this.contentType == null) 4062 if (Configuration.errorOnAutoCreate()) 4063 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.contentType"); 4064 else if (Configuration.doAutoCreate()) 4065 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); // bb 4066 return this.contentType; 4067 } 4068 4069 public boolean hasContentTypeElement() { 4070 return this.contentType != null && !this.contentType.isEmpty(); 4071 } 4072 4073 public boolean hasContentType() { 4074 return this.contentType != null && !this.contentType.isEmpty(); 4075 } 4076 4077 /** 4078 * @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 4079 */ 4080 public TestScriptSetupActionAssertComponent setContentTypeElement(Enumeration<ContentType> value) { 4081 this.contentType = value; 4082 return this; 4083 } 4084 4085 /** 4086 * @return The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 4087 */ 4088 public ContentType getContentType() { 4089 return this.contentType == null ? null : this.contentType.getValue(); 4090 } 4091 4092 /** 4093 * @param value The content-type or mime-type to use for RESTful operation in the 'Content-Type' header. 4094 */ 4095 public TestScriptSetupActionAssertComponent setContentType(ContentType value) { 4096 if (value == null) 4097 this.contentType = null; 4098 else { 4099 if (this.contentType == null) 4100 this.contentType = new Enumeration<ContentType>(new ContentTypeEnumFactory()); 4101 this.contentType.setValue(value); 4102 } 4103 return this; 4104 } 4105 4106 /** 4107 * @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 4108 */ 4109 public StringType getHeaderFieldElement() { 4110 if (this.headerField == null) 4111 if (Configuration.errorOnAutoCreate()) 4112 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.headerField"); 4113 else if (Configuration.doAutoCreate()) 4114 this.headerField = new StringType(); // bb 4115 return this.headerField; 4116 } 4117 4118 public boolean hasHeaderFieldElement() { 4119 return this.headerField != null && !this.headerField.isEmpty(); 4120 } 4121 4122 public boolean hasHeaderField() { 4123 return this.headerField != null && !this.headerField.isEmpty(); 4124 } 4125 4126 /** 4127 * @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 4128 */ 4129 public TestScriptSetupActionAssertComponent setHeaderFieldElement(StringType value) { 4130 this.headerField = value; 4131 return this; 4132 } 4133 4134 /** 4135 * @return The HTTP header field name e.g. 'Location'. 4136 */ 4137 public String getHeaderField() { 4138 return this.headerField == null ? null : this.headerField.getValue(); 4139 } 4140 4141 /** 4142 * @param value The HTTP header field name e.g. 'Location'. 4143 */ 4144 public TestScriptSetupActionAssertComponent setHeaderField(String value) { 4145 if (Utilities.noString(value)) 4146 this.headerField = null; 4147 else { 4148 if (this.headerField == null) 4149 this.headerField = new StringType(); 4150 this.headerField.setValue(value); 4151 } 4152 return this; 4153 } 4154 4155 /** 4156 * @return {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value 4157 */ 4158 public StringType getMinimumIdElement() { 4159 if (this.minimumId == null) 4160 if (Configuration.errorOnAutoCreate()) 4161 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.minimumId"); 4162 else if (Configuration.doAutoCreate()) 4163 this.minimumId = new StringType(); // bb 4164 return this.minimumId; 4165 } 4166 4167 public boolean hasMinimumIdElement() { 4168 return this.minimumId != null && !this.minimumId.isEmpty(); 4169 } 4170 4171 public boolean hasMinimumId() { 4172 return this.minimumId != null && !this.minimumId.isEmpty(); 4173 } 4174 4175 /** 4176 * @param value {@link #minimumId} (The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.). This is the underlying object with id, value and extensions. The accessor "getMinimumId" gives direct access to the value 4177 */ 4178 public TestScriptSetupActionAssertComponent setMinimumIdElement(StringType value) { 4179 this.minimumId = value; 4180 return this; 4181 } 4182 4183 /** 4184 * @return The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. 4185 */ 4186 public String getMinimumId() { 4187 return this.minimumId == null ? null : this.minimumId.getValue(); 4188 } 4189 4190 /** 4191 * @param value The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId. 4192 */ 4193 public TestScriptSetupActionAssertComponent setMinimumId(String value) { 4194 if (Utilities.noString(value)) 4195 this.minimumId = null; 4196 else { 4197 if (this.minimumId == null) 4198 this.minimumId = new StringType(); 4199 this.minimumId.setValue(value); 4200 } 4201 return this; 4202 } 4203 4204 /** 4205 * @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 4206 */ 4207 public BooleanType getNavigationLinksElement() { 4208 if (this.navigationLinks == null) 4209 if (Configuration.errorOnAutoCreate()) 4210 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.navigationLinks"); 4211 else if (Configuration.doAutoCreate()) 4212 this.navigationLinks = new BooleanType(); // bb 4213 return this.navigationLinks; 4214 } 4215 4216 public boolean hasNavigationLinksElement() { 4217 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 4218 } 4219 4220 public boolean hasNavigationLinks() { 4221 return this.navigationLinks != null && !this.navigationLinks.isEmpty(); 4222 } 4223 4224 /** 4225 * @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 4226 */ 4227 public TestScriptSetupActionAssertComponent setNavigationLinksElement(BooleanType value) { 4228 this.navigationLinks = value; 4229 return this; 4230 } 4231 4232 /** 4233 * @return Whether or not the test execution performs validation on the bundle navigation links. 4234 */ 4235 public boolean getNavigationLinks() { 4236 return this.navigationLinks == null || this.navigationLinks.isEmpty() ? false : this.navigationLinks.getValue(); 4237 } 4238 4239 /** 4240 * @param value Whether or not the test execution performs validation on the bundle navigation links. 4241 */ 4242 public TestScriptSetupActionAssertComponent setNavigationLinks(boolean value) { 4243 if (this.navigationLinks == null) 4244 this.navigationLinks = new BooleanType(); 4245 this.navigationLinks.setValue(value); 4246 return this; 4247 } 4248 4249 /** 4250 * @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 4251 */ 4252 public Enumeration<AssertionOperatorType> getOperatorElement() { 4253 if (this.operator == null) 4254 if (Configuration.errorOnAutoCreate()) 4255 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.operator"); 4256 else if (Configuration.doAutoCreate()) 4257 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); // bb 4258 return this.operator; 4259 } 4260 4261 public boolean hasOperatorElement() { 4262 return this.operator != null && !this.operator.isEmpty(); 4263 } 4264 4265 public boolean hasOperator() { 4266 return this.operator != null && !this.operator.isEmpty(); 4267 } 4268 4269 /** 4270 * @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 4271 */ 4272 public TestScriptSetupActionAssertComponent setOperatorElement(Enumeration<AssertionOperatorType> value) { 4273 this.operator = value; 4274 return this; 4275 } 4276 4277 /** 4278 * @return The operator type. 4279 */ 4280 public AssertionOperatorType getOperator() { 4281 return this.operator == null ? null : this.operator.getValue(); 4282 } 4283 4284 /** 4285 * @param value The operator type. 4286 */ 4287 public TestScriptSetupActionAssertComponent setOperator(AssertionOperatorType value) { 4288 if (value == null) 4289 this.operator = null; 4290 else { 4291 if (this.operator == null) 4292 this.operator = new Enumeration<AssertionOperatorType>(new AssertionOperatorTypeEnumFactory()); 4293 this.operator.setValue(value); 4294 } 4295 return this; 4296 } 4297 4298 /** 4299 * @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 4300 */ 4301 public StringType getPathElement() { 4302 if (this.path == null) 4303 if (Configuration.errorOnAutoCreate()) 4304 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.path"); 4305 else if (Configuration.doAutoCreate()) 4306 this.path = new StringType(); // bb 4307 return this.path; 4308 } 4309 4310 public boolean hasPathElement() { 4311 return this.path != null && !this.path.isEmpty(); 4312 } 4313 4314 public boolean hasPath() { 4315 return this.path != null && !this.path.isEmpty(); 4316 } 4317 4318 /** 4319 * @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 4320 */ 4321 public TestScriptSetupActionAssertComponent setPathElement(StringType value) { 4322 this.path = value; 4323 return this; 4324 } 4325 4326 /** 4327 * @return The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 4328 */ 4329 public String getPath() { 4330 return this.path == null ? null : this.path.getValue(); 4331 } 4332 4333 /** 4334 * @param value The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server. 4335 */ 4336 public TestScriptSetupActionAssertComponent setPath(String value) { 4337 if (Utilities.noString(value)) 4338 this.path = null; 4339 else { 4340 if (this.path == null) 4341 this.path = new StringType(); 4342 this.path.setValue(value); 4343 } 4344 return this; 4345 } 4346 4347 /** 4348 * @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 4349 */ 4350 public CodeType getResourceElement() { 4351 if (this.resource == null) 4352 if (Configuration.errorOnAutoCreate()) 4353 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.resource"); 4354 else if (Configuration.doAutoCreate()) 4355 this.resource = new CodeType(); // bb 4356 return this.resource; 4357 } 4358 4359 public boolean hasResourceElement() { 4360 return this.resource != null && !this.resource.isEmpty(); 4361 } 4362 4363 public boolean hasResource() { 4364 return this.resource != null && !this.resource.isEmpty(); 4365 } 4366 4367 /** 4368 * @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 4369 */ 4370 public TestScriptSetupActionAssertComponent setResourceElement(CodeType value) { 4371 this.resource = value; 4372 return this; 4373 } 4374 4375 /** 4376 * @return The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 4377 */ 4378 public String getResource() { 4379 return this.resource == null ? null : this.resource.getValue(); 4380 } 4381 4382 /** 4383 * @param value The type of the resource. See http://hl7-fhir.github.io/resourcelist.html. 4384 */ 4385 public TestScriptSetupActionAssertComponent setResource(String value) { 4386 if (Utilities.noString(value)) 4387 this.resource = null; 4388 else { 4389 if (this.resource == null) 4390 this.resource = new CodeType(); 4391 this.resource.setValue(value); 4392 } 4393 return this; 4394 } 4395 4396 /** 4397 * @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 4398 */ 4399 public Enumeration<AssertionResponseTypes> getResponseElement() { 4400 if (this.response == null) 4401 if (Configuration.errorOnAutoCreate()) 4402 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.response"); 4403 else if (Configuration.doAutoCreate()) 4404 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); // bb 4405 return this.response; 4406 } 4407 4408 public boolean hasResponseElement() { 4409 return this.response != null && !this.response.isEmpty(); 4410 } 4411 4412 public boolean hasResponse() { 4413 return this.response != null && !this.response.isEmpty(); 4414 } 4415 4416 /** 4417 * @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 4418 */ 4419 public TestScriptSetupActionAssertComponent setResponseElement(Enumeration<AssertionResponseTypes> value) { 4420 this.response = value; 4421 return this; 4422 } 4423 4424 /** 4425 * @return okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 4426 */ 4427 public AssertionResponseTypes getResponse() { 4428 return this.response == null ? null : this.response.getValue(); 4429 } 4430 4431 /** 4432 * @param value okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable. 4433 */ 4434 public TestScriptSetupActionAssertComponent setResponse(AssertionResponseTypes value) { 4435 if (value == null) 4436 this.response = null; 4437 else { 4438 if (this.response == null) 4439 this.response = new Enumeration<AssertionResponseTypes>(new AssertionResponseTypesEnumFactory()); 4440 this.response.setValue(value); 4441 } 4442 return this; 4443 } 4444 4445 /** 4446 * @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 4447 */ 4448 public StringType getResponseCodeElement() { 4449 if (this.responseCode == null) 4450 if (Configuration.errorOnAutoCreate()) 4451 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.responseCode"); 4452 else if (Configuration.doAutoCreate()) 4453 this.responseCode = new StringType(); // bb 4454 return this.responseCode; 4455 } 4456 4457 public boolean hasResponseCodeElement() { 4458 return this.responseCode != null && !this.responseCode.isEmpty(); 4459 } 4460 4461 public boolean hasResponseCode() { 4462 return this.responseCode != null && !this.responseCode.isEmpty(); 4463 } 4464 4465 /** 4466 * @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 4467 */ 4468 public TestScriptSetupActionAssertComponent setResponseCodeElement(StringType value) { 4469 this.responseCode = value; 4470 return this; 4471 } 4472 4473 /** 4474 * @return The value of the HTTP response code to be tested. 4475 */ 4476 public String getResponseCode() { 4477 return this.responseCode == null ? null : this.responseCode.getValue(); 4478 } 4479 4480 /** 4481 * @param value The value of the HTTP response code to be tested. 4482 */ 4483 public TestScriptSetupActionAssertComponent setResponseCode(String value) { 4484 if (Utilities.noString(value)) 4485 this.responseCode = null; 4486 else { 4487 if (this.responseCode == null) 4488 this.responseCode = new StringType(); 4489 this.responseCode.setValue(value); 4490 } 4491 return this; 4492 } 4493 4494 /** 4495 * @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 4496 */ 4497 public IdType getSourceIdElement() { 4498 if (this.sourceId == null) 4499 if (Configuration.errorOnAutoCreate()) 4500 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.sourceId"); 4501 else if (Configuration.doAutoCreate()) 4502 this.sourceId = new IdType(); // bb 4503 return this.sourceId; 4504 } 4505 4506 public boolean hasSourceIdElement() { 4507 return this.sourceId != null && !this.sourceId.isEmpty(); 4508 } 4509 4510 public boolean hasSourceId() { 4511 return this.sourceId != null && !this.sourceId.isEmpty(); 4512 } 4513 4514 /** 4515 * @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 4516 */ 4517 public TestScriptSetupActionAssertComponent setSourceIdElement(IdType value) { 4518 this.sourceId = value; 4519 return this; 4520 } 4521 4522 /** 4523 * @return Fixture to evaluate the XPath/JSONPath expression or the headerField against. 4524 */ 4525 public String getSourceId() { 4526 return this.sourceId == null ? null : this.sourceId.getValue(); 4527 } 4528 4529 /** 4530 * @param value Fixture to evaluate the XPath/JSONPath expression or the headerField against. 4531 */ 4532 public TestScriptSetupActionAssertComponent setSourceId(String value) { 4533 if (Utilities.noString(value)) 4534 this.sourceId = null; 4535 else { 4536 if (this.sourceId == null) 4537 this.sourceId = new IdType(); 4538 this.sourceId.setValue(value); 4539 } 4540 return this; 4541 } 4542 4543 /** 4544 * @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 4545 */ 4546 public IdType getValidateProfileIdElement() { 4547 if (this.validateProfileId == null) 4548 if (Configuration.errorOnAutoCreate()) 4549 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.validateProfileId"); 4550 else if (Configuration.doAutoCreate()) 4551 this.validateProfileId = new IdType(); // bb 4552 return this.validateProfileId; 4553 } 4554 4555 public boolean hasValidateProfileIdElement() { 4556 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 4557 } 4558 4559 public boolean hasValidateProfileId() { 4560 return this.validateProfileId != null && !this.validateProfileId.isEmpty(); 4561 } 4562 4563 /** 4564 * @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 4565 */ 4566 public TestScriptSetupActionAssertComponent setValidateProfileIdElement(IdType value) { 4567 this.validateProfileId = value; 4568 return this; 4569 } 4570 4571 /** 4572 * @return The ID of the Profile to validate against. 4573 */ 4574 public String getValidateProfileId() { 4575 return this.validateProfileId == null ? null : this.validateProfileId.getValue(); 4576 } 4577 4578 /** 4579 * @param value The ID of the Profile to validate against. 4580 */ 4581 public TestScriptSetupActionAssertComponent setValidateProfileId(String value) { 4582 if (Utilities.noString(value)) 4583 this.validateProfileId = null; 4584 else { 4585 if (this.validateProfileId == null) 4586 this.validateProfileId = new IdType(); 4587 this.validateProfileId.setValue(value); 4588 } 4589 return this; 4590 } 4591 4592 /** 4593 * @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 4594 */ 4595 public StringType getValueElement() { 4596 if (this.value == null) 4597 if (Configuration.errorOnAutoCreate()) 4598 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.value"); 4599 else if (Configuration.doAutoCreate()) 4600 this.value = new StringType(); // bb 4601 return this.value; 4602 } 4603 4604 public boolean hasValueElement() { 4605 return this.value != null && !this.value.isEmpty(); 4606 } 4607 4608 public boolean hasValue() { 4609 return this.value != null && !this.value.isEmpty(); 4610 } 4611 4612 /** 4613 * @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 4614 */ 4615 public TestScriptSetupActionAssertComponent setValueElement(StringType value) { 4616 this.value = value; 4617 return this; 4618 } 4619 4620 /** 4621 * @return The value to compare to. 4622 */ 4623 public String getValue() { 4624 return this.value == null ? null : this.value.getValue(); 4625 } 4626 4627 /** 4628 * @param value The value to compare to. 4629 */ 4630 public TestScriptSetupActionAssertComponent setValue(String value) { 4631 if (Utilities.noString(value)) 4632 this.value = null; 4633 else { 4634 if (this.value == null) 4635 this.value = new StringType(); 4636 this.value.setValue(value); 4637 } 4638 return this; 4639 } 4640 4641 /** 4642 * @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 4643 */ 4644 public BooleanType getWarningOnlyElement() { 4645 if (this.warningOnly == null) 4646 if (Configuration.errorOnAutoCreate()) 4647 throw new Error("Attempt to auto-create TestScriptSetupActionAssertComponent.warningOnly"); 4648 else if (Configuration.doAutoCreate()) 4649 this.warningOnly = new BooleanType(); // bb 4650 return this.warningOnly; 4651 } 4652 4653 public boolean hasWarningOnlyElement() { 4654 return this.warningOnly != null && !this.warningOnly.isEmpty(); 4655 } 4656 4657 public boolean hasWarningOnly() { 4658 return this.warningOnly != null && !this.warningOnly.isEmpty(); 4659 } 4660 4661 /** 4662 * @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 4663 */ 4664 public TestScriptSetupActionAssertComponent setWarningOnlyElement(BooleanType value) { 4665 this.warningOnly = value; 4666 return this; 4667 } 4668 4669 /** 4670 * @return Whether or not the test execution will produce a warning only on error for this assert. 4671 */ 4672 public boolean getWarningOnly() { 4673 return this.warningOnly == null || this.warningOnly.isEmpty() ? false : this.warningOnly.getValue(); 4674 } 4675 4676 /** 4677 * @param value Whether or not the test execution will produce a warning only on error for this assert. 4678 */ 4679 public TestScriptSetupActionAssertComponent setWarningOnly(boolean value) { 4680 if (this.warningOnly == null) 4681 this.warningOnly = new BooleanType(); 4682 this.warningOnly.setValue(value); 4683 return this; 4684 } 4685 4686 protected void listChildren(List<Property> childrenList) { 4687 super.listChildren(childrenList); 4688 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)); 4689 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)); 4690 childrenList.add(new Property("direction", "code", "The direction to use for the assertion.", 0, java.lang.Integer.MAX_VALUE, direction)); 4691 childrenList.add(new Property("compareToSourceId", "string", "Id of fixture used to compare the \"sourceId/path\" evaluations to.", 0, java.lang.Integer.MAX_VALUE, compareToSourceId)); 4692 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)); 4693 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)); 4694 childrenList.add(new Property("headerField", "string", "The HTTP header field name e.g. 'Location'.", 0, java.lang.Integer.MAX_VALUE, headerField)); 4695 childrenList.add(new Property("minimumId", "string", "The ID of a fixture. Asserts that the response contains at a minimumId the fixture specified by minimumId.", 0, java.lang.Integer.MAX_VALUE, minimumId)); 4696 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)); 4697 childrenList.add(new Property("operator", "code", "The operator type.", 0, java.lang.Integer.MAX_VALUE, operator)); 4698 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)); 4699 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)); 4700 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)); 4701 childrenList.add(new Property("responseCode", "string", "The value of the HTTP response code to be tested.", 0, java.lang.Integer.MAX_VALUE, responseCode)); 4702 childrenList.add(new Property("sourceId", "id", "Fixture to evaluate the XPath/JSONPath expression or the headerField against.", 0, java.lang.Integer.MAX_VALUE, sourceId)); 4703 childrenList.add(new Property("validateProfileId", "id", "The ID of the Profile to validate against.", 0, java.lang.Integer.MAX_VALUE, validateProfileId)); 4704 childrenList.add(new Property("value", "string", "The value to compare to.", 0, java.lang.Integer.MAX_VALUE, value)); 4705 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)); 4706 } 4707 4708 @Override 4709 public void setProperty(String name, Base value) throws FHIRException { 4710 if (name.equals("label")) 4711 this.label = castToString(value); // StringType 4712 else if (name.equals("description")) 4713 this.description = castToString(value); // StringType 4714 else if (name.equals("direction")) 4715 this.direction = new AssertionDirectionTypeEnumFactory().fromType(value); // Enumeration<AssertionDirectionType> 4716 else if (name.equals("compareToSourceId")) 4717 this.compareToSourceId = castToString(value); // StringType 4718 else if (name.equals("compareToSourcePath")) 4719 this.compareToSourcePath = castToString(value); // StringType 4720 else if (name.equals("contentType")) 4721 this.contentType = new ContentTypeEnumFactory().fromType(value); // Enumeration<ContentType> 4722 else if (name.equals("headerField")) 4723 this.headerField = castToString(value); // StringType 4724 else if (name.equals("minimumId")) 4725 this.minimumId = castToString(value); // StringType 4726 else if (name.equals("navigationLinks")) 4727 this.navigationLinks = castToBoolean(value); // BooleanType 4728 else if (name.equals("operator")) 4729 this.operator = new AssertionOperatorTypeEnumFactory().fromType(value); // Enumeration<AssertionOperatorType> 4730 else if (name.equals("path")) 4731 this.path = castToString(value); // StringType 4732 else if (name.equals("resource")) 4733 this.resource = castToCode(value); // CodeType 4734 else if (name.equals("response")) 4735 this.response = new AssertionResponseTypesEnumFactory().fromType(value); // Enumeration<AssertionResponseTypes> 4736 else if (name.equals("responseCode")) 4737 this.responseCode = castToString(value); // StringType 4738 else if (name.equals("sourceId")) 4739 this.sourceId = castToId(value); // IdType 4740 else if (name.equals("validateProfileId")) 4741 this.validateProfileId = castToId(value); // IdType 4742 else if (name.equals("value")) 4743 this.value = castToString(value); // StringType 4744 else if (name.equals("warningOnly")) 4745 this.warningOnly = castToBoolean(value); // BooleanType 4746 else 4747 super.setProperty(name, value); 4748 } 4749 4750 @Override 4751 public Base addChild(String name) throws FHIRException { 4752 if (name.equals("label")) { 4753 throw new FHIRException("Cannot call addChild on a primitive type TestScript.label"); 4754 } 4755 else if (name.equals("description")) { 4756 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 4757 } 4758 else if (name.equals("direction")) { 4759 throw new FHIRException("Cannot call addChild on a primitive type TestScript.direction"); 4760 } 4761 else if (name.equals("compareToSourceId")) { 4762 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourceId"); 4763 } 4764 else if (name.equals("compareToSourcePath")) { 4765 throw new FHIRException("Cannot call addChild on a primitive type TestScript.compareToSourcePath"); 4766 } 4767 else if (name.equals("contentType")) { 4768 throw new FHIRException("Cannot call addChild on a primitive type TestScript.contentType"); 4769 } 4770 else if (name.equals("headerField")) { 4771 throw new FHIRException("Cannot call addChild on a primitive type TestScript.headerField"); 4772 } 4773 else if (name.equals("minimumId")) { 4774 throw new FHIRException("Cannot call addChild on a primitive type TestScript.minimumId"); 4775 } 4776 else if (name.equals("navigationLinks")) { 4777 throw new FHIRException("Cannot call addChild on a primitive type TestScript.navigationLinks"); 4778 } 4779 else if (name.equals("operator")) { 4780 throw new FHIRException("Cannot call addChild on a primitive type TestScript.operator"); 4781 } 4782 else if (name.equals("path")) { 4783 throw new FHIRException("Cannot call addChild on a primitive type TestScript.path"); 4784 } 4785 else if (name.equals("resource")) { 4786 throw new FHIRException("Cannot call addChild on a primitive type TestScript.resource"); 4787 } 4788 else if (name.equals("response")) { 4789 throw new FHIRException("Cannot call addChild on a primitive type TestScript.response"); 4790 } 4791 else if (name.equals("responseCode")) { 4792 throw new FHIRException("Cannot call addChild on a primitive type TestScript.responseCode"); 4793 } 4794 else if (name.equals("sourceId")) { 4795 throw new FHIRException("Cannot call addChild on a primitive type TestScript.sourceId"); 4796 } 4797 else if (name.equals("validateProfileId")) { 4798 throw new FHIRException("Cannot call addChild on a primitive type TestScript.validateProfileId"); 4799 } 4800 else if (name.equals("value")) { 4801 throw new FHIRException("Cannot call addChild on a primitive type TestScript.value"); 4802 } 4803 else if (name.equals("warningOnly")) { 4804 throw new FHIRException("Cannot call addChild on a primitive type TestScript.warningOnly"); 4805 } 4806 else 4807 return super.addChild(name); 4808 } 4809 4810 public TestScriptSetupActionAssertComponent copy() { 4811 TestScriptSetupActionAssertComponent dst = new TestScriptSetupActionAssertComponent(); 4812 copyValues(dst); 4813 dst.label = label == null ? null : label.copy(); 4814 dst.description = description == null ? null : description.copy(); 4815 dst.direction = direction == null ? null : direction.copy(); 4816 dst.compareToSourceId = compareToSourceId == null ? null : compareToSourceId.copy(); 4817 dst.compareToSourcePath = compareToSourcePath == null ? null : compareToSourcePath.copy(); 4818 dst.contentType = contentType == null ? null : contentType.copy(); 4819 dst.headerField = headerField == null ? null : headerField.copy(); 4820 dst.minimumId = minimumId == null ? null : minimumId.copy(); 4821 dst.navigationLinks = navigationLinks == null ? null : navigationLinks.copy(); 4822 dst.operator = operator == null ? null : operator.copy(); 4823 dst.path = path == null ? null : path.copy(); 4824 dst.resource = resource == null ? null : resource.copy(); 4825 dst.response = response == null ? null : response.copy(); 4826 dst.responseCode = responseCode == null ? null : responseCode.copy(); 4827 dst.sourceId = sourceId == null ? null : sourceId.copy(); 4828 dst.validateProfileId = validateProfileId == null ? null : validateProfileId.copy(); 4829 dst.value = value == null ? null : value.copy(); 4830 dst.warningOnly = warningOnly == null ? null : warningOnly.copy(); 4831 return dst; 4832 } 4833 4834 @Override 4835 public boolean equalsDeep(Base other) { 4836 if (!super.equalsDeep(other)) 4837 return false; 4838 if (!(other instanceof TestScriptSetupActionAssertComponent)) 4839 return false; 4840 TestScriptSetupActionAssertComponent o = (TestScriptSetupActionAssertComponent) other; 4841 return compareDeep(label, o.label, true) && compareDeep(description, o.description, true) && compareDeep(direction, o.direction, true) 4842 && compareDeep(compareToSourceId, o.compareToSourceId, true) && compareDeep(compareToSourcePath, o.compareToSourcePath, true) 4843 && compareDeep(contentType, o.contentType, true) && compareDeep(headerField, o.headerField, true) 4844 && compareDeep(minimumId, o.minimumId, true) && compareDeep(navigationLinks, o.navigationLinks, true) 4845 && compareDeep(operator, o.operator, true) && compareDeep(path, o.path, true) && compareDeep(resource, o.resource, true) 4846 && compareDeep(response, o.response, true) && compareDeep(responseCode, o.responseCode, true) && compareDeep(sourceId, o.sourceId, true) 4847 && compareDeep(validateProfileId, o.validateProfileId, true) && compareDeep(value, o.value, true) 4848 && compareDeep(warningOnly, o.warningOnly, true); 4849 } 4850 4851 @Override 4852 public boolean equalsShallow(Base other) { 4853 if (!super.equalsShallow(other)) 4854 return false; 4855 if (!(other instanceof TestScriptSetupActionAssertComponent)) 4856 return false; 4857 TestScriptSetupActionAssertComponent o = (TestScriptSetupActionAssertComponent) other; 4858 return compareValues(label, o.label, true) && compareValues(description, o.description, true) && compareValues(direction, o.direction, true) 4859 && compareValues(compareToSourceId, o.compareToSourceId, true) && compareValues(compareToSourcePath, o.compareToSourcePath, true) 4860 && compareValues(contentType, o.contentType, true) && compareValues(headerField, o.headerField, true) 4861 && compareValues(minimumId, o.minimumId, true) && compareValues(navigationLinks, o.navigationLinks, true) 4862 && compareValues(operator, o.operator, true) && compareValues(path, o.path, true) && compareValues(resource, o.resource, true) 4863 && compareValues(response, o.response, true) && compareValues(responseCode, o.responseCode, true) && compareValues(sourceId, o.sourceId, true) 4864 && compareValues(validateProfileId, o.validateProfileId, true) && compareValues(value, o.value, true) 4865 && compareValues(warningOnly, o.warningOnly, true); 4866 } 4867 4868 public boolean isEmpty() { 4869 return super.isEmpty() && (label == null || label.isEmpty()) && (description == null || description.isEmpty()) 4870 && (direction == null || direction.isEmpty()) && (compareToSourceId == null || compareToSourceId.isEmpty()) 4871 && (compareToSourcePath == null || compareToSourcePath.isEmpty()) && (contentType == null || contentType.isEmpty()) 4872 && (headerField == null || headerField.isEmpty()) && (minimumId == null || minimumId.isEmpty()) 4873 && (navigationLinks == null || navigationLinks.isEmpty()) && (operator == null || operator.isEmpty()) 4874 && (path == null || path.isEmpty()) && (resource == null || resource.isEmpty()) && (response == null || response.isEmpty()) 4875 && (responseCode == null || responseCode.isEmpty()) && (sourceId == null || sourceId.isEmpty()) 4876 && (validateProfileId == null || validateProfileId.isEmpty()) && (value == null || value.isEmpty()) 4877 && (warningOnly == null || warningOnly.isEmpty()); 4878 } 4879 4880 public String fhirType() { 4881 return "TestScript.setup.action.assert"; 4882 4883 } 4884 4885 } 4886 4887 @Block() 4888 public static class TestScriptTestComponent extends BackboneElement implements IBaseBackboneElement { 4889 /** 4890 * The name of this test used for tracking/logging purposes by test engines. 4891 */ 4892 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 4893 @Description(shortDefinition="Tracking/logging name of this test", formalDefinition="The name of this test used for tracking/logging purposes by test engines." ) 4894 protected StringType name; 4895 4896 /** 4897 * A short description of the test used by test engines for tracking and reporting purposes. 4898 */ 4899 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 4900 @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." ) 4901 protected StringType description; 4902 4903 /** 4904 * Capabilities that must exist and are assumed to function correctly on the FHIR server being tested. 4905 */ 4906 @Child(name = "metadata", type = {TestScriptMetadataComponent.class}, order=3, min=0, max=1, modifier=false, summary=false) 4907 @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." ) 4908 protected TestScriptMetadataComponent metadata; 4909 4910 /** 4911 * Action would contain either an operation or an assertion. 4912 */ 4913 @Child(name = "action", type = {}, order=4, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 4914 @Description(shortDefinition="A test operation or assert to perform", formalDefinition="Action would contain either an operation or an assertion." ) 4915 protected List<TestScriptTestActionComponent> action; 4916 4917 private static final long serialVersionUID = 408339297L; 4918 4919 /* 4920 * Constructor 4921 */ 4922 public TestScriptTestComponent() { 4923 super(); 4924 } 4925 4926 /** 4927 * @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 4928 */ 4929 public StringType getNameElement() { 4930 if (this.name == null) 4931 if (Configuration.errorOnAutoCreate()) 4932 throw new Error("Attempt to auto-create TestScriptTestComponent.name"); 4933 else if (Configuration.doAutoCreate()) 4934 this.name = new StringType(); // bb 4935 return this.name; 4936 } 4937 4938 public boolean hasNameElement() { 4939 return this.name != null && !this.name.isEmpty(); 4940 } 4941 4942 public boolean hasName() { 4943 return this.name != null && !this.name.isEmpty(); 4944 } 4945 4946 /** 4947 * @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 4948 */ 4949 public TestScriptTestComponent setNameElement(StringType value) { 4950 this.name = value; 4951 return this; 4952 } 4953 4954 /** 4955 * @return The name of this test used for tracking/logging purposes by test engines. 4956 */ 4957 public String getName() { 4958 return this.name == null ? null : this.name.getValue(); 4959 } 4960 4961 /** 4962 * @param value The name of this test used for tracking/logging purposes by test engines. 4963 */ 4964 public TestScriptTestComponent setName(String value) { 4965 if (Utilities.noString(value)) 4966 this.name = null; 4967 else { 4968 if (this.name == null) 4969 this.name = new StringType(); 4970 this.name.setValue(value); 4971 } 4972 return this; 4973 } 4974 4975 /** 4976 * @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 4977 */ 4978 public StringType getDescriptionElement() { 4979 if (this.description == null) 4980 if (Configuration.errorOnAutoCreate()) 4981 throw new Error("Attempt to auto-create TestScriptTestComponent.description"); 4982 else if (Configuration.doAutoCreate()) 4983 this.description = new StringType(); // bb 4984 return this.description; 4985 } 4986 4987 public boolean hasDescriptionElement() { 4988 return this.description != null && !this.description.isEmpty(); 4989 } 4990 4991 public boolean hasDescription() { 4992 return this.description != null && !this.description.isEmpty(); 4993 } 4994 4995 /** 4996 * @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 4997 */ 4998 public TestScriptTestComponent setDescriptionElement(StringType value) { 4999 this.description = value; 5000 return this; 5001 } 5002 5003 /** 5004 * @return A short description of the test used by test engines for tracking and reporting purposes. 5005 */ 5006 public String getDescription() { 5007 return this.description == null ? null : this.description.getValue(); 5008 } 5009 5010 /** 5011 * @param value A short description of the test used by test engines for tracking and reporting purposes. 5012 */ 5013 public TestScriptTestComponent setDescription(String value) { 5014 if (Utilities.noString(value)) 5015 this.description = null; 5016 else { 5017 if (this.description == null) 5018 this.description = new StringType(); 5019 this.description.setValue(value); 5020 } 5021 return this; 5022 } 5023 5024 /** 5025 * @return {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 5026 */ 5027 public TestScriptMetadataComponent getMetadata() { 5028 if (this.metadata == null) 5029 if (Configuration.errorOnAutoCreate()) 5030 throw new Error("Attempt to auto-create TestScriptTestComponent.metadata"); 5031 else if (Configuration.doAutoCreate()) 5032 this.metadata = new TestScriptMetadataComponent(); // cc 5033 return this.metadata; 5034 } 5035 5036 public boolean hasMetadata() { 5037 return this.metadata != null && !this.metadata.isEmpty(); 5038 } 5039 5040 /** 5041 * @param value {@link #metadata} (Capabilities that must exist and are assumed to function correctly on the FHIR server being tested.) 5042 */ 5043 public TestScriptTestComponent setMetadata(TestScriptMetadataComponent value) { 5044 this.metadata = value; 5045 return this; 5046 } 5047 5048 /** 5049 * @return {@link #action} (Action would contain either an operation or an assertion.) 5050 */ 5051 public List<TestScriptTestActionComponent> getAction() { 5052 if (this.action == null) 5053 this.action = new ArrayList<TestScriptTestActionComponent>(); 5054 return this.action; 5055 } 5056 5057 public boolean hasAction() { 5058 if (this.action == null) 5059 return false; 5060 for (TestScriptTestActionComponent item : this.action) 5061 if (!item.isEmpty()) 5062 return true; 5063 return false; 5064 } 5065 5066 /** 5067 * @return {@link #action} (Action would contain either an operation or an assertion.) 5068 */ 5069 // syntactic sugar 5070 public TestScriptTestActionComponent addAction() { //3 5071 TestScriptTestActionComponent t = new TestScriptTestActionComponent(); 5072 if (this.action == null) 5073 this.action = new ArrayList<TestScriptTestActionComponent>(); 5074 this.action.add(t); 5075 return t; 5076 } 5077 5078 // syntactic sugar 5079 public TestScriptTestComponent addAction(TestScriptTestActionComponent t) { //3 5080 if (t == null) 5081 return this; 5082 if (this.action == null) 5083 this.action = new ArrayList<TestScriptTestActionComponent>(); 5084 this.action.add(t); 5085 return this; 5086 } 5087 5088 protected void listChildren(List<Property> childrenList) { 5089 super.listChildren(childrenList); 5090 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)); 5091 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)); 5092 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)); 5093 childrenList.add(new Property("action", "", "Action would contain either an operation or an assertion.", 0, java.lang.Integer.MAX_VALUE, action)); 5094 } 5095 5096 @Override 5097 public void setProperty(String name, Base value) throws FHIRException { 5098 if (name.equals("name")) 5099 this.name = castToString(value); // StringType 5100 else if (name.equals("description")) 5101 this.description = castToString(value); // StringType 5102 else if (name.equals("metadata")) 5103 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 5104 else if (name.equals("action")) 5105 this.getAction().add((TestScriptTestActionComponent) value); 5106 else 5107 super.setProperty(name, value); 5108 } 5109 5110 @Override 5111 public Base addChild(String name) throws FHIRException { 5112 if (name.equals("name")) { 5113 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 5114 } 5115 else if (name.equals("description")) { 5116 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 5117 } 5118 else if (name.equals("metadata")) { 5119 this.metadata = new TestScriptMetadataComponent(); 5120 return this.metadata; 5121 } 5122 else if (name.equals("action")) { 5123 return addAction(); 5124 } 5125 else 5126 return super.addChild(name); 5127 } 5128 5129 public TestScriptTestComponent copy() { 5130 TestScriptTestComponent dst = new TestScriptTestComponent(); 5131 copyValues(dst); 5132 dst.name = name == null ? null : name.copy(); 5133 dst.description = description == null ? null : description.copy(); 5134 dst.metadata = metadata == null ? null : metadata.copy(); 5135 if (action != null) { 5136 dst.action = new ArrayList<TestScriptTestActionComponent>(); 5137 for (TestScriptTestActionComponent i : action) 5138 dst.action.add(i.copy()); 5139 }; 5140 return dst; 5141 } 5142 5143 @Override 5144 public boolean equalsDeep(Base other) { 5145 if (!super.equalsDeep(other)) 5146 return false; 5147 if (!(other instanceof TestScriptTestComponent)) 5148 return false; 5149 TestScriptTestComponent o = (TestScriptTestComponent) other; 5150 return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(metadata, o.metadata, true) 5151 && compareDeep(action, o.action, true); 5152 } 5153 5154 @Override 5155 public boolean equalsShallow(Base other) { 5156 if (!super.equalsShallow(other)) 5157 return false; 5158 if (!(other instanceof TestScriptTestComponent)) 5159 return false; 5160 TestScriptTestComponent o = (TestScriptTestComponent) other; 5161 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 5162 } 5163 5164 public boolean isEmpty() { 5165 return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) 5166 && (metadata == null || metadata.isEmpty()) && (action == null || action.isEmpty()); 5167 } 5168 5169 public String fhirType() { 5170 return "TestScript.test"; 5171 5172 } 5173 5174 } 5175 5176 @Block() 5177 public static class TestScriptTestActionComponent extends BackboneElement implements IBaseBackboneElement { 5178 /** 5179 * An operation would involve a REST request to a server. 5180 */ 5181 @Child(name = "operation", type = {TestScriptSetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 5182 @Description(shortDefinition="The setup operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 5183 protected TestScriptSetupActionOperationComponent operation; 5184 5185 /** 5186 * Evaluates the results of previous operations to determine if the server under test behaves appropriately. 5187 */ 5188 @Child(name = "assert", type = {TestScriptSetupActionAssertComponent.class}, order=2, min=0, max=1, modifier=false, summary=false) 5189 @Description(shortDefinition="The setup assertion to perform", formalDefinition="Evaluates the results of previous operations to determine if the server under test behaves appropriately." ) 5190 protected TestScriptSetupActionAssertComponent assert_; 5191 5192 private static final long serialVersionUID = 1411550037L; 5193 5194 /* 5195 * Constructor 5196 */ 5197 public TestScriptTestActionComponent() { 5198 super(); 5199 } 5200 5201 /** 5202 * @return {@link #operation} (An operation would involve a REST request to a server.) 5203 */ 5204 public TestScriptSetupActionOperationComponent getOperation() { 5205 if (this.operation == null) 5206 if (Configuration.errorOnAutoCreate()) 5207 throw new Error("Attempt to auto-create TestScriptTestActionComponent.operation"); 5208 else if (Configuration.doAutoCreate()) 5209 this.operation = new TestScriptSetupActionOperationComponent(); // cc 5210 return this.operation; 5211 } 5212 5213 public boolean hasOperation() { 5214 return this.operation != null && !this.operation.isEmpty(); 5215 } 5216 5217 /** 5218 * @param value {@link #operation} (An operation would involve a REST request to a server.) 5219 */ 5220 public TestScriptTestActionComponent setOperation(TestScriptSetupActionOperationComponent value) { 5221 this.operation = value; 5222 return this; 5223 } 5224 5225 /** 5226 * @return {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 5227 */ 5228 public TestScriptSetupActionAssertComponent getAssert() { 5229 if (this.assert_ == null) 5230 if (Configuration.errorOnAutoCreate()) 5231 throw new Error("Attempt to auto-create TestScriptTestActionComponent.assert_"); 5232 else if (Configuration.doAutoCreate()) 5233 this.assert_ = new TestScriptSetupActionAssertComponent(); // cc 5234 return this.assert_; 5235 } 5236 5237 public boolean hasAssert() { 5238 return this.assert_ != null && !this.assert_.isEmpty(); 5239 } 5240 5241 /** 5242 * @param value {@link #assert_} (Evaluates the results of previous operations to determine if the server under test behaves appropriately.) 5243 */ 5244 public TestScriptTestActionComponent setAssert(TestScriptSetupActionAssertComponent value) { 5245 this.assert_ = value; 5246 return this; 5247 } 5248 5249 protected void listChildren(List<Property> childrenList) { 5250 super.listChildren(childrenList); 5251 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)); 5252 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_)); 5253 } 5254 5255 @Override 5256 public void setProperty(String name, Base value) throws FHIRException { 5257 if (name.equals("operation")) 5258 this.operation = (TestScriptSetupActionOperationComponent) value; // TestScriptSetupActionOperationComponent 5259 else if (name.equals("assert")) 5260 this.assert_ = (TestScriptSetupActionAssertComponent) value; // TestScriptSetupActionAssertComponent 5261 else 5262 super.setProperty(name, value); 5263 } 5264 5265 @Override 5266 public Base addChild(String name) throws FHIRException { 5267 if (name.equals("operation")) { 5268 this.operation = new TestScriptSetupActionOperationComponent(); 5269 return this.operation; 5270 } 5271 else if (name.equals("assert")) { 5272 this.assert_ = new TestScriptSetupActionAssertComponent(); 5273 return this.assert_; 5274 } 5275 else 5276 return super.addChild(name); 5277 } 5278 5279 public TestScriptTestActionComponent copy() { 5280 TestScriptTestActionComponent dst = new TestScriptTestActionComponent(); 5281 copyValues(dst); 5282 dst.operation = operation == null ? null : operation.copy(); 5283 dst.assert_ = assert_ == null ? null : assert_.copy(); 5284 return dst; 5285 } 5286 5287 @Override 5288 public boolean equalsDeep(Base other) { 5289 if (!super.equalsDeep(other)) 5290 return false; 5291 if (!(other instanceof TestScriptTestActionComponent)) 5292 return false; 5293 TestScriptTestActionComponent o = (TestScriptTestActionComponent) other; 5294 return compareDeep(operation, o.operation, true) && compareDeep(assert_, o.assert_, true); 5295 } 5296 5297 @Override 5298 public boolean equalsShallow(Base other) { 5299 if (!super.equalsShallow(other)) 5300 return false; 5301 if (!(other instanceof TestScriptTestActionComponent)) 5302 return false; 5303 TestScriptTestActionComponent o = (TestScriptTestActionComponent) other; 5304 return true; 5305 } 5306 5307 public boolean isEmpty() { 5308 return super.isEmpty() && (operation == null || operation.isEmpty()) && (assert_ == null || assert_.isEmpty()) 5309 ; 5310 } 5311 5312 public String fhirType() { 5313 return "TestScript.test.action"; 5314 5315 } 5316 5317 } 5318 5319 @Block() 5320 public static class TestScriptTeardownComponent extends BackboneElement implements IBaseBackboneElement { 5321 /** 5322 * The teardown action will only contain an operation. 5323 */ 5324 @Child(name = "action", type = {}, order=1, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5325 @Description(shortDefinition="One or more teardown operations to perform", formalDefinition="The teardown action will only contain an operation." ) 5326 protected List<TestScriptTeardownActionComponent> action; 5327 5328 private static final long serialVersionUID = 1850225254L; 5329 5330 /* 5331 * Constructor 5332 */ 5333 public TestScriptTeardownComponent() { 5334 super(); 5335 } 5336 5337 /** 5338 * @return {@link #action} (The teardown action will only contain an operation.) 5339 */ 5340 public List<TestScriptTeardownActionComponent> getAction() { 5341 if (this.action == null) 5342 this.action = new ArrayList<TestScriptTeardownActionComponent>(); 5343 return this.action; 5344 } 5345 5346 public boolean hasAction() { 5347 if (this.action == null) 5348 return false; 5349 for (TestScriptTeardownActionComponent item : this.action) 5350 if (!item.isEmpty()) 5351 return true; 5352 return false; 5353 } 5354 5355 /** 5356 * @return {@link #action} (The teardown action will only contain an operation.) 5357 */ 5358 // syntactic sugar 5359 public TestScriptTeardownActionComponent addAction() { //3 5360 TestScriptTeardownActionComponent t = new TestScriptTeardownActionComponent(); 5361 if (this.action == null) 5362 this.action = new ArrayList<TestScriptTeardownActionComponent>(); 5363 this.action.add(t); 5364 return t; 5365 } 5366 5367 // syntactic sugar 5368 public TestScriptTeardownComponent addAction(TestScriptTeardownActionComponent t) { //3 5369 if (t == null) 5370 return this; 5371 if (this.action == null) 5372 this.action = new ArrayList<TestScriptTeardownActionComponent>(); 5373 this.action.add(t); 5374 return this; 5375 } 5376 5377 protected void listChildren(List<Property> childrenList) { 5378 super.listChildren(childrenList); 5379 childrenList.add(new Property("action", "", "The teardown action will only contain an operation.", 0, java.lang.Integer.MAX_VALUE, action)); 5380 } 5381 5382 @Override 5383 public void setProperty(String name, Base value) throws FHIRException { 5384 if (name.equals("action")) 5385 this.getAction().add((TestScriptTeardownActionComponent) value); 5386 else 5387 super.setProperty(name, value); 5388 } 5389 5390 @Override 5391 public Base addChild(String name) throws FHIRException { 5392 if (name.equals("action")) { 5393 return addAction(); 5394 } 5395 else 5396 return super.addChild(name); 5397 } 5398 5399 public TestScriptTeardownComponent copy() { 5400 TestScriptTeardownComponent dst = new TestScriptTeardownComponent(); 5401 copyValues(dst); 5402 if (action != null) { 5403 dst.action = new ArrayList<TestScriptTeardownActionComponent>(); 5404 for (TestScriptTeardownActionComponent i : action) 5405 dst.action.add(i.copy()); 5406 }; 5407 return dst; 5408 } 5409 5410 @Override 5411 public boolean equalsDeep(Base other) { 5412 if (!super.equalsDeep(other)) 5413 return false; 5414 if (!(other instanceof TestScriptTeardownComponent)) 5415 return false; 5416 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other; 5417 return compareDeep(action, o.action, true); 5418 } 5419 5420 @Override 5421 public boolean equalsShallow(Base other) { 5422 if (!super.equalsShallow(other)) 5423 return false; 5424 if (!(other instanceof TestScriptTeardownComponent)) 5425 return false; 5426 TestScriptTeardownComponent o = (TestScriptTeardownComponent) other; 5427 return true; 5428 } 5429 5430 public boolean isEmpty() { 5431 return super.isEmpty() && (action == null || action.isEmpty()); 5432 } 5433 5434 public String fhirType() { 5435 return "TestScript.teardown"; 5436 5437 } 5438 5439 } 5440 5441 @Block() 5442 public static class TestScriptTeardownActionComponent extends BackboneElement implements IBaseBackboneElement { 5443 /** 5444 * An operation would involve a REST request to a server. 5445 */ 5446 @Child(name = "operation", type = {TestScriptSetupActionOperationComponent.class}, order=1, min=0, max=1, modifier=false, summary=false) 5447 @Description(shortDefinition="The teardown operation to perform", formalDefinition="An operation would involve a REST request to a server." ) 5448 protected TestScriptSetupActionOperationComponent operation; 5449 5450 private static final long serialVersionUID = 1684092023L; 5451 5452 /* 5453 * Constructor 5454 */ 5455 public TestScriptTeardownActionComponent() { 5456 super(); 5457 } 5458 5459 /** 5460 * @return {@link #operation} (An operation would involve a REST request to a server.) 5461 */ 5462 public TestScriptSetupActionOperationComponent getOperation() { 5463 if (this.operation == null) 5464 if (Configuration.errorOnAutoCreate()) 5465 throw new Error("Attempt to auto-create TestScriptTeardownActionComponent.operation"); 5466 else if (Configuration.doAutoCreate()) 5467 this.operation = new TestScriptSetupActionOperationComponent(); // cc 5468 return this.operation; 5469 } 5470 5471 public boolean hasOperation() { 5472 return this.operation != null && !this.operation.isEmpty(); 5473 } 5474 5475 /** 5476 * @param value {@link #operation} (An operation would involve a REST request to a server.) 5477 */ 5478 public TestScriptTeardownActionComponent setOperation(TestScriptSetupActionOperationComponent value) { 5479 this.operation = value; 5480 return this; 5481 } 5482 5483 protected void listChildren(List<Property> childrenList) { 5484 super.listChildren(childrenList); 5485 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)); 5486 } 5487 5488 @Override 5489 public void setProperty(String name, Base value) throws FHIRException { 5490 if (name.equals("operation")) 5491 this.operation = (TestScriptSetupActionOperationComponent) value; // TestScriptSetupActionOperationComponent 5492 else 5493 super.setProperty(name, value); 5494 } 5495 5496 @Override 5497 public Base addChild(String name) throws FHIRException { 5498 if (name.equals("operation")) { 5499 this.operation = new TestScriptSetupActionOperationComponent(); 5500 return this.operation; 5501 } 5502 else 5503 return super.addChild(name); 5504 } 5505 5506 public TestScriptTeardownActionComponent copy() { 5507 TestScriptTeardownActionComponent dst = new TestScriptTeardownActionComponent(); 5508 copyValues(dst); 5509 dst.operation = operation == null ? null : operation.copy(); 5510 return dst; 5511 } 5512 5513 @Override 5514 public boolean equalsDeep(Base other) { 5515 if (!super.equalsDeep(other)) 5516 return false; 5517 if (!(other instanceof TestScriptTeardownActionComponent)) 5518 return false; 5519 TestScriptTeardownActionComponent o = (TestScriptTeardownActionComponent) other; 5520 return compareDeep(operation, o.operation, true); 5521 } 5522 5523 @Override 5524 public boolean equalsShallow(Base other) { 5525 if (!super.equalsShallow(other)) 5526 return false; 5527 if (!(other instanceof TestScriptTeardownActionComponent)) 5528 return false; 5529 TestScriptTeardownActionComponent o = (TestScriptTeardownActionComponent) other; 5530 return true; 5531 } 5532 5533 public boolean isEmpty() { 5534 return super.isEmpty() && (operation == null || operation.isEmpty()); 5535 } 5536 5537 public String fhirType() { 5538 return "TestScript.teardown.action"; 5539 5540 } 5541 5542 } 5543 5544 /** 5545 * 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. 5546 */ 5547 @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) 5548 @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." ) 5549 protected UriType url; 5550 5551 /** 5552 * The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually. 5553 */ 5554 @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 5555 @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." ) 5556 protected StringType version; 5557 5558 /** 5559 * A free text natural language name identifying the TestScript. 5560 */ 5561 @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) 5562 @Description(shortDefinition="Informal name for this TestScript", formalDefinition="A free text natural language name identifying the TestScript." ) 5563 protected StringType name; 5564 5565 /** 5566 * The status of the TestScript. 5567 */ 5568 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) 5569 @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the TestScript." ) 5570 protected Enumeration<ConformanceResourceStatus> status; 5571 5572 /** 5573 * Identifier for the TestScript assigned for external purposes outside the context of FHIR. 5574 */ 5575 @Child(name = "identifier", type = {Identifier.class}, order=4, min=0, max=1, modifier=false, summary=true) 5576 @Description(shortDefinition="External identifier", formalDefinition="Identifier for the TestScript assigned for external purposes outside the context of FHIR." ) 5577 protected Identifier identifier; 5578 5579 /** 5580 * This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 5581 */ 5582 @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=true) 5583 @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." ) 5584 protected BooleanType experimental; 5585 5586 /** 5587 * The name of the individual or organization that published the Test Script. 5588 */ 5589 @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 5590 @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the Test Script." ) 5591 protected StringType publisher; 5592 5593 /** 5594 * Contacts to assist a user in finding and communicating with the publisher. 5595 */ 5596 @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5597 @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) 5598 protected List<TestScriptContactComponent> contact; 5599 5600 /** 5601 * 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. 5602 */ 5603 @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=true) 5604 @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." ) 5605 protected DateTimeType date; 5606 5607 /** 5608 * A free text natural language description of the TestScript and its use. 5609 */ 5610 @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=true) 5611 @Description(shortDefinition="Natural language description of the TestScript", formalDefinition="A free text natural language description of the TestScript and its use." ) 5612 protected StringType description; 5613 5614 /** 5615 * 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. 5616 */ 5617 @Child(name = "useContext", type = {CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 5618 @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." ) 5619 protected List<CodeableConcept> useContext; 5620 5621 /** 5622 * Explains why this Test Script is needed and why it's been constrained as it has. 5623 */ 5624 @Child(name = "requirements", type = {StringType.class}, order=11, min=0, max=1, modifier=false, summary=false) 5625 @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." ) 5626 protected StringType requirements; 5627 5628 /** 5629 * 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. 5630 */ 5631 @Child(name = "copyright", type = {StringType.class}, order=12, min=0, max=1, modifier=false, summary=false) 5632 @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." ) 5633 protected StringType copyright; 5634 5635 /** 5636 * The required capability must exist and are assumed to function correctly on the FHIR server being tested. 5637 */ 5638 @Child(name = "metadata", type = {}, order=13, min=0, max=1, modifier=false, summary=false) 5639 @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." ) 5640 protected TestScriptMetadataComponent metadata; 5641 5642 /** 5643 * If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. 5644 */ 5645 @Child(name = "multiserver", type = {BooleanType.class}, order=14, min=0, max=1, modifier=false, summary=false) 5646 @Description(shortDefinition="Whether or not the tests apply to more than one FHIR server", formalDefinition="If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified." ) 5647 protected BooleanType multiserver; 5648 5649 /** 5650 * Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute. 5651 */ 5652 @Child(name = "fixture", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5653 @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." ) 5654 protected List<TestScriptFixtureComponent> fixture; 5655 5656 /** 5657 * Reference to the profile to be used for validation. 5658 */ 5659 @Child(name = "profile", type = {}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5660 @Description(shortDefinition="Reference of the validation profile", formalDefinition="Reference to the profile to be used for validation." ) 5661 protected List<Reference> profile; 5662 /** 5663 * The actual objects that are the target of the reference (Reference to the profile to be used for validation.) 5664 */ 5665 protected List<Resource> profileTarget; 5666 5667 5668 /** 5669 * Variable is set based either on element value in response body or on header field value in the response headers. 5670 */ 5671 @Child(name = "variable", type = {}, order=17, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5672 @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." ) 5673 protected List<TestScriptVariableComponent> variable; 5674 5675 /** 5676 * A series of required setup operations before tests are executed. 5677 */ 5678 @Child(name = "setup", type = {}, order=18, min=0, max=1, modifier=false, summary=false) 5679 @Description(shortDefinition="A series of required setup operations before tests are executed", formalDefinition="A series of required setup operations before tests are executed." ) 5680 protected TestScriptSetupComponent setup; 5681 5682 /** 5683 * A test in this script. 5684 */ 5685 @Child(name = "test", type = {}, order=19, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 5686 @Description(shortDefinition="A test in this script", formalDefinition="A test in this script." ) 5687 protected List<TestScriptTestComponent> test; 5688 5689 /** 5690 * A series of operations required to clean up after the all the tests are executed (successfully or otherwise). 5691 */ 5692 @Child(name = "teardown", type = {}, order=20, min=0, max=1, modifier=false, summary=false) 5693 @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)." ) 5694 protected TestScriptTeardownComponent teardown; 5695 5696 private static final long serialVersionUID = -2049162917L; 5697 5698 /* 5699 * Constructor 5700 */ 5701 public TestScript() { 5702 super(); 5703 } 5704 5705 /* 5706 * Constructor 5707 */ 5708 public TestScript(UriType url, StringType name, Enumeration<ConformanceResourceStatus> status) { 5709 super(); 5710 this.url = url; 5711 this.name = name; 5712 this.status = status; 5713 } 5714 5715 /** 5716 * @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 5717 */ 5718 public UriType getUrlElement() { 5719 if (this.url == null) 5720 if (Configuration.errorOnAutoCreate()) 5721 throw new Error("Attempt to auto-create TestScript.url"); 5722 else if (Configuration.doAutoCreate()) 5723 this.url = new UriType(); // bb 5724 return this.url; 5725 } 5726 5727 public boolean hasUrlElement() { 5728 return this.url != null && !this.url.isEmpty(); 5729 } 5730 5731 public boolean hasUrl() { 5732 return this.url != null && !this.url.isEmpty(); 5733 } 5734 5735 /** 5736 * @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 5737 */ 5738 public TestScript setUrlElement(UriType value) { 5739 this.url = value; 5740 return this; 5741 } 5742 5743 /** 5744 * @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. 5745 */ 5746 public String getUrl() { 5747 return this.url == null ? null : this.url.getValue(); 5748 } 5749 5750 /** 5751 * @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. 5752 */ 5753 public TestScript setUrl(String value) { 5754 if (this.url == null) 5755 this.url = new UriType(); 5756 this.url.setValue(value); 5757 return this; 5758 } 5759 5760 /** 5761 * @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 5762 */ 5763 public StringType getVersionElement() { 5764 if (this.version == null) 5765 if (Configuration.errorOnAutoCreate()) 5766 throw new Error("Attempt to auto-create TestScript.version"); 5767 else if (Configuration.doAutoCreate()) 5768 this.version = new StringType(); // bb 5769 return this.version; 5770 } 5771 5772 public boolean hasVersionElement() { 5773 return this.version != null && !this.version.isEmpty(); 5774 } 5775 5776 public boolean hasVersion() { 5777 return this.version != null && !this.version.isEmpty(); 5778 } 5779 5780 /** 5781 * @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 5782 */ 5783 public TestScript setVersionElement(StringType value) { 5784 this.version = value; 5785 return this; 5786 } 5787 5788 /** 5789 * @return The identifier that is used to identify this version of the TestScript. This is an arbitrary value managed by the TestScript author manually. 5790 */ 5791 public String getVersion() { 5792 return this.version == null ? null : this.version.getValue(); 5793 } 5794 5795 /** 5796 * @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. 5797 */ 5798 public TestScript setVersion(String value) { 5799 if (Utilities.noString(value)) 5800 this.version = null; 5801 else { 5802 if (this.version == null) 5803 this.version = new StringType(); 5804 this.version.setValue(value); 5805 } 5806 return this; 5807 } 5808 5809 /** 5810 * @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 5811 */ 5812 public StringType getNameElement() { 5813 if (this.name == null) 5814 if (Configuration.errorOnAutoCreate()) 5815 throw new Error("Attempt to auto-create TestScript.name"); 5816 else if (Configuration.doAutoCreate()) 5817 this.name = new StringType(); // bb 5818 return this.name; 5819 } 5820 5821 public boolean hasNameElement() { 5822 return this.name != null && !this.name.isEmpty(); 5823 } 5824 5825 public boolean hasName() { 5826 return this.name != null && !this.name.isEmpty(); 5827 } 5828 5829 /** 5830 * @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 5831 */ 5832 public TestScript setNameElement(StringType value) { 5833 this.name = value; 5834 return this; 5835 } 5836 5837 /** 5838 * @return A free text natural language name identifying the TestScript. 5839 */ 5840 public String getName() { 5841 return this.name == null ? null : this.name.getValue(); 5842 } 5843 5844 /** 5845 * @param value A free text natural language name identifying the TestScript. 5846 */ 5847 public TestScript setName(String value) { 5848 if (this.name == null) 5849 this.name = new StringType(); 5850 this.name.setValue(value); 5851 return this; 5852 } 5853 5854 /** 5855 * @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 5856 */ 5857 public Enumeration<ConformanceResourceStatus> getStatusElement() { 5858 if (this.status == null) 5859 if (Configuration.errorOnAutoCreate()) 5860 throw new Error("Attempt to auto-create TestScript.status"); 5861 else if (Configuration.doAutoCreate()) 5862 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb 5863 return this.status; 5864 } 5865 5866 public boolean hasStatusElement() { 5867 return this.status != null && !this.status.isEmpty(); 5868 } 5869 5870 public boolean hasStatus() { 5871 return this.status != null && !this.status.isEmpty(); 5872 } 5873 5874 /** 5875 * @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 5876 */ 5877 public TestScript setStatusElement(Enumeration<ConformanceResourceStatus> value) { 5878 this.status = value; 5879 return this; 5880 } 5881 5882 /** 5883 * @return The status of the TestScript. 5884 */ 5885 public ConformanceResourceStatus getStatus() { 5886 return this.status == null ? null : this.status.getValue(); 5887 } 5888 5889 /** 5890 * @param value The status of the TestScript. 5891 */ 5892 public TestScript setStatus(ConformanceResourceStatus value) { 5893 if (this.status == null) 5894 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); 5895 this.status.setValue(value); 5896 return this; 5897 } 5898 5899 /** 5900 * @return {@link #identifier} (Identifier for the TestScript assigned for external purposes outside the context of FHIR.) 5901 */ 5902 public Identifier getIdentifier() { 5903 if (this.identifier == null) 5904 if (Configuration.errorOnAutoCreate()) 5905 throw new Error("Attempt to auto-create TestScript.identifier"); 5906 else if (Configuration.doAutoCreate()) 5907 this.identifier = new Identifier(); // cc 5908 return this.identifier; 5909 } 5910 5911 public boolean hasIdentifier() { 5912 return this.identifier != null && !this.identifier.isEmpty(); 5913 } 5914 5915 /** 5916 * @param value {@link #identifier} (Identifier for the TestScript assigned for external purposes outside the context of FHIR.) 5917 */ 5918 public TestScript setIdentifier(Identifier value) { 5919 this.identifier = value; 5920 return this; 5921 } 5922 5923 /** 5924 * @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 5925 */ 5926 public BooleanType getExperimentalElement() { 5927 if (this.experimental == null) 5928 if (Configuration.errorOnAutoCreate()) 5929 throw new Error("Attempt to auto-create TestScript.experimental"); 5930 else if (Configuration.doAutoCreate()) 5931 this.experimental = new BooleanType(); // bb 5932 return this.experimental; 5933 } 5934 5935 public boolean hasExperimentalElement() { 5936 return this.experimental != null && !this.experimental.isEmpty(); 5937 } 5938 5939 public boolean hasExperimental() { 5940 return this.experimental != null && !this.experimental.isEmpty(); 5941 } 5942 5943 /** 5944 * @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 5945 */ 5946 public TestScript setExperimentalElement(BooleanType value) { 5947 this.experimental = value; 5948 return this; 5949 } 5950 5951 /** 5952 * @return This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 5953 */ 5954 public boolean getExperimental() { 5955 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 5956 } 5957 5958 /** 5959 * @param value This TestScript was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 5960 */ 5961 public TestScript setExperimental(boolean value) { 5962 if (this.experimental == null) 5963 this.experimental = new BooleanType(); 5964 this.experimental.setValue(value); 5965 return this; 5966 } 5967 5968 /** 5969 * @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 5970 */ 5971 public StringType getPublisherElement() { 5972 if (this.publisher == null) 5973 if (Configuration.errorOnAutoCreate()) 5974 throw new Error("Attempt to auto-create TestScript.publisher"); 5975 else if (Configuration.doAutoCreate()) 5976 this.publisher = new StringType(); // bb 5977 return this.publisher; 5978 } 5979 5980 public boolean hasPublisherElement() { 5981 return this.publisher != null && !this.publisher.isEmpty(); 5982 } 5983 5984 public boolean hasPublisher() { 5985 return this.publisher != null && !this.publisher.isEmpty(); 5986 } 5987 5988 /** 5989 * @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 5990 */ 5991 public TestScript setPublisherElement(StringType value) { 5992 this.publisher = value; 5993 return this; 5994 } 5995 5996 /** 5997 * @return The name of the individual or organization that published the Test Script. 5998 */ 5999 public String getPublisher() { 6000 return this.publisher == null ? null : this.publisher.getValue(); 6001 } 6002 6003 /** 6004 * @param value The name of the individual or organization that published the Test Script. 6005 */ 6006 public TestScript setPublisher(String value) { 6007 if (Utilities.noString(value)) 6008 this.publisher = null; 6009 else { 6010 if (this.publisher == null) 6011 this.publisher = new StringType(); 6012 this.publisher.setValue(value); 6013 } 6014 return this; 6015 } 6016 6017 /** 6018 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 6019 */ 6020 public List<TestScriptContactComponent> getContact() { 6021 if (this.contact == null) 6022 this.contact = new ArrayList<TestScriptContactComponent>(); 6023 return this.contact; 6024 } 6025 6026 public boolean hasContact() { 6027 if (this.contact == null) 6028 return false; 6029 for (TestScriptContactComponent item : this.contact) 6030 if (!item.isEmpty()) 6031 return true; 6032 return false; 6033 } 6034 6035 /** 6036 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 6037 */ 6038 // syntactic sugar 6039 public TestScriptContactComponent addContact() { //3 6040 TestScriptContactComponent t = new TestScriptContactComponent(); 6041 if (this.contact == null) 6042 this.contact = new ArrayList<TestScriptContactComponent>(); 6043 this.contact.add(t); 6044 return t; 6045 } 6046 6047 // syntactic sugar 6048 public TestScript addContact(TestScriptContactComponent t) { //3 6049 if (t == null) 6050 return this; 6051 if (this.contact == null) 6052 this.contact = new ArrayList<TestScriptContactComponent>(); 6053 this.contact.add(t); 6054 return this; 6055 } 6056 6057 /** 6058 * @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 6059 */ 6060 public DateTimeType getDateElement() { 6061 if (this.date == null) 6062 if (Configuration.errorOnAutoCreate()) 6063 throw new Error("Attempt to auto-create TestScript.date"); 6064 else if (Configuration.doAutoCreate()) 6065 this.date = new DateTimeType(); // bb 6066 return this.date; 6067 } 6068 6069 public boolean hasDateElement() { 6070 return this.date != null && !this.date.isEmpty(); 6071 } 6072 6073 public boolean hasDate() { 6074 return this.date != null && !this.date.isEmpty(); 6075 } 6076 6077 /** 6078 * @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 6079 */ 6080 public TestScript setDateElement(DateTimeType value) { 6081 this.date = value; 6082 return this; 6083 } 6084 6085 /** 6086 * @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. 6087 */ 6088 public Date getDate() { 6089 return this.date == null ? null : this.date.getValue(); 6090 } 6091 6092 /** 6093 * @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. 6094 */ 6095 public TestScript setDate(Date value) { 6096 if (value == null) 6097 this.date = null; 6098 else { 6099 if (this.date == null) 6100 this.date = new DateTimeType(); 6101 this.date.setValue(value); 6102 } 6103 return this; 6104 } 6105 6106 /** 6107 * @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 6108 */ 6109 public StringType getDescriptionElement() { 6110 if (this.description == null) 6111 if (Configuration.errorOnAutoCreate()) 6112 throw new Error("Attempt to auto-create TestScript.description"); 6113 else if (Configuration.doAutoCreate()) 6114 this.description = new StringType(); // bb 6115 return this.description; 6116 } 6117 6118 public boolean hasDescriptionElement() { 6119 return this.description != null && !this.description.isEmpty(); 6120 } 6121 6122 public boolean hasDescription() { 6123 return this.description != null && !this.description.isEmpty(); 6124 } 6125 6126 /** 6127 * @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 6128 */ 6129 public TestScript setDescriptionElement(StringType value) { 6130 this.description = value; 6131 return this; 6132 } 6133 6134 /** 6135 * @return A free text natural language description of the TestScript and its use. 6136 */ 6137 public String getDescription() { 6138 return this.description == null ? null : this.description.getValue(); 6139 } 6140 6141 /** 6142 * @param value A free text natural language description of the TestScript and its use. 6143 */ 6144 public TestScript setDescription(String value) { 6145 if (Utilities.noString(value)) 6146 this.description = null; 6147 else { 6148 if (this.description == null) 6149 this.description = new StringType(); 6150 this.description.setValue(value); 6151 } 6152 return this; 6153 } 6154 6155 /** 6156 * @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.) 6157 */ 6158 public List<CodeableConcept> getUseContext() { 6159 if (this.useContext == null) 6160 this.useContext = new ArrayList<CodeableConcept>(); 6161 return this.useContext; 6162 } 6163 6164 public boolean hasUseContext() { 6165 if (this.useContext == null) 6166 return false; 6167 for (CodeableConcept item : this.useContext) 6168 if (!item.isEmpty()) 6169 return true; 6170 return false; 6171 } 6172 6173 /** 6174 * @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.) 6175 */ 6176 // syntactic sugar 6177 public CodeableConcept addUseContext() { //3 6178 CodeableConcept t = new CodeableConcept(); 6179 if (this.useContext == null) 6180 this.useContext = new ArrayList<CodeableConcept>(); 6181 this.useContext.add(t); 6182 return t; 6183 } 6184 6185 // syntactic sugar 6186 public TestScript addUseContext(CodeableConcept t) { //3 6187 if (t == null) 6188 return this; 6189 if (this.useContext == null) 6190 this.useContext = new ArrayList<CodeableConcept>(); 6191 this.useContext.add(t); 6192 return this; 6193 } 6194 6195 /** 6196 * @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 6197 */ 6198 public StringType getRequirementsElement() { 6199 if (this.requirements == null) 6200 if (Configuration.errorOnAutoCreate()) 6201 throw new Error("Attempt to auto-create TestScript.requirements"); 6202 else if (Configuration.doAutoCreate()) 6203 this.requirements = new StringType(); // bb 6204 return this.requirements; 6205 } 6206 6207 public boolean hasRequirementsElement() { 6208 return this.requirements != null && !this.requirements.isEmpty(); 6209 } 6210 6211 public boolean hasRequirements() { 6212 return this.requirements != null && !this.requirements.isEmpty(); 6213 } 6214 6215 /** 6216 * @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 6217 */ 6218 public TestScript setRequirementsElement(StringType value) { 6219 this.requirements = value; 6220 return this; 6221 } 6222 6223 /** 6224 * @return Explains why this Test Script is needed and why it's been constrained as it has. 6225 */ 6226 public String getRequirements() { 6227 return this.requirements == null ? null : this.requirements.getValue(); 6228 } 6229 6230 /** 6231 * @param value Explains why this Test Script is needed and why it's been constrained as it has. 6232 */ 6233 public TestScript setRequirements(String value) { 6234 if (Utilities.noString(value)) 6235 this.requirements = null; 6236 else { 6237 if (this.requirements == null) 6238 this.requirements = new StringType(); 6239 this.requirements.setValue(value); 6240 } 6241 return this; 6242 } 6243 6244 /** 6245 * @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 6246 */ 6247 public StringType getCopyrightElement() { 6248 if (this.copyright == null) 6249 if (Configuration.errorOnAutoCreate()) 6250 throw new Error("Attempt to auto-create TestScript.copyright"); 6251 else if (Configuration.doAutoCreate()) 6252 this.copyright = new StringType(); // bb 6253 return this.copyright; 6254 } 6255 6256 public boolean hasCopyrightElement() { 6257 return this.copyright != null && !this.copyright.isEmpty(); 6258 } 6259 6260 public boolean hasCopyright() { 6261 return this.copyright != null && !this.copyright.isEmpty(); 6262 } 6263 6264 /** 6265 * @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 6266 */ 6267 public TestScript setCopyrightElement(StringType value) { 6268 this.copyright = value; 6269 return this; 6270 } 6271 6272 /** 6273 * @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. 6274 */ 6275 public String getCopyright() { 6276 return this.copyright == null ? null : this.copyright.getValue(); 6277 } 6278 6279 /** 6280 * @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. 6281 */ 6282 public TestScript setCopyright(String value) { 6283 if (Utilities.noString(value)) 6284 this.copyright = null; 6285 else { 6286 if (this.copyright == null) 6287 this.copyright = new StringType(); 6288 this.copyright.setValue(value); 6289 } 6290 return this; 6291 } 6292 6293 /** 6294 * @return {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 6295 */ 6296 public TestScriptMetadataComponent getMetadata() { 6297 if (this.metadata == null) 6298 if (Configuration.errorOnAutoCreate()) 6299 throw new Error("Attempt to auto-create TestScript.metadata"); 6300 else if (Configuration.doAutoCreate()) 6301 this.metadata = new TestScriptMetadataComponent(); // cc 6302 return this.metadata; 6303 } 6304 6305 public boolean hasMetadata() { 6306 return this.metadata != null && !this.metadata.isEmpty(); 6307 } 6308 6309 /** 6310 * @param value {@link #metadata} (The required capability must exist and are assumed to function correctly on the FHIR server being tested.) 6311 */ 6312 public TestScript setMetadata(TestScriptMetadataComponent value) { 6313 this.metadata = value; 6314 return this; 6315 } 6316 6317 /** 6318 * @return {@link #multiserver} (If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.). This is the underlying object with id, value and extensions. The accessor "getMultiserver" gives direct access to the value 6319 */ 6320 public BooleanType getMultiserverElement() { 6321 if (this.multiserver == null) 6322 if (Configuration.errorOnAutoCreate()) 6323 throw new Error("Attempt to auto-create TestScript.multiserver"); 6324 else if (Configuration.doAutoCreate()) 6325 this.multiserver = new BooleanType(); // bb 6326 return this.multiserver; 6327 } 6328 6329 public boolean hasMultiserverElement() { 6330 return this.multiserver != null && !this.multiserver.isEmpty(); 6331 } 6332 6333 public boolean hasMultiserver() { 6334 return this.multiserver != null && !this.multiserver.isEmpty(); 6335 } 6336 6337 /** 6338 * @param value {@link #multiserver} (If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.). This is the underlying object with id, value and extensions. The accessor "getMultiserver" gives direct access to the value 6339 */ 6340 public TestScript setMultiserverElement(BooleanType value) { 6341 this.multiserver = value; 6342 return this; 6343 } 6344 6345 /** 6346 * @return If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. 6347 */ 6348 public boolean getMultiserver() { 6349 return this.multiserver == null || this.multiserver.isEmpty() ? false : this.multiserver.getValue(); 6350 } 6351 6352 /** 6353 * @param value If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified. 6354 */ 6355 public TestScript setMultiserver(boolean value) { 6356 if (this.multiserver == null) 6357 this.multiserver = new BooleanType(); 6358 this.multiserver.setValue(value); 6359 return this; 6360 } 6361 6362 /** 6363 * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) 6364 */ 6365 public List<TestScriptFixtureComponent> getFixture() { 6366 if (this.fixture == null) 6367 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 6368 return this.fixture; 6369 } 6370 6371 public boolean hasFixture() { 6372 if (this.fixture == null) 6373 return false; 6374 for (TestScriptFixtureComponent item : this.fixture) 6375 if (!item.isEmpty()) 6376 return true; 6377 return false; 6378 } 6379 6380 /** 6381 * @return {@link #fixture} (Fixture in the test script - by reference (uri). All fixtures are required for the test script to execute.) 6382 */ 6383 // syntactic sugar 6384 public TestScriptFixtureComponent addFixture() { //3 6385 TestScriptFixtureComponent t = new TestScriptFixtureComponent(); 6386 if (this.fixture == null) 6387 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 6388 this.fixture.add(t); 6389 return t; 6390 } 6391 6392 // syntactic sugar 6393 public TestScript addFixture(TestScriptFixtureComponent t) { //3 6394 if (t == null) 6395 return this; 6396 if (this.fixture == null) 6397 this.fixture = new ArrayList<TestScriptFixtureComponent>(); 6398 this.fixture.add(t); 6399 return this; 6400 } 6401 6402 /** 6403 * @return {@link #profile} (Reference to the profile to be used for validation.) 6404 */ 6405 public List<Reference> getProfile() { 6406 if (this.profile == null) 6407 this.profile = new ArrayList<Reference>(); 6408 return this.profile; 6409 } 6410 6411 public boolean hasProfile() { 6412 if (this.profile == null) 6413 return false; 6414 for (Reference item : this.profile) 6415 if (!item.isEmpty()) 6416 return true; 6417 return false; 6418 } 6419 6420 /** 6421 * @return {@link #profile} (Reference to the profile to be used for validation.) 6422 */ 6423 // syntactic sugar 6424 public Reference addProfile() { //3 6425 Reference t = new Reference(); 6426 if (this.profile == null) 6427 this.profile = new ArrayList<Reference>(); 6428 this.profile.add(t); 6429 return t; 6430 } 6431 6432 // syntactic sugar 6433 public TestScript addProfile(Reference t) { //3 6434 if (t == null) 6435 return this; 6436 if (this.profile == null) 6437 this.profile = new ArrayList<Reference>(); 6438 this.profile.add(t); 6439 return this; 6440 } 6441 6442 /** 6443 * @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.) 6444 */ 6445 public List<Resource> getProfileTarget() { 6446 if (this.profileTarget == null) 6447 this.profileTarget = new ArrayList<Resource>(); 6448 return this.profileTarget; 6449 } 6450 6451 /** 6452 * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) 6453 */ 6454 public List<TestScriptVariableComponent> getVariable() { 6455 if (this.variable == null) 6456 this.variable = new ArrayList<TestScriptVariableComponent>(); 6457 return this.variable; 6458 } 6459 6460 public boolean hasVariable() { 6461 if (this.variable == null) 6462 return false; 6463 for (TestScriptVariableComponent item : this.variable) 6464 if (!item.isEmpty()) 6465 return true; 6466 return false; 6467 } 6468 6469 /** 6470 * @return {@link #variable} (Variable is set based either on element value in response body or on header field value in the response headers.) 6471 */ 6472 // syntactic sugar 6473 public TestScriptVariableComponent addVariable() { //3 6474 TestScriptVariableComponent t = new TestScriptVariableComponent(); 6475 if (this.variable == null) 6476 this.variable = new ArrayList<TestScriptVariableComponent>(); 6477 this.variable.add(t); 6478 return t; 6479 } 6480 6481 // syntactic sugar 6482 public TestScript addVariable(TestScriptVariableComponent t) { //3 6483 if (t == null) 6484 return this; 6485 if (this.variable == null) 6486 this.variable = new ArrayList<TestScriptVariableComponent>(); 6487 this.variable.add(t); 6488 return this; 6489 } 6490 6491 /** 6492 * @return {@link #setup} (A series of required setup operations before tests are executed.) 6493 */ 6494 public TestScriptSetupComponent getSetup() { 6495 if (this.setup == null) 6496 if (Configuration.errorOnAutoCreate()) 6497 throw new Error("Attempt to auto-create TestScript.setup"); 6498 else if (Configuration.doAutoCreate()) 6499 this.setup = new TestScriptSetupComponent(); // cc 6500 return this.setup; 6501 } 6502 6503 public boolean hasSetup() { 6504 return this.setup != null && !this.setup.isEmpty(); 6505 } 6506 6507 /** 6508 * @param value {@link #setup} (A series of required setup operations before tests are executed.) 6509 */ 6510 public TestScript setSetup(TestScriptSetupComponent value) { 6511 this.setup = value; 6512 return this; 6513 } 6514 6515 /** 6516 * @return {@link #test} (A test in this script.) 6517 */ 6518 public List<TestScriptTestComponent> getTest() { 6519 if (this.test == null) 6520 this.test = new ArrayList<TestScriptTestComponent>(); 6521 return this.test; 6522 } 6523 6524 public boolean hasTest() { 6525 if (this.test == null) 6526 return false; 6527 for (TestScriptTestComponent item : this.test) 6528 if (!item.isEmpty()) 6529 return true; 6530 return false; 6531 } 6532 6533 /** 6534 * @return {@link #test} (A test in this script.) 6535 */ 6536 // syntactic sugar 6537 public TestScriptTestComponent addTest() { //3 6538 TestScriptTestComponent t = new TestScriptTestComponent(); 6539 if (this.test == null) 6540 this.test = new ArrayList<TestScriptTestComponent>(); 6541 this.test.add(t); 6542 return t; 6543 } 6544 6545 // syntactic sugar 6546 public TestScript addTest(TestScriptTestComponent t) { //3 6547 if (t == null) 6548 return this; 6549 if (this.test == null) 6550 this.test = new ArrayList<TestScriptTestComponent>(); 6551 this.test.add(t); 6552 return this; 6553 } 6554 6555 /** 6556 * @return {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 6557 */ 6558 public TestScriptTeardownComponent getTeardown() { 6559 if (this.teardown == null) 6560 if (Configuration.errorOnAutoCreate()) 6561 throw new Error("Attempt to auto-create TestScript.teardown"); 6562 else if (Configuration.doAutoCreate()) 6563 this.teardown = new TestScriptTeardownComponent(); // cc 6564 return this.teardown; 6565 } 6566 6567 public boolean hasTeardown() { 6568 return this.teardown != null && !this.teardown.isEmpty(); 6569 } 6570 6571 /** 6572 * @param value {@link #teardown} (A series of operations required to clean up after the all the tests are executed (successfully or otherwise).) 6573 */ 6574 public TestScript setTeardown(TestScriptTeardownComponent value) { 6575 this.teardown = value; 6576 return this; 6577 } 6578 6579 protected void listChildren(List<Property> childrenList) { 6580 super.listChildren(childrenList); 6581 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)); 6582 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)); 6583 childrenList.add(new Property("name", "string", "A free text natural language name identifying the TestScript.", 0, java.lang.Integer.MAX_VALUE, name)); 6584 childrenList.add(new Property("status", "code", "The status of the TestScript.", 0, java.lang.Integer.MAX_VALUE, status)); 6585 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)); 6586 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)); 6587 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)); 6588 childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 6589 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)); 6590 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)); 6591 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)); 6592 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)); 6593 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)); 6594 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)); 6595 childrenList.add(new Property("multiserver", "boolean", "If the tests apply to more than one FHIR server (e.g. cross-server interoperability tests) then multiserver=true. Defaults to false if value is unspecified.", 0, java.lang.Integer.MAX_VALUE, multiserver)); 6596 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)); 6597 childrenList.add(new Property("profile", "Reference(Any)", "Reference to the profile to be used for validation.", 0, java.lang.Integer.MAX_VALUE, profile)); 6598 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)); 6599 childrenList.add(new Property("setup", "", "A series of required setup operations before tests are executed.", 0, java.lang.Integer.MAX_VALUE, setup)); 6600 childrenList.add(new Property("test", "", "A test in this script.", 0, java.lang.Integer.MAX_VALUE, test)); 6601 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)); 6602 } 6603 6604 @Override 6605 public void setProperty(String name, Base value) throws FHIRException { 6606 if (name.equals("url")) 6607 this.url = castToUri(value); // UriType 6608 else if (name.equals("version")) 6609 this.version = castToString(value); // StringType 6610 else if (name.equals("name")) 6611 this.name = castToString(value); // StringType 6612 else if (name.equals("status")) 6613 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 6614 else if (name.equals("identifier")) 6615 this.identifier = castToIdentifier(value); // Identifier 6616 else if (name.equals("experimental")) 6617 this.experimental = castToBoolean(value); // BooleanType 6618 else if (name.equals("publisher")) 6619 this.publisher = castToString(value); // StringType 6620 else if (name.equals("contact")) 6621 this.getContact().add((TestScriptContactComponent) value); 6622 else if (name.equals("date")) 6623 this.date = castToDateTime(value); // DateTimeType 6624 else if (name.equals("description")) 6625 this.description = castToString(value); // StringType 6626 else if (name.equals("useContext")) 6627 this.getUseContext().add(castToCodeableConcept(value)); 6628 else if (name.equals("requirements")) 6629 this.requirements = castToString(value); // StringType 6630 else if (name.equals("copyright")) 6631 this.copyright = castToString(value); // StringType 6632 else if (name.equals("metadata")) 6633 this.metadata = (TestScriptMetadataComponent) value; // TestScriptMetadataComponent 6634 else if (name.equals("multiserver")) 6635 this.multiserver = castToBoolean(value); // BooleanType 6636 else if (name.equals("fixture")) 6637 this.getFixture().add((TestScriptFixtureComponent) value); 6638 else if (name.equals("profile")) 6639 this.getProfile().add(castToReference(value)); 6640 else if (name.equals("variable")) 6641 this.getVariable().add((TestScriptVariableComponent) value); 6642 else if (name.equals("setup")) 6643 this.setup = (TestScriptSetupComponent) value; // TestScriptSetupComponent 6644 else if (name.equals("test")) 6645 this.getTest().add((TestScriptTestComponent) value); 6646 else if (name.equals("teardown")) 6647 this.teardown = (TestScriptTeardownComponent) value; // TestScriptTeardownComponent 6648 else 6649 super.setProperty(name, value); 6650 } 6651 6652 @Override 6653 public Base addChild(String name) throws FHIRException { 6654 if (name.equals("url")) { 6655 throw new FHIRException("Cannot call addChild on a primitive type TestScript.url"); 6656 } 6657 else if (name.equals("version")) { 6658 throw new FHIRException("Cannot call addChild on a primitive type TestScript.version"); 6659 } 6660 else if (name.equals("name")) { 6661 throw new FHIRException("Cannot call addChild on a primitive type TestScript.name"); 6662 } 6663 else if (name.equals("status")) { 6664 throw new FHIRException("Cannot call addChild on a primitive type TestScript.status"); 6665 } 6666 else if (name.equals("identifier")) { 6667 this.identifier = new Identifier(); 6668 return this.identifier; 6669 } 6670 else if (name.equals("experimental")) { 6671 throw new FHIRException("Cannot call addChild on a primitive type TestScript.experimental"); 6672 } 6673 else if (name.equals("publisher")) { 6674 throw new FHIRException("Cannot call addChild on a primitive type TestScript.publisher"); 6675 } 6676 else if (name.equals("contact")) { 6677 return addContact(); 6678 } 6679 else if (name.equals("date")) { 6680 throw new FHIRException("Cannot call addChild on a primitive type TestScript.date"); 6681 } 6682 else if (name.equals("description")) { 6683 throw new FHIRException("Cannot call addChild on a primitive type TestScript.description"); 6684 } 6685 else if (name.equals("useContext")) { 6686 return addUseContext(); 6687 } 6688 else if (name.equals("requirements")) { 6689 throw new FHIRException("Cannot call addChild on a primitive type TestScript.requirements"); 6690 } 6691 else if (name.equals("copyright")) { 6692 throw new FHIRException("Cannot call addChild on a primitive type TestScript.copyright"); 6693 } 6694 else if (name.equals("metadata")) { 6695 this.metadata = new TestScriptMetadataComponent(); 6696 return this.metadata; 6697 } 6698 else if (name.equals("multiserver")) { 6699 throw new FHIRException("Cannot call addChild on a primitive type TestScript.multiserver"); 6700 } 6701 else if (name.equals("fixture")) { 6702 return addFixture(); 6703 } 6704 else if (name.equals("profile")) { 6705 return addProfile(); 6706 } 6707 else if (name.equals("variable")) { 6708 return addVariable(); 6709 } 6710 else if (name.equals("setup")) { 6711 this.setup = new TestScriptSetupComponent(); 6712 return this.setup; 6713 } 6714 else if (name.equals("test")) { 6715 return addTest(); 6716 } 6717 else if (name.equals("teardown")) { 6718 this.teardown = new TestScriptTeardownComponent(); 6719 return this.teardown; 6720 } 6721 else 6722 return super.addChild(name); 6723 } 6724 6725 public String fhirType() { 6726 return "TestScript"; 6727 6728 } 6729 6730 public TestScript copy() { 6731 TestScript dst = new TestScript(); 6732 copyValues(dst); 6733 dst.url = url == null ? null : url.copy(); 6734 dst.version = version == null ? null : version.copy(); 6735 dst.name = name == null ? null : name.copy(); 6736 dst.status = status == null ? null : status.copy(); 6737 dst.identifier = identifier == null ? null : identifier.copy(); 6738 dst.experimental = experimental == null ? null : experimental.copy(); 6739 dst.publisher = publisher == null ? null : publisher.copy(); 6740 if (contact != null) { 6741 dst.contact = new ArrayList<TestScriptContactComponent>(); 6742 for (TestScriptContactComponent i : contact) 6743 dst.contact.add(i.copy()); 6744 }; 6745 dst.date = date == null ? null : date.copy(); 6746 dst.description = description == null ? null : description.copy(); 6747 if (useContext != null) { 6748 dst.useContext = new ArrayList<CodeableConcept>(); 6749 for (CodeableConcept i : useContext) 6750 dst.useContext.add(i.copy()); 6751 }; 6752 dst.requirements = requirements == null ? null : requirements.copy(); 6753 dst.copyright = copyright == null ? null : copyright.copy(); 6754 dst.metadata = metadata == null ? null : metadata.copy(); 6755 dst.multiserver = multiserver == null ? null : multiserver.copy(); 6756 if (fixture != null) { 6757 dst.fixture = new ArrayList<TestScriptFixtureComponent>(); 6758 for (TestScriptFixtureComponent i : fixture) 6759 dst.fixture.add(i.copy()); 6760 }; 6761 if (profile != null) { 6762 dst.profile = new ArrayList<Reference>(); 6763 for (Reference i : profile) 6764 dst.profile.add(i.copy()); 6765 }; 6766 if (variable != null) { 6767 dst.variable = new ArrayList<TestScriptVariableComponent>(); 6768 for (TestScriptVariableComponent i : variable) 6769 dst.variable.add(i.copy()); 6770 }; 6771 dst.setup = setup == null ? null : setup.copy(); 6772 if (test != null) { 6773 dst.test = new ArrayList<TestScriptTestComponent>(); 6774 for (TestScriptTestComponent i : test) 6775 dst.test.add(i.copy()); 6776 }; 6777 dst.teardown = teardown == null ? null : teardown.copy(); 6778 return dst; 6779 } 6780 6781 protected TestScript typedCopy() { 6782 return copy(); 6783 } 6784 6785 @Override 6786 public boolean equalsDeep(Base other) { 6787 if (!super.equalsDeep(other)) 6788 return false; 6789 if (!(other instanceof TestScript)) 6790 return false; 6791 TestScript o = (TestScript) other; 6792 return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) 6793 && compareDeep(status, o.status, true) && compareDeep(identifier, o.identifier, true) && compareDeep(experimental, o.experimental, true) 6794 && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) 6795 && compareDeep(description, o.description, true) && compareDeep(useContext, o.useContext, true) 6796 && compareDeep(requirements, o.requirements, true) && compareDeep(copyright, o.copyright, true) 6797 && compareDeep(metadata, o.metadata, true) && compareDeep(multiserver, o.multiserver, true) && compareDeep(fixture, o.fixture, true) 6798 && compareDeep(profile, o.profile, true) && compareDeep(variable, o.variable, true) && compareDeep(setup, o.setup, true) 6799 && compareDeep(test, o.test, true) && compareDeep(teardown, o.teardown, true); 6800 } 6801 6802 @Override 6803 public boolean equalsShallow(Base other) { 6804 if (!super.equalsShallow(other)) 6805 return false; 6806 if (!(other instanceof TestScript)) 6807 return false; 6808 TestScript o = (TestScript) other; 6809 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) 6810 && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) 6811 && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(requirements, o.requirements, true) 6812 && compareValues(copyright, o.copyright, true) && compareValues(multiserver, o.multiserver, true); 6813 } 6814 6815 public boolean isEmpty() { 6816 return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) 6817 && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (identifier == null || identifier.isEmpty()) 6818 && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) 6819 && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) 6820 && (useContext == null || useContext.isEmpty()) && (requirements == null || requirements.isEmpty()) 6821 && (copyright == null || copyright.isEmpty()) && (metadata == null || metadata.isEmpty()) 6822 && (multiserver == null || multiserver.isEmpty()) && (fixture == null || fixture.isEmpty()) 6823 && (profile == null || profile.isEmpty()) && (variable == null || variable.isEmpty()) && (setup == null || setup.isEmpty()) 6824 && (test == null || test.isEmpty()) && (teardown == null || teardown.isEmpty()); 6825 } 6826 6827 @Override 6828 public ResourceType getResourceType() { 6829 return ResourceType.TestScript; 6830 } 6831 6832 @SearchParamDefinition(name="identifier", path="TestScript.identifier", description="External identifier", type="token" ) 6833 public static final String SP_IDENTIFIER = "identifier"; 6834 @SearchParamDefinition(name="testscript-test-capability", path="TestScript.test.metadata.capability.description", description="TestScript test required and validated capability", type="string" ) 6835 public static final String SP_TESTSCRIPTTESTCAPABILITY = "testscript-test-capability"; 6836 @SearchParamDefinition(name="testscript-setup-capability", path="TestScript.setup.metadata.capability.description", description="TestScript setup required and validated capability", type="string" ) 6837 public static final String SP_TESTSCRIPTSETUPCAPABILITY = "testscript-setup-capability"; 6838 @SearchParamDefinition(name="name", path="TestScript.name", description="Informal name for this TestScript", type="string" ) 6839 public static final String SP_NAME = "name"; 6840 @SearchParamDefinition(name="description", path="TestScript.description", description="Natural language description of the TestScript", type="string" ) 6841 public static final String SP_DESCRIPTION = "description"; 6842 @SearchParamDefinition(name="testscript-capability", path="TestScript.metadata.capability.description", description="TestScript required and validated capability", type="string" ) 6843 public static final String SP_TESTSCRIPTCAPABILITY = "testscript-capability"; 6844 @SearchParamDefinition(name="url", path="TestScript.url", description="Absolute URL used to reference this TestScript", type="uri" ) 6845 public static final String SP_URL = "url"; 6846 6847} 6848