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