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