001package org.hl7.fhir.instance.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Wed, Jul 13, 2016 05:32+1000 for FHIR v1.0.2 033import java.util.*; 034 035import org.hl7.fhir.exceptions.FHIRException; 036import org.hl7.fhir.instance.model.Enumerations.*; 037import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 038import org.hl7.fhir.utilities.Utilities; 039 040import ca.uhn.fhir.model.api.annotation.*; 041/** 042 * A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). 043 */ 044@ResourceDef(name="OperationDefinition", profile="http://hl7.org/fhir/Profile/OperationDefinition") 045public class OperationDefinition extends DomainResource { 046 047 public enum OperationKind { 048 /** 049 * This operation is invoked as an operation. 050 */ 051 OPERATION, 052 /** 053 * This operation is a named query, invoked using the search mechanism. 054 */ 055 QUERY, 056 /** 057 * added to help the parsers 058 */ 059 NULL; 060 public static OperationKind fromCode(String codeString) throws FHIRException { 061 if (codeString == null || "".equals(codeString)) 062 return null; 063 if ("operation".equals(codeString)) 064 return OPERATION; 065 if ("query".equals(codeString)) 066 return QUERY; 067 throw new FHIRException("Unknown OperationKind code '"+codeString+"'"); 068 } 069 public String toCode() { 070 switch (this) { 071 case OPERATION: return "operation"; 072 case QUERY: return "query"; 073 default: return "?"; 074 } 075 } 076 public String getSystem() { 077 switch (this) { 078 case OPERATION: return "http://hl7.org/fhir/operation-kind"; 079 case QUERY: return "http://hl7.org/fhir/operation-kind"; 080 default: return "?"; 081 } 082 } 083 public String getDefinition() { 084 switch (this) { 085 case OPERATION: return "This operation is invoked as an operation."; 086 case QUERY: return "This operation is a named query, invoked using the search mechanism."; 087 default: return "?"; 088 } 089 } 090 public String getDisplay() { 091 switch (this) { 092 case OPERATION: return "Operation"; 093 case QUERY: return "Query"; 094 default: return "?"; 095 } 096 } 097 } 098 099 public static class OperationKindEnumFactory implements EnumFactory<OperationKind> { 100 public OperationKind fromCode(String codeString) throws IllegalArgumentException { 101 if (codeString == null || "".equals(codeString)) 102 if (codeString == null || "".equals(codeString)) 103 return null; 104 if ("operation".equals(codeString)) 105 return OperationKind.OPERATION; 106 if ("query".equals(codeString)) 107 return OperationKind.QUERY; 108 throw new IllegalArgumentException("Unknown OperationKind code '"+codeString+"'"); 109 } 110 public Enumeration<OperationKind> fromType(Base code) throws FHIRException { 111 if (code == null || code.isEmpty()) 112 return null; 113 String codeString = ((PrimitiveType) code).asStringValue(); 114 if (codeString == null || "".equals(codeString)) 115 return null; 116 if ("operation".equals(codeString)) 117 return new Enumeration<OperationKind>(this, OperationKind.OPERATION); 118 if ("query".equals(codeString)) 119 return new Enumeration<OperationKind>(this, OperationKind.QUERY); 120 throw new FHIRException("Unknown OperationKind code '"+codeString+"'"); 121 } 122 public String toCode(OperationKind code) { 123 if (code == OperationKind.OPERATION) 124 return "operation"; 125 if (code == OperationKind.QUERY) 126 return "query"; 127 return "?"; 128 } 129 } 130 131 public enum OperationParameterUse { 132 /** 133 * This is an input parameter. 134 */ 135 IN, 136 /** 137 * This is an output parameter. 138 */ 139 OUT, 140 /** 141 * added to help the parsers 142 */ 143 NULL; 144 public static OperationParameterUse fromCode(String codeString) throws FHIRException { 145 if (codeString == null || "".equals(codeString)) 146 return null; 147 if ("in".equals(codeString)) 148 return IN; 149 if ("out".equals(codeString)) 150 return OUT; 151 throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'"); 152 } 153 public String toCode() { 154 switch (this) { 155 case IN: return "in"; 156 case OUT: return "out"; 157 default: return "?"; 158 } 159 } 160 public String getSystem() { 161 switch (this) { 162 case IN: return "http://hl7.org/fhir/operation-parameter-use"; 163 case OUT: return "http://hl7.org/fhir/operation-parameter-use"; 164 default: return "?"; 165 } 166 } 167 public String getDefinition() { 168 switch (this) { 169 case IN: return "This is an input parameter."; 170 case OUT: return "This is an output parameter."; 171 default: return "?"; 172 } 173 } 174 public String getDisplay() { 175 switch (this) { 176 case IN: return "In"; 177 case OUT: return "Out"; 178 default: return "?"; 179 } 180 } 181 } 182 183 public static class OperationParameterUseEnumFactory implements EnumFactory<OperationParameterUse> { 184 public OperationParameterUse fromCode(String codeString) throws IllegalArgumentException { 185 if (codeString == null || "".equals(codeString)) 186 if (codeString == null || "".equals(codeString)) 187 return null; 188 if ("in".equals(codeString)) 189 return OperationParameterUse.IN; 190 if ("out".equals(codeString)) 191 return OperationParameterUse.OUT; 192 throw new IllegalArgumentException("Unknown OperationParameterUse code '"+codeString+"'"); 193 } 194 public Enumeration<OperationParameterUse> fromType(Base code) throws FHIRException { 195 if (code == null || code.isEmpty()) 196 return null; 197 String codeString = ((PrimitiveType) code).asStringValue(); 198 if (codeString == null || "".equals(codeString)) 199 return null; 200 if ("in".equals(codeString)) 201 return new Enumeration<OperationParameterUse>(this, OperationParameterUse.IN); 202 if ("out".equals(codeString)) 203 return new Enumeration<OperationParameterUse>(this, OperationParameterUse.OUT); 204 throw new FHIRException("Unknown OperationParameterUse code '"+codeString+"'"); 205 } 206 public String toCode(OperationParameterUse code) { 207 if (code == OperationParameterUse.IN) 208 return "in"; 209 if (code == OperationParameterUse.OUT) 210 return "out"; 211 return "?"; 212 } 213 } 214 215 @Block() 216 public static class OperationDefinitionContactComponent extends BackboneElement implements IBaseBackboneElement { 217 /** 218 * The name of an individual to contact regarding the operation definition. 219 */ 220 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 221 @Description(shortDefinition="Name of a individual to contact", formalDefinition="The name of an individual to contact regarding the operation definition." ) 222 protected StringType name; 223 224 /** 225 * Contact details for individual (if a name was provided) or the publisher. 226 */ 227 @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 228 @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) 229 protected List<ContactPoint> telecom; 230 231 private static final long serialVersionUID = -1179697803L; 232 233 /* 234 * Constructor 235 */ 236 public OperationDefinitionContactComponent() { 237 super(); 238 } 239 240 /** 241 * @return {@link #name} (The name of an individual to contact regarding the operation definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 242 */ 243 public StringType getNameElement() { 244 if (this.name == null) 245 if (Configuration.errorOnAutoCreate()) 246 throw new Error("Attempt to auto-create OperationDefinitionContactComponent.name"); 247 else if (Configuration.doAutoCreate()) 248 this.name = new StringType(); // bb 249 return this.name; 250 } 251 252 public boolean hasNameElement() { 253 return this.name != null && !this.name.isEmpty(); 254 } 255 256 public boolean hasName() { 257 return this.name != null && !this.name.isEmpty(); 258 } 259 260 /** 261 * @param value {@link #name} (The name of an individual to contact regarding the operation definition.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 262 */ 263 public OperationDefinitionContactComponent setNameElement(StringType value) { 264 this.name = value; 265 return this; 266 } 267 268 /** 269 * @return The name of an individual to contact regarding the operation definition. 270 */ 271 public String getName() { 272 return this.name == null ? null : this.name.getValue(); 273 } 274 275 /** 276 * @param value The name of an individual to contact regarding the operation definition. 277 */ 278 public OperationDefinitionContactComponent setName(String value) { 279 if (Utilities.noString(value)) 280 this.name = null; 281 else { 282 if (this.name == null) 283 this.name = new StringType(); 284 this.name.setValue(value); 285 } 286 return this; 287 } 288 289 /** 290 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 291 */ 292 public List<ContactPoint> getTelecom() { 293 if (this.telecom == null) 294 this.telecom = new ArrayList<ContactPoint>(); 295 return this.telecom; 296 } 297 298 public boolean hasTelecom() { 299 if (this.telecom == null) 300 return false; 301 for (ContactPoint item : this.telecom) 302 if (!item.isEmpty()) 303 return true; 304 return false; 305 } 306 307 /** 308 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 309 */ 310 // syntactic sugar 311 public ContactPoint addTelecom() { //3 312 ContactPoint t = new ContactPoint(); 313 if (this.telecom == null) 314 this.telecom = new ArrayList<ContactPoint>(); 315 this.telecom.add(t); 316 return t; 317 } 318 319 // syntactic sugar 320 public OperationDefinitionContactComponent addTelecom(ContactPoint t) { //3 321 if (t == null) 322 return this; 323 if (this.telecom == null) 324 this.telecom = new ArrayList<ContactPoint>(); 325 this.telecom.add(t); 326 return this; 327 } 328 329 protected void listChildren(List<Property> childrenList) { 330 super.listChildren(childrenList); 331 childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the operation definition.", 0, java.lang.Integer.MAX_VALUE, name)); 332 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)); 333 } 334 335 @Override 336 public void setProperty(String name, Base value) throws FHIRException { 337 if (name.equals("name")) 338 this.name = castToString(value); // StringType 339 else if (name.equals("telecom")) 340 this.getTelecom().add(castToContactPoint(value)); 341 else 342 super.setProperty(name, value); 343 } 344 345 @Override 346 public Base addChild(String name) throws FHIRException { 347 if (name.equals("name")) { 348 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name"); 349 } 350 else if (name.equals("telecom")) { 351 return addTelecom(); 352 } 353 else 354 return super.addChild(name); 355 } 356 357 public OperationDefinitionContactComponent copy() { 358 OperationDefinitionContactComponent dst = new OperationDefinitionContactComponent(); 359 copyValues(dst); 360 dst.name = name == null ? null : name.copy(); 361 if (telecom != null) { 362 dst.telecom = new ArrayList<ContactPoint>(); 363 for (ContactPoint i : telecom) 364 dst.telecom.add(i.copy()); 365 }; 366 return dst; 367 } 368 369 @Override 370 public boolean equalsDeep(Base other) { 371 if (!super.equalsDeep(other)) 372 return false; 373 if (!(other instanceof OperationDefinitionContactComponent)) 374 return false; 375 OperationDefinitionContactComponent o = (OperationDefinitionContactComponent) other; 376 return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); 377 } 378 379 @Override 380 public boolean equalsShallow(Base other) { 381 if (!super.equalsShallow(other)) 382 return false; 383 if (!(other instanceof OperationDefinitionContactComponent)) 384 return false; 385 OperationDefinitionContactComponent o = (OperationDefinitionContactComponent) other; 386 return compareValues(name, o.name, true); 387 } 388 389 public boolean isEmpty() { 390 return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) 391 ; 392 } 393 394 public String fhirType() { 395 return "OperationDefinition.contact"; 396 397 } 398 399 } 400 401 @Block() 402 public static class OperationDefinitionParameterComponent extends BackboneElement implements IBaseBackboneElement { 403 /** 404 * The name of used to identify the parameter. 405 */ 406 @Child(name = "name", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 407 @Description(shortDefinition="Name in Parameters.parameter.name or in URL", formalDefinition="The name of used to identify the parameter." ) 408 protected CodeType name; 409 410 /** 411 * Whether this is an input or an output parameter. 412 */ 413 @Child(name = "use", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false) 414 @Description(shortDefinition="in | out", formalDefinition="Whether this is an input or an output parameter." ) 415 protected Enumeration<OperationParameterUse> use; 416 417 /** 418 * The minimum number of times this parameter SHALL appear in the request or response. 419 */ 420 @Child(name = "min", type = {IntegerType.class}, order=3, min=1, max=1, modifier=false, summary=false) 421 @Description(shortDefinition="Minimum Cardinality", formalDefinition="The minimum number of times this parameter SHALL appear in the request or response." ) 422 protected IntegerType min; 423 424 /** 425 * The maximum number of times this element is permitted to appear in the request or response. 426 */ 427 @Child(name = "max", type = {StringType.class}, order=4, min=1, max=1, modifier=false, summary=false) 428 @Description(shortDefinition="Maximum Cardinality (a number or *)", formalDefinition="The maximum number of times this element is permitted to appear in the request or response." ) 429 protected StringType max; 430 431 /** 432 * Describes the meaning or use of this parameter. 433 */ 434 @Child(name = "documentation", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=false) 435 @Description(shortDefinition="Description of meaning/use", formalDefinition="Describes the meaning or use of this parameter." ) 436 protected StringType documentation; 437 438 /** 439 * The type for this parameter. 440 */ 441 @Child(name = "type", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 442 @Description(shortDefinition="What type this parameter has", formalDefinition="The type for this parameter." ) 443 protected CodeType type; 444 445 /** 446 * A profile the specifies the rules that this parameter must conform to. 447 */ 448 @Child(name = "profile", type = {StructureDefinition.class}, order=7, min=0, max=1, modifier=false, summary=false) 449 @Description(shortDefinition="Profile on the type", formalDefinition="A profile the specifies the rules that this parameter must conform to." ) 450 protected Reference profile; 451 452 /** 453 * The actual object that is the target of the reference (A profile the specifies the rules that this parameter must conform to.) 454 */ 455 protected StructureDefinition profileTarget; 456 457 /** 458 * Binds to a value set if this parameter is coded (code, Coding, CodeableConcept). 459 */ 460 @Child(name = "binding", type = {}, order=8, min=0, max=1, modifier=false, summary=false) 461 @Description(shortDefinition="ValueSet details if this is coded", formalDefinition="Binds to a value set if this parameter is coded (code, Coding, CodeableConcept)." ) 462 protected OperationDefinitionParameterBindingComponent binding; 463 464 /** 465 * The parts of a Tuple Parameter. 466 */ 467 @Child(name = "part", type = {OperationDefinitionParameterComponent.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 468 @Description(shortDefinition="Parts of a Tuple Parameter", formalDefinition="The parts of a Tuple Parameter." ) 469 protected List<OperationDefinitionParameterComponent> part; 470 471 private static final long serialVersionUID = -1514145741L; 472 473 /* 474 * Constructor 475 */ 476 public OperationDefinitionParameterComponent() { 477 super(); 478 } 479 480 /* 481 * Constructor 482 */ 483 public OperationDefinitionParameterComponent(CodeType name, Enumeration<OperationParameterUse> use, IntegerType min, StringType max) { 484 super(); 485 this.name = name; 486 this.use = use; 487 this.min = min; 488 this.max = max; 489 } 490 491 /** 492 * @return {@link #name} (The name of used to identify the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 493 */ 494 public CodeType getNameElement() { 495 if (this.name == null) 496 if (Configuration.errorOnAutoCreate()) 497 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.name"); 498 else if (Configuration.doAutoCreate()) 499 this.name = new CodeType(); // bb 500 return this.name; 501 } 502 503 public boolean hasNameElement() { 504 return this.name != null && !this.name.isEmpty(); 505 } 506 507 public boolean hasName() { 508 return this.name != null && !this.name.isEmpty(); 509 } 510 511 /** 512 * @param value {@link #name} (The name of used to identify the parameter.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 513 */ 514 public OperationDefinitionParameterComponent setNameElement(CodeType value) { 515 this.name = value; 516 return this; 517 } 518 519 /** 520 * @return The name of used to identify the parameter. 521 */ 522 public String getName() { 523 return this.name == null ? null : this.name.getValue(); 524 } 525 526 /** 527 * @param value The name of used to identify the parameter. 528 */ 529 public OperationDefinitionParameterComponent setName(String value) { 530 if (this.name == null) 531 this.name = new CodeType(); 532 this.name.setValue(value); 533 return this; 534 } 535 536 /** 537 * @return {@link #use} (Whether this is an input or an output parameter.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value 538 */ 539 public Enumeration<OperationParameterUse> getUseElement() { 540 if (this.use == null) 541 if (Configuration.errorOnAutoCreate()) 542 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.use"); 543 else if (Configuration.doAutoCreate()) 544 this.use = new Enumeration<OperationParameterUse>(new OperationParameterUseEnumFactory()); // bb 545 return this.use; 546 } 547 548 public boolean hasUseElement() { 549 return this.use != null && !this.use.isEmpty(); 550 } 551 552 public boolean hasUse() { 553 return this.use != null && !this.use.isEmpty(); 554 } 555 556 /** 557 * @param value {@link #use} (Whether this is an input or an output parameter.). This is the underlying object with id, value and extensions. The accessor "getUse" gives direct access to the value 558 */ 559 public OperationDefinitionParameterComponent setUseElement(Enumeration<OperationParameterUse> value) { 560 this.use = value; 561 return this; 562 } 563 564 /** 565 * @return Whether this is an input or an output parameter. 566 */ 567 public OperationParameterUse getUse() { 568 return this.use == null ? null : this.use.getValue(); 569 } 570 571 /** 572 * @param value Whether this is an input or an output parameter. 573 */ 574 public OperationDefinitionParameterComponent setUse(OperationParameterUse value) { 575 if (this.use == null) 576 this.use = new Enumeration<OperationParameterUse>(new OperationParameterUseEnumFactory()); 577 this.use.setValue(value); 578 return this; 579 } 580 581 /** 582 * @return {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value 583 */ 584 public IntegerType getMinElement() { 585 if (this.min == null) 586 if (Configuration.errorOnAutoCreate()) 587 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.min"); 588 else if (Configuration.doAutoCreate()) 589 this.min = new IntegerType(); // bb 590 return this.min; 591 } 592 593 public boolean hasMinElement() { 594 return this.min != null && !this.min.isEmpty(); 595 } 596 597 public boolean hasMin() { 598 return this.min != null && !this.min.isEmpty(); 599 } 600 601 /** 602 * @param value {@link #min} (The minimum number of times this parameter SHALL appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMin" gives direct access to the value 603 */ 604 public OperationDefinitionParameterComponent setMinElement(IntegerType value) { 605 this.min = value; 606 return this; 607 } 608 609 /** 610 * @return The minimum number of times this parameter SHALL appear in the request or response. 611 */ 612 public int getMin() { 613 return this.min == null || this.min.isEmpty() ? 0 : this.min.getValue(); 614 } 615 616 /** 617 * @param value The minimum number of times this parameter SHALL appear in the request or response. 618 */ 619 public OperationDefinitionParameterComponent setMin(int value) { 620 if (this.min == null) 621 this.min = new IntegerType(); 622 this.min.setValue(value); 623 return this; 624 } 625 626 /** 627 * @return {@link #max} (The maximum number of times this element is permitted to appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value 628 */ 629 public StringType getMaxElement() { 630 if (this.max == null) 631 if (Configuration.errorOnAutoCreate()) 632 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.max"); 633 else if (Configuration.doAutoCreate()) 634 this.max = new StringType(); // bb 635 return this.max; 636 } 637 638 public boolean hasMaxElement() { 639 return this.max != null && !this.max.isEmpty(); 640 } 641 642 public boolean hasMax() { 643 return this.max != null && !this.max.isEmpty(); 644 } 645 646 /** 647 * @param value {@link #max} (The maximum number of times this element is permitted to appear in the request or response.). This is the underlying object with id, value and extensions. The accessor "getMax" gives direct access to the value 648 */ 649 public OperationDefinitionParameterComponent setMaxElement(StringType value) { 650 this.max = value; 651 return this; 652 } 653 654 /** 655 * @return The maximum number of times this element is permitted to appear in the request or response. 656 */ 657 public String getMax() { 658 return this.max == null ? null : this.max.getValue(); 659 } 660 661 /** 662 * @param value The maximum number of times this element is permitted to appear in the request or response. 663 */ 664 public OperationDefinitionParameterComponent setMax(String value) { 665 if (this.max == null) 666 this.max = new StringType(); 667 this.max.setValue(value); 668 return this; 669 } 670 671 /** 672 * @return {@link #documentation} (Describes the meaning or use of this parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 673 */ 674 public StringType getDocumentationElement() { 675 if (this.documentation == null) 676 if (Configuration.errorOnAutoCreate()) 677 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.documentation"); 678 else if (Configuration.doAutoCreate()) 679 this.documentation = new StringType(); // bb 680 return this.documentation; 681 } 682 683 public boolean hasDocumentationElement() { 684 return this.documentation != null && !this.documentation.isEmpty(); 685 } 686 687 public boolean hasDocumentation() { 688 return this.documentation != null && !this.documentation.isEmpty(); 689 } 690 691 /** 692 * @param value {@link #documentation} (Describes the meaning or use of this parameter.). This is the underlying object with id, value and extensions. The accessor "getDocumentation" gives direct access to the value 693 */ 694 public OperationDefinitionParameterComponent setDocumentationElement(StringType value) { 695 this.documentation = value; 696 return this; 697 } 698 699 /** 700 * @return Describes the meaning or use of this parameter. 701 */ 702 public String getDocumentation() { 703 return this.documentation == null ? null : this.documentation.getValue(); 704 } 705 706 /** 707 * @param value Describes the meaning or use of this parameter. 708 */ 709 public OperationDefinitionParameterComponent setDocumentation(String value) { 710 if (Utilities.noString(value)) 711 this.documentation = null; 712 else { 713 if (this.documentation == null) 714 this.documentation = new StringType(); 715 this.documentation.setValue(value); 716 } 717 return this; 718 } 719 720 /** 721 * @return {@link #type} (The type for this parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 722 */ 723 public CodeType getTypeElement() { 724 if (this.type == null) 725 if (Configuration.errorOnAutoCreate()) 726 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.type"); 727 else if (Configuration.doAutoCreate()) 728 this.type = new CodeType(); // bb 729 return this.type; 730 } 731 732 public boolean hasTypeElement() { 733 return this.type != null && !this.type.isEmpty(); 734 } 735 736 public boolean hasType() { 737 return this.type != null && !this.type.isEmpty(); 738 } 739 740 /** 741 * @param value {@link #type} (The type for this parameter.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 742 */ 743 public OperationDefinitionParameterComponent setTypeElement(CodeType value) { 744 this.type = value; 745 return this; 746 } 747 748 /** 749 * @return The type for this parameter. 750 */ 751 public String getType() { 752 return this.type == null ? null : this.type.getValue(); 753 } 754 755 /** 756 * @param value The type for this parameter. 757 */ 758 public OperationDefinitionParameterComponent setType(String value) { 759 if (Utilities.noString(value)) 760 this.type = null; 761 else { 762 if (this.type == null) 763 this.type = new CodeType(); 764 this.type.setValue(value); 765 } 766 return this; 767 } 768 769 /** 770 * @return {@link #profile} (A profile the specifies the rules that this parameter must conform to.) 771 */ 772 public Reference getProfile() { 773 if (this.profile == null) 774 if (Configuration.errorOnAutoCreate()) 775 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.profile"); 776 else if (Configuration.doAutoCreate()) 777 this.profile = new Reference(); // cc 778 return this.profile; 779 } 780 781 public boolean hasProfile() { 782 return this.profile != null && !this.profile.isEmpty(); 783 } 784 785 /** 786 * @param value {@link #profile} (A profile the specifies the rules that this parameter must conform to.) 787 */ 788 public OperationDefinitionParameterComponent setProfile(Reference value) { 789 this.profile = value; 790 return this; 791 } 792 793 /** 794 * @return {@link #profile} 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. (A profile the specifies the rules that this parameter must conform to.) 795 */ 796 public StructureDefinition getProfileTarget() { 797 if (this.profileTarget == null) 798 if (Configuration.errorOnAutoCreate()) 799 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.profile"); 800 else if (Configuration.doAutoCreate()) 801 this.profileTarget = new StructureDefinition(); // aa 802 return this.profileTarget; 803 } 804 805 /** 806 * @param value {@link #profile} 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. (A profile the specifies the rules that this parameter must conform to.) 807 */ 808 public OperationDefinitionParameterComponent setProfileTarget(StructureDefinition value) { 809 this.profileTarget = value; 810 return this; 811 } 812 813 /** 814 * @return {@link #binding} (Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).) 815 */ 816 public OperationDefinitionParameterBindingComponent getBinding() { 817 if (this.binding == null) 818 if (Configuration.errorOnAutoCreate()) 819 throw new Error("Attempt to auto-create OperationDefinitionParameterComponent.binding"); 820 else if (Configuration.doAutoCreate()) 821 this.binding = new OperationDefinitionParameterBindingComponent(); // cc 822 return this.binding; 823 } 824 825 public boolean hasBinding() { 826 return this.binding != null && !this.binding.isEmpty(); 827 } 828 829 /** 830 * @param value {@link #binding} (Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).) 831 */ 832 public OperationDefinitionParameterComponent setBinding(OperationDefinitionParameterBindingComponent value) { 833 this.binding = value; 834 return this; 835 } 836 837 /** 838 * @return {@link #part} (The parts of a Tuple Parameter.) 839 */ 840 public List<OperationDefinitionParameterComponent> getPart() { 841 if (this.part == null) 842 this.part = new ArrayList<OperationDefinitionParameterComponent>(); 843 return this.part; 844 } 845 846 public boolean hasPart() { 847 if (this.part == null) 848 return false; 849 for (OperationDefinitionParameterComponent item : this.part) 850 if (!item.isEmpty()) 851 return true; 852 return false; 853 } 854 855 /** 856 * @return {@link #part} (The parts of a Tuple Parameter.) 857 */ 858 // syntactic sugar 859 public OperationDefinitionParameterComponent addPart() { //3 860 OperationDefinitionParameterComponent t = new OperationDefinitionParameterComponent(); 861 if (this.part == null) 862 this.part = new ArrayList<OperationDefinitionParameterComponent>(); 863 this.part.add(t); 864 return t; 865 } 866 867 // syntactic sugar 868 public OperationDefinitionParameterComponent addPart(OperationDefinitionParameterComponent t) { //3 869 if (t == null) 870 return this; 871 if (this.part == null) 872 this.part = new ArrayList<OperationDefinitionParameterComponent>(); 873 this.part.add(t); 874 return this; 875 } 876 877 protected void listChildren(List<Property> childrenList) { 878 super.listChildren(childrenList); 879 childrenList.add(new Property("name", "code", "The name of used to identify the parameter.", 0, java.lang.Integer.MAX_VALUE, name)); 880 childrenList.add(new Property("use", "code", "Whether this is an input or an output parameter.", 0, java.lang.Integer.MAX_VALUE, use)); 881 childrenList.add(new Property("min", "integer", "The minimum number of times this parameter SHALL appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, min)); 882 childrenList.add(new Property("max", "string", "The maximum number of times this element is permitted to appear in the request or response.", 0, java.lang.Integer.MAX_VALUE, max)); 883 childrenList.add(new Property("documentation", "string", "Describes the meaning or use of this parameter.", 0, java.lang.Integer.MAX_VALUE, documentation)); 884 childrenList.add(new Property("type", "code", "The type for this parameter.", 0, java.lang.Integer.MAX_VALUE, type)); 885 childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A profile the specifies the rules that this parameter must conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); 886 childrenList.add(new Property("binding", "", "Binds to a value set if this parameter is coded (code, Coding, CodeableConcept).", 0, java.lang.Integer.MAX_VALUE, binding)); 887 childrenList.add(new Property("part", "@OperationDefinition.parameter", "The parts of a Tuple Parameter.", 0, java.lang.Integer.MAX_VALUE, part)); 888 } 889 890 @Override 891 public void setProperty(String name, Base value) throws FHIRException { 892 if (name.equals("name")) 893 this.name = castToCode(value); // CodeType 894 else if (name.equals("use")) 895 this.use = new OperationParameterUseEnumFactory().fromType(value); // Enumeration<OperationParameterUse> 896 else if (name.equals("min")) 897 this.min = castToInteger(value); // IntegerType 898 else if (name.equals("max")) 899 this.max = castToString(value); // StringType 900 else if (name.equals("documentation")) 901 this.documentation = castToString(value); // StringType 902 else if (name.equals("type")) 903 this.type = castToCode(value); // CodeType 904 else if (name.equals("profile")) 905 this.profile = castToReference(value); // Reference 906 else if (name.equals("binding")) 907 this.binding = (OperationDefinitionParameterBindingComponent) value; // OperationDefinitionParameterBindingComponent 908 else if (name.equals("part")) 909 this.getPart().add((OperationDefinitionParameterComponent) value); 910 else 911 super.setProperty(name, value); 912 } 913 914 @Override 915 public Base addChild(String name) throws FHIRException { 916 if (name.equals("name")) { 917 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name"); 918 } 919 else if (name.equals("use")) { 920 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.use"); 921 } 922 else if (name.equals("min")) { 923 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.min"); 924 } 925 else if (name.equals("max")) { 926 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.max"); 927 } 928 else if (name.equals("documentation")) { 929 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.documentation"); 930 } 931 else if (name.equals("type")) { 932 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.type"); 933 } 934 else if (name.equals("profile")) { 935 this.profile = new Reference(); 936 return this.profile; 937 } 938 else if (name.equals("binding")) { 939 this.binding = new OperationDefinitionParameterBindingComponent(); 940 return this.binding; 941 } 942 else if (name.equals("part")) { 943 return addPart(); 944 } 945 else 946 return super.addChild(name); 947 } 948 949 public OperationDefinitionParameterComponent copy() { 950 OperationDefinitionParameterComponent dst = new OperationDefinitionParameterComponent(); 951 copyValues(dst); 952 dst.name = name == null ? null : name.copy(); 953 dst.use = use == null ? null : use.copy(); 954 dst.min = min == null ? null : min.copy(); 955 dst.max = max == null ? null : max.copy(); 956 dst.documentation = documentation == null ? null : documentation.copy(); 957 dst.type = type == null ? null : type.copy(); 958 dst.profile = profile == null ? null : profile.copy(); 959 dst.binding = binding == null ? null : binding.copy(); 960 if (part != null) { 961 dst.part = new ArrayList<OperationDefinitionParameterComponent>(); 962 for (OperationDefinitionParameterComponent i : part) 963 dst.part.add(i.copy()); 964 }; 965 return dst; 966 } 967 968 @Override 969 public boolean equalsDeep(Base other) { 970 if (!super.equalsDeep(other)) 971 return false; 972 if (!(other instanceof OperationDefinitionParameterComponent)) 973 return false; 974 OperationDefinitionParameterComponent o = (OperationDefinitionParameterComponent) other; 975 return compareDeep(name, o.name, true) && compareDeep(use, o.use, true) && compareDeep(min, o.min, true) 976 && compareDeep(max, o.max, true) && compareDeep(documentation, o.documentation, true) && compareDeep(type, o.type, true) 977 && compareDeep(profile, o.profile, true) && compareDeep(binding, o.binding, true) && compareDeep(part, o.part, true) 978 ; 979 } 980 981 @Override 982 public boolean equalsShallow(Base other) { 983 if (!super.equalsShallow(other)) 984 return false; 985 if (!(other instanceof OperationDefinitionParameterComponent)) 986 return false; 987 OperationDefinitionParameterComponent o = (OperationDefinitionParameterComponent) other; 988 return compareValues(name, o.name, true) && compareValues(use, o.use, true) && compareValues(min, o.min, true) 989 && compareValues(max, o.max, true) && compareValues(documentation, o.documentation, true) && compareValues(type, o.type, true) 990 ; 991 } 992 993 public boolean isEmpty() { 994 return super.isEmpty() && (name == null || name.isEmpty()) && (use == null || use.isEmpty()) 995 && (min == null || min.isEmpty()) && (max == null || max.isEmpty()) && (documentation == null || documentation.isEmpty()) 996 && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) && (binding == null || binding.isEmpty()) 997 && (part == null || part.isEmpty()); 998 } 999 1000 public String fhirType() { 1001 return "OperationDefinition.parameter"; 1002 1003 } 1004 1005 } 1006 1007 @Block() 1008 public static class OperationDefinitionParameterBindingComponent extends BackboneElement implements IBaseBackboneElement { 1009 /** 1010 * Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. 1011 */ 1012 @Child(name = "strength", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1013 @Description(shortDefinition="required | extensible | preferred | example", formalDefinition="Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances." ) 1014 protected Enumeration<BindingStrength> strength; 1015 1016 /** 1017 * Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used. 1018 */ 1019 @Child(name = "valueSet", type = {UriType.class, ValueSet.class}, order=2, min=1, max=1, modifier=false, summary=false) 1020 @Description(shortDefinition="Source of value set", formalDefinition="Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used." ) 1021 protected Type valueSet; 1022 1023 private static final long serialVersionUID = 857140521L; 1024 1025 /* 1026 * Constructor 1027 */ 1028 public OperationDefinitionParameterBindingComponent() { 1029 super(); 1030 } 1031 1032 /* 1033 * Constructor 1034 */ 1035 public OperationDefinitionParameterBindingComponent(Enumeration<BindingStrength> strength, Type valueSet) { 1036 super(); 1037 this.strength = strength; 1038 this.valueSet = valueSet; 1039 } 1040 1041 /** 1042 * @return {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value 1043 */ 1044 public Enumeration<BindingStrength> getStrengthElement() { 1045 if (this.strength == null) 1046 if (Configuration.errorOnAutoCreate()) 1047 throw new Error("Attempt to auto-create OperationDefinitionParameterBindingComponent.strength"); 1048 else if (Configuration.doAutoCreate()) 1049 this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory()); // bb 1050 return this.strength; 1051 } 1052 1053 public boolean hasStrengthElement() { 1054 return this.strength != null && !this.strength.isEmpty(); 1055 } 1056 1057 public boolean hasStrength() { 1058 return this.strength != null && !this.strength.isEmpty(); 1059 } 1060 1061 /** 1062 * @param value {@link #strength} (Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.). This is the underlying object with id, value and extensions. The accessor "getStrength" gives direct access to the value 1063 */ 1064 public OperationDefinitionParameterBindingComponent setStrengthElement(Enumeration<BindingStrength> value) { 1065 this.strength = value; 1066 return this; 1067 } 1068 1069 /** 1070 * @return Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. 1071 */ 1072 public BindingStrength getStrength() { 1073 return this.strength == null ? null : this.strength.getValue(); 1074 } 1075 1076 /** 1077 * @param value Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances. 1078 */ 1079 public OperationDefinitionParameterBindingComponent setStrength(BindingStrength value) { 1080 if (this.strength == null) 1081 this.strength = new Enumeration<BindingStrength>(new BindingStrengthEnumFactory()); 1082 this.strength.setValue(value); 1083 return this; 1084 } 1085 1086 /** 1087 * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) 1088 */ 1089 public Type getValueSet() { 1090 return this.valueSet; 1091 } 1092 1093 /** 1094 * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) 1095 */ 1096 public UriType getValueSetUriType() throws FHIRException { 1097 if (!(this.valueSet instanceof UriType)) 1098 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.valueSet.getClass().getName()+" was encountered"); 1099 return (UriType) this.valueSet; 1100 } 1101 1102 public boolean hasValueSetUriType() { 1103 return this.valueSet instanceof UriType; 1104 } 1105 1106 /** 1107 * @return {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) 1108 */ 1109 public Reference getValueSetReference() throws FHIRException { 1110 if (!(this.valueSet instanceof Reference)) 1111 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.valueSet.getClass().getName()+" was encountered"); 1112 return (Reference) this.valueSet; 1113 } 1114 1115 public boolean hasValueSetReference() { 1116 return this.valueSet instanceof Reference; 1117 } 1118 1119 public boolean hasValueSet() { 1120 return this.valueSet != null && !this.valueSet.isEmpty(); 1121 } 1122 1123 /** 1124 * @param value {@link #valueSet} (Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.) 1125 */ 1126 public OperationDefinitionParameterBindingComponent setValueSet(Type value) { 1127 this.valueSet = value; 1128 return this; 1129 } 1130 1131 protected void listChildren(List<Property> childrenList) { 1132 super.listChildren(childrenList); 1133 childrenList.add(new Property("strength", "code", "Indicates the degree of conformance expectations associated with this binding - that is, the degree to which the provided value set must be adhered to in the instances.", 0, java.lang.Integer.MAX_VALUE, strength)); 1134 childrenList.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, java.lang.Integer.MAX_VALUE, valueSet)); 1135 } 1136 1137 @Override 1138 public void setProperty(String name, Base value) throws FHIRException { 1139 if (name.equals("strength")) 1140 this.strength = new BindingStrengthEnumFactory().fromType(value); // Enumeration<BindingStrength> 1141 else if (name.equals("valueSet[x]")) 1142 this.valueSet = (Type) value; // Type 1143 else 1144 super.setProperty(name, value); 1145 } 1146 1147 @Override 1148 public Base addChild(String name) throws FHIRException { 1149 if (name.equals("strength")) { 1150 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.strength"); 1151 } 1152 else if (name.equals("valueSetUri")) { 1153 this.valueSet = new UriType(); 1154 return this.valueSet; 1155 } 1156 else if (name.equals("valueSetReference")) { 1157 this.valueSet = new Reference(); 1158 return this.valueSet; 1159 } 1160 else 1161 return super.addChild(name); 1162 } 1163 1164 public OperationDefinitionParameterBindingComponent copy() { 1165 OperationDefinitionParameterBindingComponent dst = new OperationDefinitionParameterBindingComponent(); 1166 copyValues(dst); 1167 dst.strength = strength == null ? null : strength.copy(); 1168 dst.valueSet = valueSet == null ? null : valueSet.copy(); 1169 return dst; 1170 } 1171 1172 @Override 1173 public boolean equalsDeep(Base other) { 1174 if (!super.equalsDeep(other)) 1175 return false; 1176 if (!(other instanceof OperationDefinitionParameterBindingComponent)) 1177 return false; 1178 OperationDefinitionParameterBindingComponent o = (OperationDefinitionParameterBindingComponent) other; 1179 return compareDeep(strength, o.strength, true) && compareDeep(valueSet, o.valueSet, true); 1180 } 1181 1182 @Override 1183 public boolean equalsShallow(Base other) { 1184 if (!super.equalsShallow(other)) 1185 return false; 1186 if (!(other instanceof OperationDefinitionParameterBindingComponent)) 1187 return false; 1188 OperationDefinitionParameterBindingComponent o = (OperationDefinitionParameterBindingComponent) other; 1189 return compareValues(strength, o.strength, true); 1190 } 1191 1192 public boolean isEmpty() { 1193 return super.isEmpty() && (strength == null || strength.isEmpty()) && (valueSet == null || valueSet.isEmpty()) 1194 ; 1195 } 1196 1197 public String fhirType() { 1198 return "OperationDefinition.parameter.binding"; 1199 1200 } 1201 1202 } 1203 1204 /** 1205 * An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. 1206 */ 1207 @Child(name = "url", type = {UriType.class}, order=0, min=0, max=1, modifier=false, summary=false) 1208 @Description(shortDefinition="Logical URL to reference this operation definition", formalDefinition="An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published." ) 1209 protected UriType url; 1210 1211 /** 1212 * The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. 1213 */ 1214 @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false) 1215 @Description(shortDefinition="Logical id for this version of the operation definition", formalDefinition="The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." ) 1216 protected StringType version; 1217 1218 /** 1219 * A free text natural language name identifying the operation. 1220 */ 1221 @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 1222 @Description(shortDefinition="Informal name for this operation", formalDefinition="A free text natural language name identifying the operation." ) 1223 protected StringType name; 1224 1225 /** 1226 * The status of the profile. 1227 */ 1228 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=false) 1229 @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the profile." ) 1230 protected Enumeration<ConformanceResourceStatus> status; 1231 1232 /** 1233 * Whether this is an operation or a named query. 1234 */ 1235 @Child(name = "kind", type = {CodeType.class}, order=4, min=1, max=1, modifier=false, summary=false) 1236 @Description(shortDefinition="operation | query", formalDefinition="Whether this is an operation or a named query." ) 1237 protected Enumeration<OperationKind> kind; 1238 1239 /** 1240 * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 1241 */ 1242 @Child(name = "experimental", type = {BooleanType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1243 @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) 1244 protected BooleanType experimental; 1245 1246 /** 1247 * The name of the individual or organization that published the operation definition. 1248 */ 1249 @Child(name = "publisher", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 1250 @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the operation definition." ) 1251 protected StringType publisher; 1252 1253 /** 1254 * Contacts to assist a user in finding and communicating with the publisher. 1255 */ 1256 @Child(name = "contact", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1257 @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) 1258 protected List<OperationDefinitionContactComponent> contact; 1259 1260 /** 1261 * The date this version of the operation definition 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 Operation Definition changes. 1262 */ 1263 @Child(name = "date", type = {DateTimeType.class}, order=8, min=0, max=1, modifier=false, summary=false) 1264 @Description(shortDefinition="Date for this version of the operation definition", formalDefinition="The date this version of the operation definition 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 Operation Definition changes." ) 1265 protected DateTimeType date; 1266 1267 /** 1268 * A free text natural language description of the profile and its use. 1269 */ 1270 @Child(name = "description", type = {StringType.class}, order=9, min=0, max=1, modifier=false, summary=false) 1271 @Description(shortDefinition="Natural language description of the operation", formalDefinition="A free text natural language description of the profile and its use." ) 1272 protected StringType description; 1273 1274 /** 1275 * Explains why this operation definition is needed and why it's been constrained as it has. 1276 */ 1277 @Child(name = "requirements", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 1278 @Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this operation definition is needed and why it's been constrained as it has." ) 1279 protected StringType requirements; 1280 1281 /** 1282 * Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. 1283 */ 1284 @Child(name = "idempotent", type = {BooleanType.class}, order=11, min=0, max=1, modifier=false, summary=false) 1285 @Description(shortDefinition="Whether content is unchanged by operation", formalDefinition="Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST." ) 1286 protected BooleanType idempotent; 1287 1288 /** 1289 * The name used to invoke the operation. 1290 */ 1291 @Child(name = "code", type = {CodeType.class}, order=12, min=1, max=1, modifier=false, summary=false) 1292 @Description(shortDefinition="Name used to invoke the operation", formalDefinition="The name used to invoke the operation." ) 1293 protected CodeType code; 1294 1295 /** 1296 * Additional information about how to use this operation or named query. 1297 */ 1298 @Child(name = "notes", type = {StringType.class}, order=13, min=0, max=1, modifier=false, summary=false) 1299 @Description(shortDefinition="Additional information about use", formalDefinition="Additional information about how to use this operation or named query." ) 1300 protected StringType notes; 1301 1302 /** 1303 * Indicates that this operation definition is a constraining profile on the base. 1304 */ 1305 @Child(name = "base", type = {OperationDefinition.class}, order=14, min=0, max=1, modifier=false, summary=false) 1306 @Description(shortDefinition="Marks this as a profile of the base", formalDefinition="Indicates that this operation definition is a constraining profile on the base." ) 1307 protected Reference base; 1308 1309 /** 1310 * The actual object that is the target of the reference (Indicates that this operation definition is a constraining profile on the base.) 1311 */ 1312 protected OperationDefinition baseTarget; 1313 1314 /** 1315 * Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). 1316 */ 1317 @Child(name = "system", type = {BooleanType.class}, order=15, min=1, max=1, modifier=false, summary=false) 1318 @Description(shortDefinition="Invoke at the system level?", formalDefinition="Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context)." ) 1319 protected BooleanType system; 1320 1321 /** 1322 * Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context). 1323 */ 1324 @Child(name = "type", type = {CodeType.class}, order=16, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1325 @Description(shortDefinition="Invoke at resource level for these type", formalDefinition="Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context)." ) 1326 protected List<CodeType> type; 1327 1328 /** 1329 * Indicates whether this operation can be invoked on a particular instance of one of the given types. 1330 */ 1331 @Child(name = "instance", type = {BooleanType.class}, order=17, min=1, max=1, modifier=false, summary=false) 1332 @Description(shortDefinition="Invoke on an instance?", formalDefinition="Indicates whether this operation can be invoked on a particular instance of one of the given types." ) 1333 protected BooleanType instance; 1334 1335 /** 1336 * The parameters for the operation/query. 1337 */ 1338 @Child(name = "parameter", type = {}, order=18, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1339 @Description(shortDefinition="Parameters for the operation/query", formalDefinition="The parameters for the operation/query." ) 1340 protected List<OperationDefinitionParameterComponent> parameter; 1341 1342 private static final long serialVersionUID = 148203484L; 1343 1344 /* 1345 * Constructor 1346 */ 1347 public OperationDefinition() { 1348 super(); 1349 } 1350 1351 /* 1352 * Constructor 1353 */ 1354 public OperationDefinition(StringType name, Enumeration<ConformanceResourceStatus> status, Enumeration<OperationKind> kind, CodeType code, BooleanType system, BooleanType instance) { 1355 super(); 1356 this.name = name; 1357 this.status = status; 1358 this.kind = kind; 1359 this.code = code; 1360 this.system = system; 1361 this.instance = instance; 1362 } 1363 1364 /** 1365 * @return {@link #url} (An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1366 */ 1367 public UriType getUrlElement() { 1368 if (this.url == null) 1369 if (Configuration.errorOnAutoCreate()) 1370 throw new Error("Attempt to auto-create OperationDefinition.url"); 1371 else if (Configuration.doAutoCreate()) 1372 this.url = new UriType(); // bb 1373 return this.url; 1374 } 1375 1376 public boolean hasUrlElement() { 1377 return this.url != null && !this.url.isEmpty(); 1378 } 1379 1380 public boolean hasUrl() { 1381 return this.url != null && !this.url.isEmpty(); 1382 } 1383 1384 /** 1385 * @param value {@link #url} (An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 1386 */ 1387 public OperationDefinition setUrlElement(UriType value) { 1388 this.url = value; 1389 return this; 1390 } 1391 1392 /** 1393 * @return An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. 1394 */ 1395 public String getUrl() { 1396 return this.url == null ? null : this.url.getValue(); 1397 } 1398 1399 /** 1400 * @param value An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published. 1401 */ 1402 public OperationDefinition setUrl(String value) { 1403 if (Utilities.noString(value)) 1404 this.url = null; 1405 else { 1406 if (this.url == null) 1407 this.url = new UriType(); 1408 this.url.setValue(value); 1409 } 1410 return this; 1411 } 1412 1413 /** 1414 * @return {@link #version} (The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 1415 */ 1416 public StringType getVersionElement() { 1417 if (this.version == null) 1418 if (Configuration.errorOnAutoCreate()) 1419 throw new Error("Attempt to auto-create OperationDefinition.version"); 1420 else if (Configuration.doAutoCreate()) 1421 this.version = new StringType(); // bb 1422 return this.version; 1423 } 1424 1425 public boolean hasVersionElement() { 1426 return this.version != null && !this.version.isEmpty(); 1427 } 1428 1429 public boolean hasVersion() { 1430 return this.version != null && !this.version.isEmpty(); 1431 } 1432 1433 /** 1434 * @param value {@link #version} (The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 1435 */ 1436 public OperationDefinition setVersionElement(StringType value) { 1437 this.version = value; 1438 return this; 1439 } 1440 1441 /** 1442 * @return The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. 1443 */ 1444 public String getVersion() { 1445 return this.version == null ? null : this.version.getValue(); 1446 } 1447 1448 /** 1449 * @param value The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp. 1450 */ 1451 public OperationDefinition setVersion(String value) { 1452 if (Utilities.noString(value)) 1453 this.version = null; 1454 else { 1455 if (this.version == null) 1456 this.version = new StringType(); 1457 this.version.setValue(value); 1458 } 1459 return this; 1460 } 1461 1462 /** 1463 * @return {@link #name} (A free text natural language name identifying the operation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1464 */ 1465 public StringType getNameElement() { 1466 if (this.name == null) 1467 if (Configuration.errorOnAutoCreate()) 1468 throw new Error("Attempt to auto-create OperationDefinition.name"); 1469 else if (Configuration.doAutoCreate()) 1470 this.name = new StringType(); // bb 1471 return this.name; 1472 } 1473 1474 public boolean hasNameElement() { 1475 return this.name != null && !this.name.isEmpty(); 1476 } 1477 1478 public boolean hasName() { 1479 return this.name != null && !this.name.isEmpty(); 1480 } 1481 1482 /** 1483 * @param value {@link #name} (A free text natural language name identifying the operation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1484 */ 1485 public OperationDefinition setNameElement(StringType value) { 1486 this.name = value; 1487 return this; 1488 } 1489 1490 /** 1491 * @return A free text natural language name identifying the operation. 1492 */ 1493 public String getName() { 1494 return this.name == null ? null : this.name.getValue(); 1495 } 1496 1497 /** 1498 * @param value A free text natural language name identifying the operation. 1499 */ 1500 public OperationDefinition setName(String value) { 1501 if (this.name == null) 1502 this.name = new StringType(); 1503 this.name.setValue(value); 1504 return this; 1505 } 1506 1507 /** 1508 * @return {@link #status} (The status of the profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1509 */ 1510 public Enumeration<ConformanceResourceStatus> getStatusElement() { 1511 if (this.status == null) 1512 if (Configuration.errorOnAutoCreate()) 1513 throw new Error("Attempt to auto-create OperationDefinition.status"); 1514 else if (Configuration.doAutoCreate()) 1515 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb 1516 return this.status; 1517 } 1518 1519 public boolean hasStatusElement() { 1520 return this.status != null && !this.status.isEmpty(); 1521 } 1522 1523 public boolean hasStatus() { 1524 return this.status != null && !this.status.isEmpty(); 1525 } 1526 1527 /** 1528 * @param value {@link #status} (The status of the profile.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 1529 */ 1530 public OperationDefinition setStatusElement(Enumeration<ConformanceResourceStatus> value) { 1531 this.status = value; 1532 return this; 1533 } 1534 1535 /** 1536 * @return The status of the profile. 1537 */ 1538 public ConformanceResourceStatus getStatus() { 1539 return this.status == null ? null : this.status.getValue(); 1540 } 1541 1542 /** 1543 * @param value The status of the profile. 1544 */ 1545 public OperationDefinition setStatus(ConformanceResourceStatus value) { 1546 if (this.status == null) 1547 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); 1548 this.status.setValue(value); 1549 return this; 1550 } 1551 1552 /** 1553 * @return {@link #kind} (Whether this is an operation or a named query.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 1554 */ 1555 public Enumeration<OperationKind> getKindElement() { 1556 if (this.kind == null) 1557 if (Configuration.errorOnAutoCreate()) 1558 throw new Error("Attempt to auto-create OperationDefinition.kind"); 1559 else if (Configuration.doAutoCreate()) 1560 this.kind = new Enumeration<OperationKind>(new OperationKindEnumFactory()); // bb 1561 return this.kind; 1562 } 1563 1564 public boolean hasKindElement() { 1565 return this.kind != null && !this.kind.isEmpty(); 1566 } 1567 1568 public boolean hasKind() { 1569 return this.kind != null && !this.kind.isEmpty(); 1570 } 1571 1572 /** 1573 * @param value {@link #kind} (Whether this is an operation or a named query.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 1574 */ 1575 public OperationDefinition setKindElement(Enumeration<OperationKind> value) { 1576 this.kind = value; 1577 return this; 1578 } 1579 1580 /** 1581 * @return Whether this is an operation or a named query. 1582 */ 1583 public OperationKind getKind() { 1584 return this.kind == null ? null : this.kind.getValue(); 1585 } 1586 1587 /** 1588 * @param value Whether this is an operation or a named query. 1589 */ 1590 public OperationDefinition setKind(OperationKind value) { 1591 if (this.kind == null) 1592 this.kind = new Enumeration<OperationKind>(new OperationKindEnumFactory()); 1593 this.kind.setValue(value); 1594 return this; 1595 } 1596 1597 /** 1598 * @return {@link #experimental} (This profile 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 1599 */ 1600 public BooleanType getExperimentalElement() { 1601 if (this.experimental == null) 1602 if (Configuration.errorOnAutoCreate()) 1603 throw new Error("Attempt to auto-create OperationDefinition.experimental"); 1604 else if (Configuration.doAutoCreate()) 1605 this.experimental = new BooleanType(); // bb 1606 return this.experimental; 1607 } 1608 1609 public boolean hasExperimentalElement() { 1610 return this.experimental != null && !this.experimental.isEmpty(); 1611 } 1612 1613 public boolean hasExperimental() { 1614 return this.experimental != null && !this.experimental.isEmpty(); 1615 } 1616 1617 /** 1618 * @param value {@link #experimental} (This profile 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 1619 */ 1620 public OperationDefinition setExperimentalElement(BooleanType value) { 1621 this.experimental = value; 1622 return this; 1623 } 1624 1625 /** 1626 * @return This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 1627 */ 1628 public boolean getExperimental() { 1629 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 1630 } 1631 1632 /** 1633 * @param value This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 1634 */ 1635 public OperationDefinition setExperimental(boolean value) { 1636 if (this.experimental == null) 1637 this.experimental = new BooleanType(); 1638 this.experimental.setValue(value); 1639 return this; 1640 } 1641 1642 /** 1643 * @return {@link #publisher} (The name of the individual or organization that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 1644 */ 1645 public StringType getPublisherElement() { 1646 if (this.publisher == null) 1647 if (Configuration.errorOnAutoCreate()) 1648 throw new Error("Attempt to auto-create OperationDefinition.publisher"); 1649 else if (Configuration.doAutoCreate()) 1650 this.publisher = new StringType(); // bb 1651 return this.publisher; 1652 } 1653 1654 public boolean hasPublisherElement() { 1655 return this.publisher != null && !this.publisher.isEmpty(); 1656 } 1657 1658 public boolean hasPublisher() { 1659 return this.publisher != null && !this.publisher.isEmpty(); 1660 } 1661 1662 /** 1663 * @param value {@link #publisher} (The name of the individual or organization that published the operation definition.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 1664 */ 1665 public OperationDefinition setPublisherElement(StringType value) { 1666 this.publisher = value; 1667 return this; 1668 } 1669 1670 /** 1671 * @return The name of the individual or organization that published the operation definition. 1672 */ 1673 public String getPublisher() { 1674 return this.publisher == null ? null : this.publisher.getValue(); 1675 } 1676 1677 /** 1678 * @param value The name of the individual or organization that published the operation definition. 1679 */ 1680 public OperationDefinition setPublisher(String value) { 1681 if (Utilities.noString(value)) 1682 this.publisher = null; 1683 else { 1684 if (this.publisher == null) 1685 this.publisher = new StringType(); 1686 this.publisher.setValue(value); 1687 } 1688 return this; 1689 } 1690 1691 /** 1692 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 1693 */ 1694 public List<OperationDefinitionContactComponent> getContact() { 1695 if (this.contact == null) 1696 this.contact = new ArrayList<OperationDefinitionContactComponent>(); 1697 return this.contact; 1698 } 1699 1700 public boolean hasContact() { 1701 if (this.contact == null) 1702 return false; 1703 for (OperationDefinitionContactComponent item : this.contact) 1704 if (!item.isEmpty()) 1705 return true; 1706 return false; 1707 } 1708 1709 /** 1710 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 1711 */ 1712 // syntactic sugar 1713 public OperationDefinitionContactComponent addContact() { //3 1714 OperationDefinitionContactComponent t = new OperationDefinitionContactComponent(); 1715 if (this.contact == null) 1716 this.contact = new ArrayList<OperationDefinitionContactComponent>(); 1717 this.contact.add(t); 1718 return t; 1719 } 1720 1721 // syntactic sugar 1722 public OperationDefinition addContact(OperationDefinitionContactComponent t) { //3 1723 if (t == null) 1724 return this; 1725 if (this.contact == null) 1726 this.contact = new ArrayList<OperationDefinitionContactComponent>(); 1727 this.contact.add(t); 1728 return this; 1729 } 1730 1731 /** 1732 * @return {@link #date} (The date this version of the operation definition 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 Operation Definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1733 */ 1734 public DateTimeType getDateElement() { 1735 if (this.date == null) 1736 if (Configuration.errorOnAutoCreate()) 1737 throw new Error("Attempt to auto-create OperationDefinition.date"); 1738 else if (Configuration.doAutoCreate()) 1739 this.date = new DateTimeType(); // bb 1740 return this.date; 1741 } 1742 1743 public boolean hasDateElement() { 1744 return this.date != null && !this.date.isEmpty(); 1745 } 1746 1747 public boolean hasDate() { 1748 return this.date != null && !this.date.isEmpty(); 1749 } 1750 1751 /** 1752 * @param value {@link #date} (The date this version of the operation definition 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 Operation Definition changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 1753 */ 1754 public OperationDefinition setDateElement(DateTimeType value) { 1755 this.date = value; 1756 return this; 1757 } 1758 1759 /** 1760 * @return The date this version of the operation definition 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 Operation Definition changes. 1761 */ 1762 public Date getDate() { 1763 return this.date == null ? null : this.date.getValue(); 1764 } 1765 1766 /** 1767 * @param value The date this version of the operation definition 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 Operation Definition changes. 1768 */ 1769 public OperationDefinition setDate(Date value) { 1770 if (value == null) 1771 this.date = null; 1772 else { 1773 if (this.date == null) 1774 this.date = new DateTimeType(); 1775 this.date.setValue(value); 1776 } 1777 return this; 1778 } 1779 1780 /** 1781 * @return {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1782 */ 1783 public StringType getDescriptionElement() { 1784 if (this.description == null) 1785 if (Configuration.errorOnAutoCreate()) 1786 throw new Error("Attempt to auto-create OperationDefinition.description"); 1787 else if (Configuration.doAutoCreate()) 1788 this.description = new StringType(); // bb 1789 return this.description; 1790 } 1791 1792 public boolean hasDescriptionElement() { 1793 return this.description != null && !this.description.isEmpty(); 1794 } 1795 1796 public boolean hasDescription() { 1797 return this.description != null && !this.description.isEmpty(); 1798 } 1799 1800 /** 1801 * @param value {@link #description} (A free text natural language description of the profile and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1802 */ 1803 public OperationDefinition setDescriptionElement(StringType value) { 1804 this.description = value; 1805 return this; 1806 } 1807 1808 /** 1809 * @return A free text natural language description of the profile and its use. 1810 */ 1811 public String getDescription() { 1812 return this.description == null ? null : this.description.getValue(); 1813 } 1814 1815 /** 1816 * @param value A free text natural language description of the profile and its use. 1817 */ 1818 public OperationDefinition setDescription(String value) { 1819 if (Utilities.noString(value)) 1820 this.description = null; 1821 else { 1822 if (this.description == null) 1823 this.description = new StringType(); 1824 this.description.setValue(value); 1825 } 1826 return this; 1827 } 1828 1829 /** 1830 * @return {@link #requirements} (Explains why this operation definition 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 1831 */ 1832 public StringType getRequirementsElement() { 1833 if (this.requirements == null) 1834 if (Configuration.errorOnAutoCreate()) 1835 throw new Error("Attempt to auto-create OperationDefinition.requirements"); 1836 else if (Configuration.doAutoCreate()) 1837 this.requirements = new StringType(); // bb 1838 return this.requirements; 1839 } 1840 1841 public boolean hasRequirementsElement() { 1842 return this.requirements != null && !this.requirements.isEmpty(); 1843 } 1844 1845 public boolean hasRequirements() { 1846 return this.requirements != null && !this.requirements.isEmpty(); 1847 } 1848 1849 /** 1850 * @param value {@link #requirements} (Explains why this operation definition 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 1851 */ 1852 public OperationDefinition setRequirementsElement(StringType value) { 1853 this.requirements = value; 1854 return this; 1855 } 1856 1857 /** 1858 * @return Explains why this operation definition is needed and why it's been constrained as it has. 1859 */ 1860 public String getRequirements() { 1861 return this.requirements == null ? null : this.requirements.getValue(); 1862 } 1863 1864 /** 1865 * @param value Explains why this operation definition is needed and why it's been constrained as it has. 1866 */ 1867 public OperationDefinition setRequirements(String value) { 1868 if (Utilities.noString(value)) 1869 this.requirements = null; 1870 else { 1871 if (this.requirements == null) 1872 this.requirements = new StringType(); 1873 this.requirements.setValue(value); 1874 } 1875 return this; 1876 } 1877 1878 /** 1879 * @return {@link #idempotent} (Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.). This is the underlying object with id, value and extensions. The accessor "getIdempotent" gives direct access to the value 1880 */ 1881 public BooleanType getIdempotentElement() { 1882 if (this.idempotent == null) 1883 if (Configuration.errorOnAutoCreate()) 1884 throw new Error("Attempt to auto-create OperationDefinition.idempotent"); 1885 else if (Configuration.doAutoCreate()) 1886 this.idempotent = new BooleanType(); // bb 1887 return this.idempotent; 1888 } 1889 1890 public boolean hasIdempotentElement() { 1891 return this.idempotent != null && !this.idempotent.isEmpty(); 1892 } 1893 1894 public boolean hasIdempotent() { 1895 return this.idempotent != null && !this.idempotent.isEmpty(); 1896 } 1897 1898 /** 1899 * @param value {@link #idempotent} (Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.). This is the underlying object with id, value and extensions. The accessor "getIdempotent" gives direct access to the value 1900 */ 1901 public OperationDefinition setIdempotentElement(BooleanType value) { 1902 this.idempotent = value; 1903 return this; 1904 } 1905 1906 /** 1907 * @return Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. 1908 */ 1909 public boolean getIdempotent() { 1910 return this.idempotent == null || this.idempotent.isEmpty() ? false : this.idempotent.getValue(); 1911 } 1912 1913 /** 1914 * @param value Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST. 1915 */ 1916 public OperationDefinition setIdempotent(boolean value) { 1917 if (this.idempotent == null) 1918 this.idempotent = new BooleanType(); 1919 this.idempotent.setValue(value); 1920 return this; 1921 } 1922 1923 /** 1924 * @return {@link #code} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1925 */ 1926 public CodeType getCodeElement() { 1927 if (this.code == null) 1928 if (Configuration.errorOnAutoCreate()) 1929 throw new Error("Attempt to auto-create OperationDefinition.code"); 1930 else if (Configuration.doAutoCreate()) 1931 this.code = new CodeType(); // bb 1932 return this.code; 1933 } 1934 1935 public boolean hasCodeElement() { 1936 return this.code != null && !this.code.isEmpty(); 1937 } 1938 1939 public boolean hasCode() { 1940 return this.code != null && !this.code.isEmpty(); 1941 } 1942 1943 /** 1944 * @param value {@link #code} (The name used to invoke the operation.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 1945 */ 1946 public OperationDefinition setCodeElement(CodeType value) { 1947 this.code = value; 1948 return this; 1949 } 1950 1951 /** 1952 * @return The name used to invoke the operation. 1953 */ 1954 public String getCode() { 1955 return this.code == null ? null : this.code.getValue(); 1956 } 1957 1958 /** 1959 * @param value The name used to invoke the operation. 1960 */ 1961 public OperationDefinition setCode(String value) { 1962 if (this.code == null) 1963 this.code = new CodeType(); 1964 this.code.setValue(value); 1965 return this; 1966 } 1967 1968 /** 1969 * @return {@link #notes} (Additional information about how to use this operation or named query.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value 1970 */ 1971 public StringType getNotesElement() { 1972 if (this.notes == null) 1973 if (Configuration.errorOnAutoCreate()) 1974 throw new Error("Attempt to auto-create OperationDefinition.notes"); 1975 else if (Configuration.doAutoCreate()) 1976 this.notes = new StringType(); // bb 1977 return this.notes; 1978 } 1979 1980 public boolean hasNotesElement() { 1981 return this.notes != null && !this.notes.isEmpty(); 1982 } 1983 1984 public boolean hasNotes() { 1985 return this.notes != null && !this.notes.isEmpty(); 1986 } 1987 1988 /** 1989 * @param value {@link #notes} (Additional information about how to use this operation or named query.). This is the underlying object with id, value and extensions. The accessor "getNotes" gives direct access to the value 1990 */ 1991 public OperationDefinition setNotesElement(StringType value) { 1992 this.notes = value; 1993 return this; 1994 } 1995 1996 /** 1997 * @return Additional information about how to use this operation or named query. 1998 */ 1999 public String getNotes() { 2000 return this.notes == null ? null : this.notes.getValue(); 2001 } 2002 2003 /** 2004 * @param value Additional information about how to use this operation or named query. 2005 */ 2006 public OperationDefinition setNotes(String value) { 2007 if (Utilities.noString(value)) 2008 this.notes = null; 2009 else { 2010 if (this.notes == null) 2011 this.notes = new StringType(); 2012 this.notes.setValue(value); 2013 } 2014 return this; 2015 } 2016 2017 /** 2018 * @return {@link #base} (Indicates that this operation definition is a constraining profile on the base.) 2019 */ 2020 public Reference getBase() { 2021 if (this.base == null) 2022 if (Configuration.errorOnAutoCreate()) 2023 throw new Error("Attempt to auto-create OperationDefinition.base"); 2024 else if (Configuration.doAutoCreate()) 2025 this.base = new Reference(); // cc 2026 return this.base; 2027 } 2028 2029 public boolean hasBase() { 2030 return this.base != null && !this.base.isEmpty(); 2031 } 2032 2033 /** 2034 * @param value {@link #base} (Indicates that this operation definition is a constraining profile on the base.) 2035 */ 2036 public OperationDefinition setBase(Reference value) { 2037 this.base = value; 2038 return this; 2039 } 2040 2041 /** 2042 * @return {@link #base} 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. (Indicates that this operation definition is a constraining profile on the base.) 2043 */ 2044 public OperationDefinition getBaseTarget() { 2045 if (this.baseTarget == null) 2046 if (Configuration.errorOnAutoCreate()) 2047 throw new Error("Attempt to auto-create OperationDefinition.base"); 2048 else if (Configuration.doAutoCreate()) 2049 this.baseTarget = new OperationDefinition(); // aa 2050 return this.baseTarget; 2051 } 2052 2053 /** 2054 * @param value {@link #base} 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. (Indicates that this operation definition is a constraining profile on the base.) 2055 */ 2056 public OperationDefinition setBaseTarget(OperationDefinition value) { 2057 this.baseTarget = value; 2058 return this; 2059 } 2060 2061 /** 2062 * @return {@link #system} (Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value 2063 */ 2064 public BooleanType getSystemElement() { 2065 if (this.system == null) 2066 if (Configuration.errorOnAutoCreate()) 2067 throw new Error("Attempt to auto-create OperationDefinition.system"); 2068 else if (Configuration.doAutoCreate()) 2069 this.system = new BooleanType(); // bb 2070 return this.system; 2071 } 2072 2073 public boolean hasSystemElement() { 2074 return this.system != null && !this.system.isEmpty(); 2075 } 2076 2077 public boolean hasSystem() { 2078 return this.system != null && !this.system.isEmpty(); 2079 } 2080 2081 /** 2082 * @param value {@link #system} (Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).). This is the underlying object with id, value and extensions. The accessor "getSystem" gives direct access to the value 2083 */ 2084 public OperationDefinition setSystemElement(BooleanType value) { 2085 this.system = value; 2086 return this; 2087 } 2088 2089 /** 2090 * @return Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). 2091 */ 2092 public boolean getSystem() { 2093 return this.system == null || this.system.isEmpty() ? false : this.system.getValue(); 2094 } 2095 2096 /** 2097 * @param value Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context). 2098 */ 2099 public OperationDefinition setSystem(boolean value) { 2100 if (this.system == null) 2101 this.system = new BooleanType(); 2102 this.system.setValue(value); 2103 return this; 2104 } 2105 2106 /** 2107 * @return {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).) 2108 */ 2109 public List<CodeType> getType() { 2110 if (this.type == null) 2111 this.type = new ArrayList<CodeType>(); 2112 return this.type; 2113 } 2114 2115 public boolean hasType() { 2116 if (this.type == null) 2117 return false; 2118 for (CodeType item : this.type) 2119 if (!item.isEmpty()) 2120 return true; 2121 return false; 2122 } 2123 2124 /** 2125 * @return {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).) 2126 */ 2127 // syntactic sugar 2128 public CodeType addTypeElement() {//2 2129 CodeType t = new CodeType(); 2130 if (this.type == null) 2131 this.type = new ArrayList<CodeType>(); 2132 this.type.add(t); 2133 return t; 2134 } 2135 2136 /** 2137 * @param value {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).) 2138 */ 2139 public OperationDefinition addType(String value) { //1 2140 CodeType t = new CodeType(); 2141 t.setValue(value); 2142 if (this.type == null) 2143 this.type = new ArrayList<CodeType>(); 2144 this.type.add(t); 2145 return this; 2146 } 2147 2148 /** 2149 * @param value {@link #type} (Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).) 2150 */ 2151 public boolean hasType(String value) { 2152 if (this.type == null) 2153 return false; 2154 for (CodeType v : this.type) 2155 if (v.equals(value)) // code 2156 return true; 2157 return false; 2158 } 2159 2160 /** 2161 * @return {@link #instance} (Indicates whether this operation can be invoked on a particular instance of one of the given types.). This is the underlying object with id, value and extensions. The accessor "getInstance" gives direct access to the value 2162 */ 2163 public BooleanType getInstanceElement() { 2164 if (this.instance == null) 2165 if (Configuration.errorOnAutoCreate()) 2166 throw new Error("Attempt to auto-create OperationDefinition.instance"); 2167 else if (Configuration.doAutoCreate()) 2168 this.instance = new BooleanType(); // bb 2169 return this.instance; 2170 } 2171 2172 public boolean hasInstanceElement() { 2173 return this.instance != null && !this.instance.isEmpty(); 2174 } 2175 2176 public boolean hasInstance() { 2177 return this.instance != null && !this.instance.isEmpty(); 2178 } 2179 2180 /** 2181 * @param value {@link #instance} (Indicates whether this operation can be invoked on a particular instance of one of the given types.). This is the underlying object with id, value and extensions. The accessor "getInstance" gives direct access to the value 2182 */ 2183 public OperationDefinition setInstanceElement(BooleanType value) { 2184 this.instance = value; 2185 return this; 2186 } 2187 2188 /** 2189 * @return Indicates whether this operation can be invoked on a particular instance of one of the given types. 2190 */ 2191 public boolean getInstance() { 2192 return this.instance == null || this.instance.isEmpty() ? false : this.instance.getValue(); 2193 } 2194 2195 /** 2196 * @param value Indicates whether this operation can be invoked on a particular instance of one of the given types. 2197 */ 2198 public OperationDefinition setInstance(boolean value) { 2199 if (this.instance == null) 2200 this.instance = new BooleanType(); 2201 this.instance.setValue(value); 2202 return this; 2203 } 2204 2205 /** 2206 * @return {@link #parameter} (The parameters for the operation/query.) 2207 */ 2208 public List<OperationDefinitionParameterComponent> getParameter() { 2209 if (this.parameter == null) 2210 this.parameter = new ArrayList<OperationDefinitionParameterComponent>(); 2211 return this.parameter; 2212 } 2213 2214 public boolean hasParameter() { 2215 if (this.parameter == null) 2216 return false; 2217 for (OperationDefinitionParameterComponent item : this.parameter) 2218 if (!item.isEmpty()) 2219 return true; 2220 return false; 2221 } 2222 2223 /** 2224 * @return {@link #parameter} (The parameters for the operation/query.) 2225 */ 2226 // syntactic sugar 2227 public OperationDefinitionParameterComponent addParameter() { //3 2228 OperationDefinitionParameterComponent t = new OperationDefinitionParameterComponent(); 2229 if (this.parameter == null) 2230 this.parameter = new ArrayList<OperationDefinitionParameterComponent>(); 2231 this.parameter.add(t); 2232 return t; 2233 } 2234 2235 // syntactic sugar 2236 public OperationDefinition addParameter(OperationDefinitionParameterComponent t) { //3 2237 if (t == null) 2238 return this; 2239 if (this.parameter == null) 2240 this.parameter = new ArrayList<OperationDefinitionParameterComponent>(); 2241 this.parameter.add(t); 2242 return this; 2243 } 2244 2245 protected void listChildren(List<Property> childrenList) { 2246 super.listChildren(childrenList); 2247 childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this operation definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this operation definition is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); 2248 childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the profile when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.", 0, java.lang.Integer.MAX_VALUE, version)); 2249 childrenList.add(new Property("name", "string", "A free text natural language name identifying the operation.", 0, java.lang.Integer.MAX_VALUE, name)); 2250 childrenList.add(new Property("status", "code", "The status of the profile.", 0, java.lang.Integer.MAX_VALUE, status)); 2251 childrenList.add(new Property("kind", "code", "Whether this is an operation or a named query.", 0, java.lang.Integer.MAX_VALUE, kind)); 2252 childrenList.add(new Property("experimental", "boolean", "This profile 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)); 2253 childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the operation definition.", 0, java.lang.Integer.MAX_VALUE, publisher)); 2254 childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 2255 childrenList.add(new Property("date", "dateTime", "The date this version of the operation definition 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 Operation Definition changes.", 0, java.lang.Integer.MAX_VALUE, date)); 2256 childrenList.add(new Property("description", "string", "A free text natural language description of the profile and its use.", 0, java.lang.Integer.MAX_VALUE, description)); 2257 childrenList.add(new Property("requirements", "string", "Explains why this operation definition is needed and why it's been constrained as it has.", 0, java.lang.Integer.MAX_VALUE, requirements)); 2258 childrenList.add(new Property("idempotent", "boolean", "Operations that are idempotent (see [HTTP specification definition of idempotent](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html)) may be invoked by performing an HTTP GET operation instead of a POST.", 0, java.lang.Integer.MAX_VALUE, idempotent)); 2259 childrenList.add(new Property("code", "code", "The name used to invoke the operation.", 0, java.lang.Integer.MAX_VALUE, code)); 2260 childrenList.add(new Property("notes", "string", "Additional information about how to use this operation or named query.", 0, java.lang.Integer.MAX_VALUE, notes)); 2261 childrenList.add(new Property("base", "Reference(OperationDefinition)", "Indicates that this operation definition is a constraining profile on the base.", 0, java.lang.Integer.MAX_VALUE, base)); 2262 childrenList.add(new Property("system", "boolean", "Indicates whether this operation or named query can be invoked at the system level (e.g. without needing to choose a resource type for the context).", 0, java.lang.Integer.MAX_VALUE, system)); 2263 childrenList.add(new Property("type", "code", "Indicates whether this operation or named query can be invoked at the resource type level for any given resource type level (e.g. without needing to choose a resource type for the context).", 0, java.lang.Integer.MAX_VALUE, type)); 2264 childrenList.add(new Property("instance", "boolean", "Indicates whether this operation can be invoked on a particular instance of one of the given types.", 0, java.lang.Integer.MAX_VALUE, instance)); 2265 childrenList.add(new Property("parameter", "", "The parameters for the operation/query.", 0, java.lang.Integer.MAX_VALUE, parameter)); 2266 } 2267 2268 @Override 2269 public void setProperty(String name, Base value) throws FHIRException { 2270 if (name.equals("url")) 2271 this.url = castToUri(value); // UriType 2272 else if (name.equals("version")) 2273 this.version = castToString(value); // StringType 2274 else if (name.equals("name")) 2275 this.name = castToString(value); // StringType 2276 else if (name.equals("status")) 2277 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 2278 else if (name.equals("kind")) 2279 this.kind = new OperationKindEnumFactory().fromType(value); // Enumeration<OperationKind> 2280 else if (name.equals("experimental")) 2281 this.experimental = castToBoolean(value); // BooleanType 2282 else if (name.equals("publisher")) 2283 this.publisher = castToString(value); // StringType 2284 else if (name.equals("contact")) 2285 this.getContact().add((OperationDefinitionContactComponent) value); 2286 else if (name.equals("date")) 2287 this.date = castToDateTime(value); // DateTimeType 2288 else if (name.equals("description")) 2289 this.description = castToString(value); // StringType 2290 else if (name.equals("requirements")) 2291 this.requirements = castToString(value); // StringType 2292 else if (name.equals("idempotent")) 2293 this.idempotent = castToBoolean(value); // BooleanType 2294 else if (name.equals("code")) 2295 this.code = castToCode(value); // CodeType 2296 else if (name.equals("notes")) 2297 this.notes = castToString(value); // StringType 2298 else if (name.equals("base")) 2299 this.base = castToReference(value); // Reference 2300 else if (name.equals("system")) 2301 this.system = castToBoolean(value); // BooleanType 2302 else if (name.equals("type")) 2303 this.getType().add(castToCode(value)); 2304 else if (name.equals("instance")) 2305 this.instance = castToBoolean(value); // BooleanType 2306 else if (name.equals("parameter")) 2307 this.getParameter().add((OperationDefinitionParameterComponent) value); 2308 else 2309 super.setProperty(name, value); 2310 } 2311 2312 @Override 2313 public Base addChild(String name) throws FHIRException { 2314 if (name.equals("url")) { 2315 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.url"); 2316 } 2317 else if (name.equals("version")) { 2318 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.version"); 2319 } 2320 else if (name.equals("name")) { 2321 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.name"); 2322 } 2323 else if (name.equals("status")) { 2324 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.status"); 2325 } 2326 else if (name.equals("kind")) { 2327 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.kind"); 2328 } 2329 else if (name.equals("experimental")) { 2330 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.experimental"); 2331 } 2332 else if (name.equals("publisher")) { 2333 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.publisher"); 2334 } 2335 else if (name.equals("contact")) { 2336 return addContact(); 2337 } 2338 else if (name.equals("date")) { 2339 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.date"); 2340 } 2341 else if (name.equals("description")) { 2342 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.description"); 2343 } 2344 else if (name.equals("requirements")) { 2345 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.requirements"); 2346 } 2347 else if (name.equals("idempotent")) { 2348 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.idempotent"); 2349 } 2350 else if (name.equals("code")) { 2351 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.code"); 2352 } 2353 else if (name.equals("notes")) { 2354 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.notes"); 2355 } 2356 else if (name.equals("base")) { 2357 this.base = new Reference(); 2358 return this.base; 2359 } 2360 else if (name.equals("system")) { 2361 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.system"); 2362 } 2363 else if (name.equals("type")) { 2364 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.type"); 2365 } 2366 else if (name.equals("instance")) { 2367 throw new FHIRException("Cannot call addChild on a primitive type OperationDefinition.instance"); 2368 } 2369 else if (name.equals("parameter")) { 2370 return addParameter(); 2371 } 2372 else 2373 return super.addChild(name); 2374 } 2375 2376 public String fhirType() { 2377 return "OperationDefinition"; 2378 2379 } 2380 2381 public OperationDefinition copy() { 2382 OperationDefinition dst = new OperationDefinition(); 2383 copyValues(dst); 2384 dst.url = url == null ? null : url.copy(); 2385 dst.version = version == null ? null : version.copy(); 2386 dst.name = name == null ? null : name.copy(); 2387 dst.status = status == null ? null : status.copy(); 2388 dst.kind = kind == null ? null : kind.copy(); 2389 dst.experimental = experimental == null ? null : experimental.copy(); 2390 dst.publisher = publisher == null ? null : publisher.copy(); 2391 if (contact != null) { 2392 dst.contact = new ArrayList<OperationDefinitionContactComponent>(); 2393 for (OperationDefinitionContactComponent i : contact) 2394 dst.contact.add(i.copy()); 2395 }; 2396 dst.date = date == null ? null : date.copy(); 2397 dst.description = description == null ? null : description.copy(); 2398 dst.requirements = requirements == null ? null : requirements.copy(); 2399 dst.idempotent = idempotent == null ? null : idempotent.copy(); 2400 dst.code = code == null ? null : code.copy(); 2401 dst.notes = notes == null ? null : notes.copy(); 2402 dst.base = base == null ? null : base.copy(); 2403 dst.system = system == null ? null : system.copy(); 2404 if (type != null) { 2405 dst.type = new ArrayList<CodeType>(); 2406 for (CodeType i : type) 2407 dst.type.add(i.copy()); 2408 }; 2409 dst.instance = instance == null ? null : instance.copy(); 2410 if (parameter != null) { 2411 dst.parameter = new ArrayList<OperationDefinitionParameterComponent>(); 2412 for (OperationDefinitionParameterComponent i : parameter) 2413 dst.parameter.add(i.copy()); 2414 }; 2415 return dst; 2416 } 2417 2418 protected OperationDefinition typedCopy() { 2419 return copy(); 2420 } 2421 2422 @Override 2423 public boolean equalsDeep(Base other) { 2424 if (!super.equalsDeep(other)) 2425 return false; 2426 if (!(other instanceof OperationDefinition)) 2427 return false; 2428 OperationDefinition o = (OperationDefinition) other; 2429 return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) 2430 && compareDeep(status, o.status, true) && compareDeep(kind, o.kind, true) && compareDeep(experimental, o.experimental, true) 2431 && compareDeep(publisher, o.publisher, true) && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) 2432 && compareDeep(description, o.description, true) && compareDeep(requirements, o.requirements, true) 2433 && compareDeep(idempotent, o.idempotent, true) && compareDeep(code, o.code, true) && compareDeep(notes, o.notes, true) 2434 && compareDeep(base, o.base, true) && compareDeep(system, o.system, true) && compareDeep(type, o.type, true) 2435 && compareDeep(instance, o.instance, true) && compareDeep(parameter, o.parameter, true); 2436 } 2437 2438 @Override 2439 public boolean equalsShallow(Base other) { 2440 if (!super.equalsShallow(other)) 2441 return false; 2442 if (!(other instanceof OperationDefinition)) 2443 return false; 2444 OperationDefinition o = (OperationDefinition) other; 2445 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) 2446 && compareValues(status, o.status, true) && compareValues(kind, o.kind, true) && compareValues(experimental, o.experimental, true) 2447 && compareValues(publisher, o.publisher, true) && compareValues(date, o.date, true) && compareValues(description, o.description, true) 2448 && compareValues(requirements, o.requirements, true) && compareValues(idempotent, o.idempotent, true) 2449 && compareValues(code, o.code, true) && compareValues(notes, o.notes, true) && compareValues(system, o.system, true) 2450 && compareValues(type, o.type, true) && compareValues(instance, o.instance, true); 2451 } 2452 2453 public boolean isEmpty() { 2454 return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) 2455 && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (kind == null || kind.isEmpty()) 2456 && (experimental == null || experimental.isEmpty()) && (publisher == null || publisher.isEmpty()) 2457 && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) && (description == null || description.isEmpty()) 2458 && (requirements == null || requirements.isEmpty()) && (idempotent == null || idempotent.isEmpty()) 2459 && (code == null || code.isEmpty()) && (notes == null || notes.isEmpty()) && (base == null || base.isEmpty()) 2460 && (system == null || system.isEmpty()) && (type == null || type.isEmpty()) && (instance == null || instance.isEmpty()) 2461 && (parameter == null || parameter.isEmpty()); 2462 } 2463 2464 @Override 2465 public ResourceType getResourceType() { 2466 return ResourceType.OperationDefinition; 2467 } 2468 2469 @SearchParamDefinition(name="date", path="OperationDefinition.date", description="Date for this version of the operation definition", type="date" ) 2470 public static final String SP_DATE = "date"; 2471 @SearchParamDefinition(name="code", path="OperationDefinition.code", description="Name used to invoke the operation", type="token" ) 2472 public static final String SP_CODE = "code"; 2473 @SearchParamDefinition(name="instance", path="OperationDefinition.instance", description="Invoke on an instance?", type="token" ) 2474 public static final String SP_INSTANCE = "instance"; 2475 @SearchParamDefinition(name="kind", path="OperationDefinition.kind", description="operation | query", type="token" ) 2476 public static final String SP_KIND = "kind"; 2477 @SearchParamDefinition(name="profile", path="OperationDefinition.parameter.profile", description="Profile on the type", type="reference" ) 2478 public static final String SP_PROFILE = "profile"; 2479 @SearchParamDefinition(name="type", path="OperationDefinition.type", description="Invoke at resource level for these type", type="token" ) 2480 public static final String SP_TYPE = "type"; 2481 @SearchParamDefinition(name="version", path="OperationDefinition.version", description="Logical id for this version of the operation definition", type="token" ) 2482 public static final String SP_VERSION = "version"; 2483 @SearchParamDefinition(name="url", path="OperationDefinition.url", description="Logical URL to reference this operation definition", type="uri" ) 2484 public static final String SP_URL = "url"; 2485 @SearchParamDefinition(name="system", path="OperationDefinition.system", description="Invoke at the system level?", type="token" ) 2486 public static final String SP_SYSTEM = "system"; 2487 @SearchParamDefinition(name="name", path="OperationDefinition.name", description="Informal name for this operation", type="string" ) 2488 public static final String SP_NAME = "name"; 2489 @SearchParamDefinition(name="publisher", path="OperationDefinition.publisher", description="Name of the publisher (Organization or individual)", type="string" ) 2490 public static final String SP_PUBLISHER = "publisher"; 2491 @SearchParamDefinition(name="status", path="OperationDefinition.status", description="draft | active | retired", type="token" ) 2492 public static final String SP_STATUS = "status"; 2493 @SearchParamDefinition(name="base", path="OperationDefinition.base", description="Marks this as a profile of the base", type="reference" ) 2494 public static final String SP_BASE = "base"; 2495 2496} 2497