001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050/** 051 * The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information. 052 */ 053@ResourceDef(name="Endpoint", profile="http://hl7.org/fhir/StructureDefinition/Endpoint") 054public class Endpoint extends DomainResource { 055 056 public enum EndpointStatus { 057 /** 058 * This endpoint is expected to be active and can be used. 059 */ 060 ACTIVE, 061 /** 062 * This endpoint is temporarily unavailable. 063 */ 064 SUSPENDED, 065 /** 066 * This endpoint has exceeded connectivity thresholds and is considered in an error state and should no longer be attempted to connect to until corrective action is taken. 067 */ 068 ERROR, 069 /** 070 * This endpoint is no longer to be used. 071 */ 072 OFF, 073 /** 074 * This instance should not have been part of this patient's medical record. 075 */ 076 ENTEREDINERROR, 077 /** 078 * added to help the parsers with the generic types 079 */ 080 NULL; 081 public static EndpointStatus fromCode(String codeString) throws FHIRException { 082 if (codeString == null || "".equals(codeString)) 083 return null; 084 if ("active".equals(codeString)) 085 return ACTIVE; 086 if ("suspended".equals(codeString)) 087 return SUSPENDED; 088 if ("error".equals(codeString)) 089 return ERROR; 090 if ("off".equals(codeString)) 091 return OFF; 092 if ("entered-in-error".equals(codeString)) 093 return ENTEREDINERROR; 094 if (Configuration.isAcceptInvalidEnums()) 095 return null; 096 else 097 throw new FHIRException("Unknown EndpointStatus code '"+codeString+"'"); 098 } 099 public String toCode() { 100 switch (this) { 101 case ACTIVE: return "active"; 102 case SUSPENDED: return "suspended"; 103 case ERROR: return "error"; 104 case OFF: return "off"; 105 case ENTEREDINERROR: return "entered-in-error"; 106 case NULL: return null; 107 default: return "?"; 108 } 109 } 110 public String getSystem() { 111 switch (this) { 112 case ACTIVE: return "http://hl7.org/fhir/endpoint-status"; 113 case SUSPENDED: return "http://hl7.org/fhir/endpoint-status"; 114 case ERROR: return "http://hl7.org/fhir/endpoint-status"; 115 case OFF: return "http://hl7.org/fhir/endpoint-status"; 116 case ENTEREDINERROR: return "http://hl7.org/fhir/endpoint-status"; 117 case NULL: return null; 118 default: return "?"; 119 } 120 } 121 public String getDefinition() { 122 switch (this) { 123 case ACTIVE: return "This endpoint is expected to be active and can be used."; 124 case SUSPENDED: return "This endpoint is temporarily unavailable."; 125 case ERROR: return "This endpoint has exceeded connectivity thresholds and is considered in an error state and should no longer be attempted to connect to until corrective action is taken."; 126 case OFF: return "This endpoint is no longer to be used."; 127 case ENTEREDINERROR: return "This instance should not have been part of this patient's medical record."; 128 case NULL: return null; 129 default: return "?"; 130 } 131 } 132 public String getDisplay() { 133 switch (this) { 134 case ACTIVE: return "Active"; 135 case SUSPENDED: return "Suspended"; 136 case ERROR: return "Error"; 137 case OFF: return "Off"; 138 case ENTEREDINERROR: return "Entered in error"; 139 case NULL: return null; 140 default: return "?"; 141 } 142 } 143 } 144 145 public static class EndpointStatusEnumFactory implements EnumFactory<EndpointStatus> { 146 public EndpointStatus fromCode(String codeString) throws IllegalArgumentException { 147 if (codeString == null || "".equals(codeString)) 148 if (codeString == null || "".equals(codeString)) 149 return null; 150 if ("active".equals(codeString)) 151 return EndpointStatus.ACTIVE; 152 if ("suspended".equals(codeString)) 153 return EndpointStatus.SUSPENDED; 154 if ("error".equals(codeString)) 155 return EndpointStatus.ERROR; 156 if ("off".equals(codeString)) 157 return EndpointStatus.OFF; 158 if ("entered-in-error".equals(codeString)) 159 return EndpointStatus.ENTEREDINERROR; 160 throw new IllegalArgumentException("Unknown EndpointStatus code '"+codeString+"'"); 161 } 162 public Enumeration<EndpointStatus> fromType(PrimitiveType<?> code) throws FHIRException { 163 if (code == null) 164 return null; 165 if (code.isEmpty()) 166 return new Enumeration<EndpointStatus>(this, EndpointStatus.NULL, code); 167 String codeString = ((PrimitiveType) code).asStringValue(); 168 if (codeString == null || "".equals(codeString)) 169 return new Enumeration<EndpointStatus>(this, EndpointStatus.NULL, code); 170 if ("active".equals(codeString)) 171 return new Enumeration<EndpointStatus>(this, EndpointStatus.ACTIVE, code); 172 if ("suspended".equals(codeString)) 173 return new Enumeration<EndpointStatus>(this, EndpointStatus.SUSPENDED, code); 174 if ("error".equals(codeString)) 175 return new Enumeration<EndpointStatus>(this, EndpointStatus.ERROR, code); 176 if ("off".equals(codeString)) 177 return new Enumeration<EndpointStatus>(this, EndpointStatus.OFF, code); 178 if ("entered-in-error".equals(codeString)) 179 return new Enumeration<EndpointStatus>(this, EndpointStatus.ENTEREDINERROR, code); 180 throw new FHIRException("Unknown EndpointStatus code '"+codeString+"'"); 181 } 182 public String toCode(EndpointStatus code) { 183 if (code == EndpointStatus.ACTIVE) 184 return "active"; 185 if (code == EndpointStatus.SUSPENDED) 186 return "suspended"; 187 if (code == EndpointStatus.ERROR) 188 return "error"; 189 if (code == EndpointStatus.OFF) 190 return "off"; 191 if (code == EndpointStatus.ENTEREDINERROR) 192 return "entered-in-error"; 193 return "?"; 194 } 195 public String toSystem(EndpointStatus code) { 196 return code.getSystem(); 197 } 198 } 199 200 @Block() 201 public static class EndpointPayloadComponent extends BackboneElement implements IBaseBackboneElement { 202 /** 203 * The payload type describes the acceptable content that can be communicated on the endpoint. 204 */ 205 @Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 206 @Description(shortDefinition="The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)", formalDefinition="The payload type describes the acceptable content that can be communicated on the endpoint." ) 207 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/endpoint-payload-type") 208 protected List<CodeableConcept> type; 209 210 /** 211 * The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType). 212 */ 213 @Child(name = "mimeType", type = {CodeType.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 214 @Description(shortDefinition="Mimetype to send. If not specified, the content could be anything (including no payload, if the connectionType defined this)", formalDefinition="The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType)." ) 215 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/mimetypes") 216 protected List<CodeType> mimeType; 217 218 private static final long serialVersionUID = -1398955844L; 219 220 /** 221 * Constructor 222 */ 223 public EndpointPayloadComponent() { 224 super(); 225 } 226 227 /** 228 * @return {@link #type} (The payload type describes the acceptable content that can be communicated on the endpoint.) 229 */ 230 public List<CodeableConcept> getType() { 231 if (this.type == null) 232 this.type = new ArrayList<CodeableConcept>(); 233 return this.type; 234 } 235 236 /** 237 * @return Returns a reference to <code>this</code> for easy method chaining 238 */ 239 public EndpointPayloadComponent setType(List<CodeableConcept> theType) { 240 this.type = theType; 241 return this; 242 } 243 244 public boolean hasType() { 245 if (this.type == null) 246 return false; 247 for (CodeableConcept item : this.type) 248 if (!item.isEmpty()) 249 return true; 250 return false; 251 } 252 253 public CodeableConcept addType() { //3 254 CodeableConcept t = new CodeableConcept(); 255 if (this.type == null) 256 this.type = new ArrayList<CodeableConcept>(); 257 this.type.add(t); 258 return t; 259 } 260 261 public EndpointPayloadComponent addType(CodeableConcept t) { //3 262 if (t == null) 263 return this; 264 if (this.type == null) 265 this.type = new ArrayList<CodeableConcept>(); 266 this.type.add(t); 267 return this; 268 } 269 270 /** 271 * @return The first repetition of repeating field {@link #type}, creating it if it does not already exist {3} 272 */ 273 public CodeableConcept getTypeFirstRep() { 274 if (getType().isEmpty()) { 275 addType(); 276 } 277 return getType().get(0); 278 } 279 280 /** 281 * @return {@link #mimeType} (The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).) 282 */ 283 public List<CodeType> getMimeType() { 284 if (this.mimeType == null) 285 this.mimeType = new ArrayList<CodeType>(); 286 return this.mimeType; 287 } 288 289 /** 290 * @return Returns a reference to <code>this</code> for easy method chaining 291 */ 292 public EndpointPayloadComponent setMimeType(List<CodeType> theMimeType) { 293 this.mimeType = theMimeType; 294 return this; 295 } 296 297 public boolean hasMimeType() { 298 if (this.mimeType == null) 299 return false; 300 for (CodeType item : this.mimeType) 301 if (!item.isEmpty()) 302 return true; 303 return false; 304 } 305 306 /** 307 * @return {@link #mimeType} (The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).) 308 */ 309 public CodeType addMimeTypeElement() {//2 310 CodeType t = new CodeType(); 311 if (this.mimeType == null) 312 this.mimeType = new ArrayList<CodeType>(); 313 this.mimeType.add(t); 314 return t; 315 } 316 317 /** 318 * @param value {@link #mimeType} (The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).) 319 */ 320 public EndpointPayloadComponent addMimeType(String value) { //1 321 CodeType t = new CodeType(); 322 t.setValue(value); 323 if (this.mimeType == null) 324 this.mimeType = new ArrayList<CodeType>(); 325 this.mimeType.add(t); 326 return this; 327 } 328 329 /** 330 * @param value {@link #mimeType} (The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).) 331 */ 332 public boolean hasMimeType(String value) { 333 if (this.mimeType == null) 334 return false; 335 for (CodeType v : this.mimeType) 336 if (v.getValue().equals(value)) // code 337 return true; 338 return false; 339 } 340 341 protected void listChildren(List<Property> children) { 342 super.listChildren(children); 343 children.add(new Property("type", "CodeableConcept", "The payload type describes the acceptable content that can be communicated on the endpoint.", 0, java.lang.Integer.MAX_VALUE, type)); 344 children.add(new Property("mimeType", "code", "The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).", 0, java.lang.Integer.MAX_VALUE, mimeType)); 345 } 346 347 @Override 348 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 349 switch (_hash) { 350 case 3575610: /*type*/ return new Property("type", "CodeableConcept", "The payload type describes the acceptable content that can be communicated on the endpoint.", 0, java.lang.Integer.MAX_VALUE, type); 351 case -1392120434: /*mimeType*/ return new Property("mimeType", "code", "The mime type to send the payload in - e.g. application/fhir+xml, application/fhir+json. If the mime type is not specified, then the sender could send any content (including no content depending on the connectionType).", 0, java.lang.Integer.MAX_VALUE, mimeType); 352 default: return super.getNamedProperty(_hash, _name, _checkValid); 353 } 354 355 } 356 357 @Override 358 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 359 switch (hash) { 360 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeableConcept 361 case -1392120434: /*mimeType*/ return this.mimeType == null ? new Base[0] : this.mimeType.toArray(new Base[this.mimeType.size()]); // CodeType 362 default: return super.getProperty(hash, name, checkValid); 363 } 364 365 } 366 367 @Override 368 public Base setProperty(int hash, String name, Base value) throws FHIRException { 369 switch (hash) { 370 case 3575610: // type 371 this.getType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 372 return value; 373 case -1392120434: // mimeType 374 this.getMimeType().add(TypeConvertor.castToCode(value)); // CodeType 375 return value; 376 default: return super.setProperty(hash, name, value); 377 } 378 379 } 380 381 @Override 382 public Base setProperty(String name, Base value) throws FHIRException { 383 if (name.equals("type")) { 384 this.getType().add(TypeConvertor.castToCodeableConcept(value)); 385 } else if (name.equals("mimeType")) { 386 this.getMimeType().add(TypeConvertor.castToCode(value)); 387 } else 388 return super.setProperty(name, value); 389 return value; 390 } 391 392 @Override 393 public Base makeProperty(int hash, String name) throws FHIRException { 394 switch (hash) { 395 case 3575610: return addType(); 396 case -1392120434: return addMimeTypeElement(); 397 default: return super.makeProperty(hash, name); 398 } 399 400 } 401 402 @Override 403 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 404 switch (hash) { 405 case 3575610: /*type*/ return new String[] {"CodeableConcept"}; 406 case -1392120434: /*mimeType*/ return new String[] {"code"}; 407 default: return super.getTypesForProperty(hash, name); 408 } 409 410 } 411 412 @Override 413 public Base addChild(String name) throws FHIRException { 414 if (name.equals("type")) { 415 return addType(); 416 } 417 else if (name.equals("mimeType")) { 418 throw new FHIRException("Cannot call addChild on a singleton property Endpoint.payload.mimeType"); 419 } 420 else 421 return super.addChild(name); 422 } 423 424 public EndpointPayloadComponent copy() { 425 EndpointPayloadComponent dst = new EndpointPayloadComponent(); 426 copyValues(dst); 427 return dst; 428 } 429 430 public void copyValues(EndpointPayloadComponent dst) { 431 super.copyValues(dst); 432 if (type != null) { 433 dst.type = new ArrayList<CodeableConcept>(); 434 for (CodeableConcept i : type) 435 dst.type.add(i.copy()); 436 }; 437 if (mimeType != null) { 438 dst.mimeType = new ArrayList<CodeType>(); 439 for (CodeType i : mimeType) 440 dst.mimeType.add(i.copy()); 441 }; 442 } 443 444 @Override 445 public boolean equalsDeep(Base other_) { 446 if (!super.equalsDeep(other_)) 447 return false; 448 if (!(other_ instanceof EndpointPayloadComponent)) 449 return false; 450 EndpointPayloadComponent o = (EndpointPayloadComponent) other_; 451 return compareDeep(type, o.type, true) && compareDeep(mimeType, o.mimeType, true); 452 } 453 454 @Override 455 public boolean equalsShallow(Base other_) { 456 if (!super.equalsShallow(other_)) 457 return false; 458 if (!(other_ instanceof EndpointPayloadComponent)) 459 return false; 460 EndpointPayloadComponent o = (EndpointPayloadComponent) other_; 461 return compareValues(mimeType, o.mimeType, true); 462 } 463 464 public boolean isEmpty() { 465 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, mimeType); 466 } 467 468 public String fhirType() { 469 return "Endpoint.payload"; 470 471 } 472 473 } 474 475 /** 476 * Identifier for the organization that is used to identify the endpoint across multiple disparate systems. 477 */ 478 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 479 @Description(shortDefinition="Identifies this endpoint across multiple systems", formalDefinition="Identifier for the organization that is used to identify the endpoint across multiple disparate systems." ) 480 protected List<Identifier> identifier; 481 482 /** 483 * The endpoint status represents the general expected availability of an endpoint. 484 */ 485 @Child(name = "status", type = {CodeType.class}, order=1, min=1, max=1, modifier=true, summary=true) 486 @Description(shortDefinition="active | suspended | error | off | entered-in-error | test", formalDefinition="The endpoint status represents the general expected availability of an endpoint." ) 487 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/endpoint-status") 488 protected Enumeration<EndpointStatus> status; 489 490 /** 491 * A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook). 492 */ 493 @Child(name = "connectionType", type = {CodeableConcept.class}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 494 @Description(shortDefinition="Protocol/Profile/Standard to be used with this endpoint connection", formalDefinition="A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook)." ) 495 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/endpoint-connection-type") 496 protected List<CodeableConcept> connectionType; 497 498 /** 499 * A friendly name that this endpoint can be referred to with. 500 */ 501 @Child(name = "name", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 502 @Description(shortDefinition="A name that this endpoint can be identified by", formalDefinition="A friendly name that this endpoint can be referred to with." ) 503 protected StringType name; 504 505 /** 506 * The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose). 507 */ 508 @Child(name = "description", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=true) 509 @Description(shortDefinition="Additional details about the endpoint that could be displayed as further information to identify the description beyond its name", formalDefinition="The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose)." ) 510 protected StringType description; 511 512 /** 513 * The type of environment(s) exposed at this endpoint (dev, prod, test, etc.). 514 */ 515 @Child(name = "environmentType", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 516 @Description(shortDefinition="The type of environment(s) exposed at this endpoint", formalDefinition="The type of environment(s) exposed at this endpoint (dev, prod, test, etc.)." ) 517 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/endpoint-environment") 518 protected List<CodeableConcept> environmentType; 519 520 /** 521 * The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data). 522 */ 523 @Child(name = "managingOrganization", type = {Organization.class}, order=6, min=0, max=1, modifier=false, summary=true) 524 @Description(shortDefinition="Organization that manages this endpoint (might not be the organization that exposes the endpoint)", formalDefinition="The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data)." ) 525 protected Reference managingOrganization; 526 527 /** 528 * Contact details for a human to contact about the endpoint. The primary use of this for system administrator troubleshooting. 529 */ 530 @Child(name = "contact", type = {ContactPoint.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 531 @Description(shortDefinition="Contact details for source (e.g. troubleshooting)", formalDefinition="Contact details for a human to contact about the endpoint. The primary use of this for system administrator troubleshooting." ) 532 protected List<ContactPoint> contact; 533 534 /** 535 * The interval during which the endpoint is expected to be operational. 536 */ 537 @Child(name = "period", type = {Period.class}, order=8, min=0, max=1, modifier=false, summary=true) 538 @Description(shortDefinition="Interval the endpoint is expected to be operational", formalDefinition="The interval during which the endpoint is expected to be operational." ) 539 protected Period period; 540 541 /** 542 * The set of payloads that are provided/available at this endpoint. 543 */ 544 @Child(name = "payload", type = {}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 545 @Description(shortDefinition="Set of payloads that are provided by this endpoint", formalDefinition="The set of payloads that are provided/available at this endpoint." ) 546 protected List<EndpointPayloadComponent> payload; 547 548 /** 549 * The uri that describes the actual end-point to connect to. 550 */ 551 @Child(name = "address", type = {UrlType.class}, order=10, min=1, max=1, modifier=false, summary=true) 552 @Description(shortDefinition="The technical base address for connecting to this endpoint", formalDefinition="The uri that describes the actual end-point to connect to." ) 553 protected UrlType address; 554 555 /** 556 * Additional headers / information to send as part of the notification. 557 */ 558 @Child(name = "header", type = {StringType.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 559 @Description(shortDefinition="Usage depends on the channel type", formalDefinition="Additional headers / information to send as part of the notification." ) 560 protected List<StringType> header; 561 562 private static final long serialVersionUID = 1633700267L; 563 564 /** 565 * Constructor 566 */ 567 public Endpoint() { 568 super(); 569 } 570 571 /** 572 * Constructor 573 */ 574 public Endpoint(EndpointStatus status, CodeableConcept connectionType, String address) { 575 super(); 576 this.setStatus(status); 577 this.addConnectionType(connectionType); 578 this.setAddress(address); 579 } 580 581 /** 582 * @return {@link #identifier} (Identifier for the organization that is used to identify the endpoint across multiple disparate systems.) 583 */ 584 public List<Identifier> getIdentifier() { 585 if (this.identifier == null) 586 this.identifier = new ArrayList<Identifier>(); 587 return this.identifier; 588 } 589 590 /** 591 * @return Returns a reference to <code>this</code> for easy method chaining 592 */ 593 public Endpoint setIdentifier(List<Identifier> theIdentifier) { 594 this.identifier = theIdentifier; 595 return this; 596 } 597 598 public boolean hasIdentifier() { 599 if (this.identifier == null) 600 return false; 601 for (Identifier item : this.identifier) 602 if (!item.isEmpty()) 603 return true; 604 return false; 605 } 606 607 public Identifier addIdentifier() { //3 608 Identifier t = new Identifier(); 609 if (this.identifier == null) 610 this.identifier = new ArrayList<Identifier>(); 611 this.identifier.add(t); 612 return t; 613 } 614 615 public Endpoint addIdentifier(Identifier t) { //3 616 if (t == null) 617 return this; 618 if (this.identifier == null) 619 this.identifier = new ArrayList<Identifier>(); 620 this.identifier.add(t); 621 return this; 622 } 623 624 /** 625 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {3} 626 */ 627 public Identifier getIdentifierFirstRep() { 628 if (getIdentifier().isEmpty()) { 629 addIdentifier(); 630 } 631 return getIdentifier().get(0); 632 } 633 634 /** 635 * @return {@link #status} (The endpoint status represents the general expected availability of an endpoint.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 636 */ 637 public Enumeration<EndpointStatus> getStatusElement() { 638 if (this.status == null) 639 if (Configuration.errorOnAutoCreate()) 640 throw new Error("Attempt to auto-create Endpoint.status"); 641 else if (Configuration.doAutoCreate()) 642 this.status = new Enumeration<EndpointStatus>(new EndpointStatusEnumFactory()); // bb 643 return this.status; 644 } 645 646 public boolean hasStatusElement() { 647 return this.status != null && !this.status.isEmpty(); 648 } 649 650 public boolean hasStatus() { 651 return this.status != null && !this.status.isEmpty(); 652 } 653 654 /** 655 * @param value {@link #status} (The endpoint status represents the general expected availability of an endpoint.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 656 */ 657 public Endpoint setStatusElement(Enumeration<EndpointStatus> value) { 658 this.status = value; 659 return this; 660 } 661 662 /** 663 * @return The endpoint status represents the general expected availability of an endpoint. 664 */ 665 public EndpointStatus getStatus() { 666 return this.status == null ? null : this.status.getValue(); 667 } 668 669 /** 670 * @param value The endpoint status represents the general expected availability of an endpoint. 671 */ 672 public Endpoint setStatus(EndpointStatus value) { 673 if (this.status == null) 674 this.status = new Enumeration<EndpointStatus>(new EndpointStatusEnumFactory()); 675 this.status.setValue(value); 676 return this; 677 } 678 679 /** 680 * @return {@link #connectionType} (A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).) 681 */ 682 public List<CodeableConcept> getConnectionType() { 683 if (this.connectionType == null) 684 this.connectionType = new ArrayList<CodeableConcept>(); 685 return this.connectionType; 686 } 687 688 /** 689 * @return Returns a reference to <code>this</code> for easy method chaining 690 */ 691 public Endpoint setConnectionType(List<CodeableConcept> theConnectionType) { 692 this.connectionType = theConnectionType; 693 return this; 694 } 695 696 public boolean hasConnectionType() { 697 if (this.connectionType == null) 698 return false; 699 for (CodeableConcept item : this.connectionType) 700 if (!item.isEmpty()) 701 return true; 702 return false; 703 } 704 705 public CodeableConcept addConnectionType() { //3 706 CodeableConcept t = new CodeableConcept(); 707 if (this.connectionType == null) 708 this.connectionType = new ArrayList<CodeableConcept>(); 709 this.connectionType.add(t); 710 return t; 711 } 712 713 public Endpoint addConnectionType(CodeableConcept t) { //3 714 if (t == null) 715 return this; 716 if (this.connectionType == null) 717 this.connectionType = new ArrayList<CodeableConcept>(); 718 this.connectionType.add(t); 719 return this; 720 } 721 722 /** 723 * @return The first repetition of repeating field {@link #connectionType}, creating it if it does not already exist {3} 724 */ 725 public CodeableConcept getConnectionTypeFirstRep() { 726 if (getConnectionType().isEmpty()) { 727 addConnectionType(); 728 } 729 return getConnectionType().get(0); 730 } 731 732 /** 733 * @return {@link #name} (A friendly name that this endpoint can be referred to with.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 734 */ 735 public StringType getNameElement() { 736 if (this.name == null) 737 if (Configuration.errorOnAutoCreate()) 738 throw new Error("Attempt to auto-create Endpoint.name"); 739 else if (Configuration.doAutoCreate()) 740 this.name = new StringType(); // bb 741 return this.name; 742 } 743 744 public boolean hasNameElement() { 745 return this.name != null && !this.name.isEmpty(); 746 } 747 748 public boolean hasName() { 749 return this.name != null && !this.name.isEmpty(); 750 } 751 752 /** 753 * @param value {@link #name} (A friendly name that this endpoint can be referred to with.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 754 */ 755 public Endpoint setNameElement(StringType value) { 756 this.name = value; 757 return this; 758 } 759 760 /** 761 * @return A friendly name that this endpoint can be referred to with. 762 */ 763 public String getName() { 764 return this.name == null ? null : this.name.getValue(); 765 } 766 767 /** 768 * @param value A friendly name that this endpoint can be referred to with. 769 */ 770 public Endpoint setName(String value) { 771 if (Utilities.noString(value)) 772 this.name = null; 773 else { 774 if (this.name == null) 775 this.name = new StringType(); 776 this.name.setValue(value); 777 } 778 return this; 779 } 780 781 /** 782 * @return {@link #description} (The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose).). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 783 */ 784 public StringType getDescriptionElement() { 785 if (this.description == null) 786 if (Configuration.errorOnAutoCreate()) 787 throw new Error("Attempt to auto-create Endpoint.description"); 788 else if (Configuration.doAutoCreate()) 789 this.description = new StringType(); // bb 790 return this.description; 791 } 792 793 public boolean hasDescriptionElement() { 794 return this.description != null && !this.description.isEmpty(); 795 } 796 797 public boolean hasDescription() { 798 return this.description != null && !this.description.isEmpty(); 799 } 800 801 /** 802 * @param value {@link #description} (The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose).). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 803 */ 804 public Endpoint setDescriptionElement(StringType value) { 805 this.description = value; 806 return this; 807 } 808 809 /** 810 * @return The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose). 811 */ 812 public String getDescription() { 813 return this.description == null ? null : this.description.getValue(); 814 } 815 816 /** 817 * @param value The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose). 818 */ 819 public Endpoint setDescription(String value) { 820 if (Utilities.noString(value)) 821 this.description = null; 822 else { 823 if (this.description == null) 824 this.description = new StringType(); 825 this.description.setValue(value); 826 } 827 return this; 828 } 829 830 /** 831 * @return {@link #environmentType} (The type of environment(s) exposed at this endpoint (dev, prod, test, etc.).) 832 */ 833 public List<CodeableConcept> getEnvironmentType() { 834 if (this.environmentType == null) 835 this.environmentType = new ArrayList<CodeableConcept>(); 836 return this.environmentType; 837 } 838 839 /** 840 * @return Returns a reference to <code>this</code> for easy method chaining 841 */ 842 public Endpoint setEnvironmentType(List<CodeableConcept> theEnvironmentType) { 843 this.environmentType = theEnvironmentType; 844 return this; 845 } 846 847 public boolean hasEnvironmentType() { 848 if (this.environmentType == null) 849 return false; 850 for (CodeableConcept item : this.environmentType) 851 if (!item.isEmpty()) 852 return true; 853 return false; 854 } 855 856 public CodeableConcept addEnvironmentType() { //3 857 CodeableConcept t = new CodeableConcept(); 858 if (this.environmentType == null) 859 this.environmentType = new ArrayList<CodeableConcept>(); 860 this.environmentType.add(t); 861 return t; 862 } 863 864 public Endpoint addEnvironmentType(CodeableConcept t) { //3 865 if (t == null) 866 return this; 867 if (this.environmentType == null) 868 this.environmentType = new ArrayList<CodeableConcept>(); 869 this.environmentType.add(t); 870 return this; 871 } 872 873 /** 874 * @return The first repetition of repeating field {@link #environmentType}, creating it if it does not already exist {3} 875 */ 876 public CodeableConcept getEnvironmentTypeFirstRep() { 877 if (getEnvironmentType().isEmpty()) { 878 addEnvironmentType(); 879 } 880 return getEnvironmentType().get(0); 881 } 882 883 /** 884 * @return {@link #managingOrganization} (The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).) 885 */ 886 public Reference getManagingOrganization() { 887 if (this.managingOrganization == null) 888 if (Configuration.errorOnAutoCreate()) 889 throw new Error("Attempt to auto-create Endpoint.managingOrganization"); 890 else if (Configuration.doAutoCreate()) 891 this.managingOrganization = new Reference(); // cc 892 return this.managingOrganization; 893 } 894 895 public boolean hasManagingOrganization() { 896 return this.managingOrganization != null && !this.managingOrganization.isEmpty(); 897 } 898 899 /** 900 * @param value {@link #managingOrganization} (The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).) 901 */ 902 public Endpoint setManagingOrganization(Reference value) { 903 this.managingOrganization = value; 904 return this; 905 } 906 907 /** 908 * @return {@link #contact} (Contact details for a human to contact about the endpoint. The primary use of this for system administrator troubleshooting.) 909 */ 910 public List<ContactPoint> getContact() { 911 if (this.contact == null) 912 this.contact = new ArrayList<ContactPoint>(); 913 return this.contact; 914 } 915 916 /** 917 * @return Returns a reference to <code>this</code> for easy method chaining 918 */ 919 public Endpoint setContact(List<ContactPoint> theContact) { 920 this.contact = theContact; 921 return this; 922 } 923 924 public boolean hasContact() { 925 if (this.contact == null) 926 return false; 927 for (ContactPoint item : this.contact) 928 if (!item.isEmpty()) 929 return true; 930 return false; 931 } 932 933 public ContactPoint addContact() { //3 934 ContactPoint t = new ContactPoint(); 935 if (this.contact == null) 936 this.contact = new ArrayList<ContactPoint>(); 937 this.contact.add(t); 938 return t; 939 } 940 941 public Endpoint addContact(ContactPoint t) { //3 942 if (t == null) 943 return this; 944 if (this.contact == null) 945 this.contact = new ArrayList<ContactPoint>(); 946 this.contact.add(t); 947 return this; 948 } 949 950 /** 951 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {3} 952 */ 953 public ContactPoint getContactFirstRep() { 954 if (getContact().isEmpty()) { 955 addContact(); 956 } 957 return getContact().get(0); 958 } 959 960 /** 961 * @return {@link #period} (The interval during which the endpoint is expected to be operational.) 962 */ 963 public Period getPeriod() { 964 if (this.period == null) 965 if (Configuration.errorOnAutoCreate()) 966 throw new Error("Attempt to auto-create Endpoint.period"); 967 else if (Configuration.doAutoCreate()) 968 this.period = new Period(); // cc 969 return this.period; 970 } 971 972 public boolean hasPeriod() { 973 return this.period != null && !this.period.isEmpty(); 974 } 975 976 /** 977 * @param value {@link #period} (The interval during which the endpoint is expected to be operational.) 978 */ 979 public Endpoint setPeriod(Period value) { 980 this.period = value; 981 return this; 982 } 983 984 /** 985 * @return {@link #payload} (The set of payloads that are provided/available at this endpoint.) 986 */ 987 public List<EndpointPayloadComponent> getPayload() { 988 if (this.payload == null) 989 this.payload = new ArrayList<EndpointPayloadComponent>(); 990 return this.payload; 991 } 992 993 /** 994 * @return Returns a reference to <code>this</code> for easy method chaining 995 */ 996 public Endpoint setPayload(List<EndpointPayloadComponent> thePayload) { 997 this.payload = thePayload; 998 return this; 999 } 1000 1001 public boolean hasPayload() { 1002 if (this.payload == null) 1003 return false; 1004 for (EndpointPayloadComponent item : this.payload) 1005 if (!item.isEmpty()) 1006 return true; 1007 return false; 1008 } 1009 1010 public EndpointPayloadComponent addPayload() { //3 1011 EndpointPayloadComponent t = new EndpointPayloadComponent(); 1012 if (this.payload == null) 1013 this.payload = new ArrayList<EndpointPayloadComponent>(); 1014 this.payload.add(t); 1015 return t; 1016 } 1017 1018 public Endpoint addPayload(EndpointPayloadComponent t) { //3 1019 if (t == null) 1020 return this; 1021 if (this.payload == null) 1022 this.payload = new ArrayList<EndpointPayloadComponent>(); 1023 this.payload.add(t); 1024 return this; 1025 } 1026 1027 /** 1028 * @return The first repetition of repeating field {@link #payload}, creating it if it does not already exist {3} 1029 */ 1030 public EndpointPayloadComponent getPayloadFirstRep() { 1031 if (getPayload().isEmpty()) { 1032 addPayload(); 1033 } 1034 return getPayload().get(0); 1035 } 1036 1037 /** 1038 * @return {@link #address} (The uri that describes the actual end-point to connect to.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value 1039 */ 1040 public UrlType getAddressElement() { 1041 if (this.address == null) 1042 if (Configuration.errorOnAutoCreate()) 1043 throw new Error("Attempt to auto-create Endpoint.address"); 1044 else if (Configuration.doAutoCreate()) 1045 this.address = new UrlType(); // bb 1046 return this.address; 1047 } 1048 1049 public boolean hasAddressElement() { 1050 return this.address != null && !this.address.isEmpty(); 1051 } 1052 1053 public boolean hasAddress() { 1054 return this.address != null && !this.address.isEmpty(); 1055 } 1056 1057 /** 1058 * @param value {@link #address} (The uri that describes the actual end-point to connect to.). This is the underlying object with id, value and extensions. The accessor "getAddress" gives direct access to the value 1059 */ 1060 public Endpoint setAddressElement(UrlType value) { 1061 this.address = value; 1062 return this; 1063 } 1064 1065 /** 1066 * @return The uri that describes the actual end-point to connect to. 1067 */ 1068 public String getAddress() { 1069 return this.address == null ? null : this.address.getValue(); 1070 } 1071 1072 /** 1073 * @param value The uri that describes the actual end-point to connect to. 1074 */ 1075 public Endpoint setAddress(String value) { 1076 if (this.address == null) 1077 this.address = new UrlType(); 1078 this.address.setValue(value); 1079 return this; 1080 } 1081 1082 /** 1083 * @return {@link #header} (Additional headers / information to send as part of the notification.) 1084 */ 1085 public List<StringType> getHeader() { 1086 if (this.header == null) 1087 this.header = new ArrayList<StringType>(); 1088 return this.header; 1089 } 1090 1091 /** 1092 * @return Returns a reference to <code>this</code> for easy method chaining 1093 */ 1094 public Endpoint setHeader(List<StringType> theHeader) { 1095 this.header = theHeader; 1096 return this; 1097 } 1098 1099 public boolean hasHeader() { 1100 if (this.header == null) 1101 return false; 1102 for (StringType item : this.header) 1103 if (!item.isEmpty()) 1104 return true; 1105 return false; 1106 } 1107 1108 /** 1109 * @return {@link #header} (Additional headers / information to send as part of the notification.) 1110 */ 1111 public StringType addHeaderElement() {//2 1112 StringType t = new StringType(); 1113 if (this.header == null) 1114 this.header = new ArrayList<StringType>(); 1115 this.header.add(t); 1116 return t; 1117 } 1118 1119 /** 1120 * @param value {@link #header} (Additional headers / information to send as part of the notification.) 1121 */ 1122 public Endpoint addHeader(String value) { //1 1123 StringType t = new StringType(); 1124 t.setValue(value); 1125 if (this.header == null) 1126 this.header = new ArrayList<StringType>(); 1127 this.header.add(t); 1128 return this; 1129 } 1130 1131 /** 1132 * @param value {@link #header} (Additional headers / information to send as part of the notification.) 1133 */ 1134 public boolean hasHeader(String value) { 1135 if (this.header == null) 1136 return false; 1137 for (StringType v : this.header) 1138 if (v.getValue().equals(value)) // string 1139 return true; 1140 return false; 1141 } 1142 1143 protected void listChildren(List<Property> children) { 1144 super.listChildren(children); 1145 children.add(new Property("identifier", "Identifier", "Identifier for the organization that is used to identify the endpoint across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier)); 1146 children.add(new Property("status", "code", "The endpoint status represents the general expected availability of an endpoint.", 0, 1, status)); 1147 children.add(new Property("connectionType", "CodeableConcept", "A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).", 0, java.lang.Integer.MAX_VALUE, connectionType)); 1148 children.add(new Property("name", "string", "A friendly name that this endpoint can be referred to with.", 0, 1, name)); 1149 children.add(new Property("description", "string", "The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose).", 0, 1, description)); 1150 children.add(new Property("environmentType", "CodeableConcept", "The type of environment(s) exposed at this endpoint (dev, prod, test, etc.).", 0, java.lang.Integer.MAX_VALUE, environmentType)); 1151 children.add(new Property("managingOrganization", "Reference(Organization)", "The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).", 0, 1, managingOrganization)); 1152 children.add(new Property("contact", "ContactPoint", "Contact details for a human to contact about the endpoint. The primary use of this for system administrator troubleshooting.", 0, java.lang.Integer.MAX_VALUE, contact)); 1153 children.add(new Property("period", "Period", "The interval during which the endpoint is expected to be operational.", 0, 1, period)); 1154 children.add(new Property("payload", "", "The set of payloads that are provided/available at this endpoint.", 0, java.lang.Integer.MAX_VALUE, payload)); 1155 children.add(new Property("address", "url", "The uri that describes the actual end-point to connect to.", 0, 1, address)); 1156 children.add(new Property("header", "string", "Additional headers / information to send as part of the notification.", 0, java.lang.Integer.MAX_VALUE, header)); 1157 } 1158 1159 @Override 1160 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1161 switch (_hash) { 1162 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "Identifier for the organization that is used to identify the endpoint across multiple disparate systems.", 0, java.lang.Integer.MAX_VALUE, identifier); 1163 case -892481550: /*status*/ return new Property("status", "code", "The endpoint status represents the general expected availability of an endpoint.", 0, 1, status); 1164 case 1270211384: /*connectionType*/ return new Property("connectionType", "CodeableConcept", "A coded value that represents the technical details of the usage of this endpoint, such as what WSDLs should be used in what way. (e.g. XDS.b/DICOM/cds-hook).", 0, java.lang.Integer.MAX_VALUE, connectionType); 1165 case 3373707: /*name*/ return new Property("name", "string", "A friendly name that this endpoint can be referred to with.", 0, 1, name); 1166 case -1724546052: /*description*/ return new Property("description", "string", "The description of the endpoint and what it is for (typically used as supplemental information in an endpoint directory describing its usage/purpose).", 0, 1, description); 1167 case 1680602093: /*environmentType*/ return new Property("environmentType", "CodeableConcept", "The type of environment(s) exposed at this endpoint (dev, prod, test, etc.).", 0, java.lang.Integer.MAX_VALUE, environmentType); 1168 case -2058947787: /*managingOrganization*/ return new Property("managingOrganization", "Reference(Organization)", "The organization that manages this endpoint (even if technically another organization is hosting this in the cloud, it is the organization associated with the data).", 0, 1, managingOrganization); 1169 case 951526432: /*contact*/ return new Property("contact", "ContactPoint", "Contact details for a human to contact about the endpoint. The primary use of this for system administrator troubleshooting.", 0, java.lang.Integer.MAX_VALUE, contact); 1170 case -991726143: /*period*/ return new Property("period", "Period", "The interval during which the endpoint is expected to be operational.", 0, 1, period); 1171 case -786701938: /*payload*/ return new Property("payload", "", "The set of payloads that are provided/available at this endpoint.", 0, java.lang.Integer.MAX_VALUE, payload); 1172 case -1147692044: /*address*/ return new Property("address", "url", "The uri that describes the actual end-point to connect to.", 0, 1, address); 1173 case -1221270899: /*header*/ return new Property("header", "string", "Additional headers / information to send as part of the notification.", 0, java.lang.Integer.MAX_VALUE, header); 1174 default: return super.getNamedProperty(_hash, _name, _checkValid); 1175 } 1176 1177 } 1178 1179 @Override 1180 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1181 switch (hash) { 1182 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier 1183 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<EndpointStatus> 1184 case 1270211384: /*connectionType*/ return this.connectionType == null ? new Base[0] : this.connectionType.toArray(new Base[this.connectionType.size()]); // CodeableConcept 1185 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1186 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1187 case 1680602093: /*environmentType*/ return this.environmentType == null ? new Base[0] : this.environmentType.toArray(new Base[this.environmentType.size()]); // CodeableConcept 1188 case -2058947787: /*managingOrganization*/ return this.managingOrganization == null ? new Base[0] : new Base[] {this.managingOrganization}; // Reference 1189 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactPoint 1190 case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period 1191 case -786701938: /*payload*/ return this.payload == null ? new Base[0] : this.payload.toArray(new Base[this.payload.size()]); // EndpointPayloadComponent 1192 case -1147692044: /*address*/ return this.address == null ? new Base[0] : new Base[] {this.address}; // UrlType 1193 case -1221270899: /*header*/ return this.header == null ? new Base[0] : this.header.toArray(new Base[this.header.size()]); // StringType 1194 default: return super.getProperty(hash, name, checkValid); 1195 } 1196 1197 } 1198 1199 @Override 1200 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1201 switch (hash) { 1202 case -1618432855: // identifier 1203 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); // Identifier 1204 return value; 1205 case -892481550: // status 1206 value = new EndpointStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1207 this.status = (Enumeration) value; // Enumeration<EndpointStatus> 1208 return value; 1209 case 1270211384: // connectionType 1210 this.getConnectionType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1211 return value; 1212 case 3373707: // name 1213 this.name = TypeConvertor.castToString(value); // StringType 1214 return value; 1215 case -1724546052: // description 1216 this.description = TypeConvertor.castToString(value); // StringType 1217 return value; 1218 case 1680602093: // environmentType 1219 this.getEnvironmentType().add(TypeConvertor.castToCodeableConcept(value)); // CodeableConcept 1220 return value; 1221 case -2058947787: // managingOrganization 1222 this.managingOrganization = TypeConvertor.castToReference(value); // Reference 1223 return value; 1224 case 951526432: // contact 1225 this.getContact().add(TypeConvertor.castToContactPoint(value)); // ContactPoint 1226 return value; 1227 case -991726143: // period 1228 this.period = TypeConvertor.castToPeriod(value); // Period 1229 return value; 1230 case -786701938: // payload 1231 this.getPayload().add((EndpointPayloadComponent) value); // EndpointPayloadComponent 1232 return value; 1233 case -1147692044: // address 1234 this.address = TypeConvertor.castToUrl(value); // UrlType 1235 return value; 1236 case -1221270899: // header 1237 this.getHeader().add(TypeConvertor.castToString(value)); // StringType 1238 return value; 1239 default: return super.setProperty(hash, name, value); 1240 } 1241 1242 } 1243 1244 @Override 1245 public Base setProperty(String name, Base value) throws FHIRException { 1246 if (name.equals("identifier")) { 1247 this.getIdentifier().add(TypeConvertor.castToIdentifier(value)); 1248 } else if (name.equals("status")) { 1249 value = new EndpointStatusEnumFactory().fromType(TypeConvertor.castToCode(value)); 1250 this.status = (Enumeration) value; // Enumeration<EndpointStatus> 1251 } else if (name.equals("connectionType")) { 1252 this.getConnectionType().add(TypeConvertor.castToCodeableConcept(value)); 1253 } else if (name.equals("name")) { 1254 this.name = TypeConvertor.castToString(value); // StringType 1255 } else if (name.equals("description")) { 1256 this.description = TypeConvertor.castToString(value); // StringType 1257 } else if (name.equals("environmentType")) { 1258 this.getEnvironmentType().add(TypeConvertor.castToCodeableConcept(value)); 1259 } else if (name.equals("managingOrganization")) { 1260 this.managingOrganization = TypeConvertor.castToReference(value); // Reference 1261 } else if (name.equals("contact")) { 1262 this.getContact().add(TypeConvertor.castToContactPoint(value)); 1263 } else if (name.equals("period")) { 1264 this.period = TypeConvertor.castToPeriod(value); // Period 1265 } else if (name.equals("payload")) { 1266 this.getPayload().add((EndpointPayloadComponent) value); 1267 } else if (name.equals("address")) { 1268 this.address = TypeConvertor.castToUrl(value); // UrlType 1269 } else if (name.equals("header")) { 1270 this.getHeader().add(TypeConvertor.castToString(value)); 1271 } else 1272 return super.setProperty(name, value); 1273 return value; 1274 } 1275 1276 @Override 1277 public Base makeProperty(int hash, String name) throws FHIRException { 1278 switch (hash) { 1279 case -1618432855: return addIdentifier(); 1280 case -892481550: return getStatusElement(); 1281 case 1270211384: return addConnectionType(); 1282 case 3373707: return getNameElement(); 1283 case -1724546052: return getDescriptionElement(); 1284 case 1680602093: return addEnvironmentType(); 1285 case -2058947787: return getManagingOrganization(); 1286 case 951526432: return addContact(); 1287 case -991726143: return getPeriod(); 1288 case -786701938: return addPayload(); 1289 case -1147692044: return getAddressElement(); 1290 case -1221270899: return addHeaderElement(); 1291 default: return super.makeProperty(hash, name); 1292 } 1293 1294 } 1295 1296 @Override 1297 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1298 switch (hash) { 1299 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 1300 case -892481550: /*status*/ return new String[] {"code"}; 1301 case 1270211384: /*connectionType*/ return new String[] {"CodeableConcept"}; 1302 case 3373707: /*name*/ return new String[] {"string"}; 1303 case -1724546052: /*description*/ return new String[] {"string"}; 1304 case 1680602093: /*environmentType*/ return new String[] {"CodeableConcept"}; 1305 case -2058947787: /*managingOrganization*/ return new String[] {"Reference"}; 1306 case 951526432: /*contact*/ return new String[] {"ContactPoint"}; 1307 case -991726143: /*period*/ return new String[] {"Period"}; 1308 case -786701938: /*payload*/ return new String[] {}; 1309 case -1147692044: /*address*/ return new String[] {"url"}; 1310 case -1221270899: /*header*/ return new String[] {"string"}; 1311 default: return super.getTypesForProperty(hash, name); 1312 } 1313 1314 } 1315 1316 @Override 1317 public Base addChild(String name) throws FHIRException { 1318 if (name.equals("identifier")) { 1319 return addIdentifier(); 1320 } 1321 else if (name.equals("status")) { 1322 throw new FHIRException("Cannot call addChild on a singleton property Endpoint.status"); 1323 } 1324 else if (name.equals("connectionType")) { 1325 return addConnectionType(); 1326 } 1327 else if (name.equals("name")) { 1328 throw new FHIRException("Cannot call addChild on a singleton property Endpoint.name"); 1329 } 1330 else if (name.equals("description")) { 1331 throw new FHIRException("Cannot call addChild on a singleton property Endpoint.description"); 1332 } 1333 else if (name.equals("environmentType")) { 1334 return addEnvironmentType(); 1335 } 1336 else if (name.equals("managingOrganization")) { 1337 this.managingOrganization = new Reference(); 1338 return this.managingOrganization; 1339 } 1340 else if (name.equals("contact")) { 1341 return addContact(); 1342 } 1343 else if (name.equals("period")) { 1344 this.period = new Period(); 1345 return this.period; 1346 } 1347 else if (name.equals("payload")) { 1348 return addPayload(); 1349 } 1350 else if (name.equals("address")) { 1351 throw new FHIRException("Cannot call addChild on a singleton property Endpoint.address"); 1352 } 1353 else if (name.equals("header")) { 1354 throw new FHIRException("Cannot call addChild on a singleton property Endpoint.header"); 1355 } 1356 else 1357 return super.addChild(name); 1358 } 1359 1360 public String fhirType() { 1361 return "Endpoint"; 1362 1363 } 1364 1365 public Endpoint copy() { 1366 Endpoint dst = new Endpoint(); 1367 copyValues(dst); 1368 return dst; 1369 } 1370 1371 public void copyValues(Endpoint dst) { 1372 super.copyValues(dst); 1373 if (identifier != null) { 1374 dst.identifier = new ArrayList<Identifier>(); 1375 for (Identifier i : identifier) 1376 dst.identifier.add(i.copy()); 1377 }; 1378 dst.status = status == null ? null : status.copy(); 1379 if (connectionType != null) { 1380 dst.connectionType = new ArrayList<CodeableConcept>(); 1381 for (CodeableConcept i : connectionType) 1382 dst.connectionType.add(i.copy()); 1383 }; 1384 dst.name = name == null ? null : name.copy(); 1385 dst.description = description == null ? null : description.copy(); 1386 if (environmentType != null) { 1387 dst.environmentType = new ArrayList<CodeableConcept>(); 1388 for (CodeableConcept i : environmentType) 1389 dst.environmentType.add(i.copy()); 1390 }; 1391 dst.managingOrganization = managingOrganization == null ? null : managingOrganization.copy(); 1392 if (contact != null) { 1393 dst.contact = new ArrayList<ContactPoint>(); 1394 for (ContactPoint i : contact) 1395 dst.contact.add(i.copy()); 1396 }; 1397 dst.period = period == null ? null : period.copy(); 1398 if (payload != null) { 1399 dst.payload = new ArrayList<EndpointPayloadComponent>(); 1400 for (EndpointPayloadComponent i : payload) 1401 dst.payload.add(i.copy()); 1402 }; 1403 dst.address = address == null ? null : address.copy(); 1404 if (header != null) { 1405 dst.header = new ArrayList<StringType>(); 1406 for (StringType i : header) 1407 dst.header.add(i.copy()); 1408 }; 1409 } 1410 1411 protected Endpoint typedCopy() { 1412 return copy(); 1413 } 1414 1415 @Override 1416 public boolean equalsDeep(Base other_) { 1417 if (!super.equalsDeep(other_)) 1418 return false; 1419 if (!(other_ instanceof Endpoint)) 1420 return false; 1421 Endpoint o = (Endpoint) other_; 1422 return compareDeep(identifier, o.identifier, true) && compareDeep(status, o.status, true) && compareDeep(connectionType, o.connectionType, true) 1423 && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(environmentType, o.environmentType, true) 1424 && compareDeep(managingOrganization, o.managingOrganization, true) && compareDeep(contact, o.contact, true) 1425 && compareDeep(period, o.period, true) && compareDeep(payload, o.payload, true) && compareDeep(address, o.address, true) 1426 && compareDeep(header, o.header, true); 1427 } 1428 1429 @Override 1430 public boolean equalsShallow(Base other_) { 1431 if (!super.equalsShallow(other_)) 1432 return false; 1433 if (!(other_ instanceof Endpoint)) 1434 return false; 1435 Endpoint o = (Endpoint) other_; 1436 return compareValues(status, o.status, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) 1437 && compareValues(address, o.address, true) && compareValues(header, o.header, true); 1438 } 1439 1440 public boolean isEmpty() { 1441 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, status, connectionType 1442 , name, description, environmentType, managingOrganization, contact, period, payload 1443 , address, header); 1444 } 1445 1446 @Override 1447 public ResourceType getResourceType() { 1448 return ResourceType.Endpoint; 1449 } 1450 1451 /** 1452 * Search parameter: <b>connection-type</b> 1453 * <p> 1454 * Description: <b>Protocol/Profile/Standard to be used with this endpoint connection</b><br> 1455 * Type: <b>token</b><br> 1456 * Path: <b>Endpoint.connectionType</b><br> 1457 * </p> 1458 */ 1459 @SearchParamDefinition(name="connection-type", path="Endpoint.connectionType", description="Protocol/Profile/Standard to be used with this endpoint connection", type="token" ) 1460 public static final String SP_CONNECTION_TYPE = "connection-type"; 1461 /** 1462 * <b>Fluent Client</b> search parameter constant for <b>connection-type</b> 1463 * <p> 1464 * Description: <b>Protocol/Profile/Standard to be used with this endpoint connection</b><br> 1465 * Type: <b>token</b><br> 1466 * Path: <b>Endpoint.connectionType</b><br> 1467 * </p> 1468 */ 1469 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONNECTION_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONNECTION_TYPE); 1470 1471 /** 1472 * Search parameter: <b>identifier</b> 1473 * <p> 1474 * Description: <b>Identifies this endpoint across multiple systems</b><br> 1475 * Type: <b>token</b><br> 1476 * Path: <b>Endpoint.identifier</b><br> 1477 * </p> 1478 */ 1479 @SearchParamDefinition(name="identifier", path="Endpoint.identifier", description="Identifies this endpoint across multiple systems", type="token" ) 1480 public static final String SP_IDENTIFIER = "identifier"; 1481 /** 1482 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 1483 * <p> 1484 * Description: <b>Identifies this endpoint across multiple systems</b><br> 1485 * Type: <b>token</b><br> 1486 * Path: <b>Endpoint.identifier</b><br> 1487 * </p> 1488 */ 1489 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 1490 1491 /** 1492 * Search parameter: <b>name</b> 1493 * <p> 1494 * Description: <b>A name that this endpoint can be identified by</b><br> 1495 * Type: <b>string</b><br> 1496 * Path: <b>Endpoint.name</b><br> 1497 * </p> 1498 */ 1499 @SearchParamDefinition(name="name", path="Endpoint.name", description="A name that this endpoint can be identified by", type="string" ) 1500 public static final String SP_NAME = "name"; 1501 /** 1502 * <b>Fluent Client</b> search parameter constant for <b>name</b> 1503 * <p> 1504 * Description: <b>A name that this endpoint can be identified by</b><br> 1505 * Type: <b>string</b><br> 1506 * Path: <b>Endpoint.name</b><br> 1507 * </p> 1508 */ 1509 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 1510 1511 /** 1512 * Search parameter: <b>organization</b> 1513 * <p> 1514 * Description: <b>The organization that is managing the endpoint</b><br> 1515 * Type: <b>reference</b><br> 1516 * Path: <b>Endpoint.managingOrganization</b><br> 1517 * </p> 1518 */ 1519 @SearchParamDefinition(name="organization", path="Endpoint.managingOrganization", description="The organization that is managing the endpoint", type="reference", target={Organization.class } ) 1520 public static final String SP_ORGANIZATION = "organization"; 1521 /** 1522 * <b>Fluent Client</b> search parameter constant for <b>organization</b> 1523 * <p> 1524 * Description: <b>The organization that is managing the endpoint</b><br> 1525 * Type: <b>reference</b><br> 1526 * Path: <b>Endpoint.managingOrganization</b><br> 1527 * </p> 1528 */ 1529 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam ORGANIZATION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_ORGANIZATION); 1530 1531/** 1532 * Constant for fluent queries to be used to add include statements. Specifies 1533 * the path value of "<b>Endpoint:organization</b>". 1534 */ 1535 public static final ca.uhn.fhir.model.api.Include INCLUDE_ORGANIZATION = new ca.uhn.fhir.model.api.Include("Endpoint:organization").toLocked(); 1536 1537 /** 1538 * Search parameter: <b>payload-type</b> 1539 * <p> 1540 * Description: <b>The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)</b><br> 1541 * Type: <b>token</b><br> 1542 * Path: <b>Endpoint.payload.type</b><br> 1543 * </p> 1544 */ 1545 @SearchParamDefinition(name="payload-type", path="Endpoint.payload.type", description="The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)", type="token" ) 1546 public static final String SP_PAYLOAD_TYPE = "payload-type"; 1547 /** 1548 * <b>Fluent Client</b> search parameter constant for <b>payload-type</b> 1549 * <p> 1550 * Description: <b>The type of content that may be used at this endpoint (e.g. XDS Discharge summaries)</b><br> 1551 * Type: <b>token</b><br> 1552 * Path: <b>Endpoint.payload.type</b><br> 1553 * </p> 1554 */ 1555 public static final ca.uhn.fhir.rest.gclient.TokenClientParam PAYLOAD_TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_PAYLOAD_TYPE); 1556 1557 /** 1558 * Search parameter: <b>status</b> 1559 * <p> 1560 * Description: <b>The current status of the Endpoint (usually expected to be active)</b><br> 1561 * Type: <b>token</b><br> 1562 * Path: <b>Endpoint.status</b><br> 1563 * </p> 1564 */ 1565 @SearchParamDefinition(name="status", path="Endpoint.status", description="The current status of the Endpoint (usually expected to be active)", type="token" ) 1566 public static final String SP_STATUS = "status"; 1567 /** 1568 * <b>Fluent Client</b> search parameter constant for <b>status</b> 1569 * <p> 1570 * Description: <b>The current status of the Endpoint (usually expected to be active)</b><br> 1571 * Type: <b>token</b><br> 1572 * Path: <b>Endpoint.status</b><br> 1573 * </p> 1574 */ 1575 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 1576 1577 1578} 1579