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