All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hl7.fhir.Subscription Maven / Gradle / Ivy

Go to download

The quick library for the Clinical Quality Language Java reference implementation

There is a newer version: 3.18.0
Show newest version
//
// This file was generated by the Eclipse Implementation of JAXB, v3.0.2 
// See https://eclipse-ee4j.github.io/jaxb-ri 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2024.03.21 at 12:42:34 PM MDT 
//


package org.hl7.fhir;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlElement;
import jakarta.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;


/**
 * If the element is present, it must have either a @value, an @id, or extensions
 * 
 * 

Java class for Subscription complex type. * *

The following schema fragment specifies the expected content contained within this class. * *

 * <complexType name="Subscription">
 *   <complexContent>
 *     <extension base="{http://hl7.org/fhir}DomainResource">
 *       <sequence>
 *         <element name="criteria" type="{http://hl7.org/fhir}string"/>
 *         <element name="contact" type="{http://hl7.org/fhir}ContactPoint" maxOccurs="unbounded" minOccurs="0"/>
 *         <element name="reason" type="{http://hl7.org/fhir}string"/>
 *         <element name="status" type="{http://hl7.org/fhir}SubscriptionStatus"/>
 *         <element name="error" type="{http://hl7.org/fhir}string" minOccurs="0"/>
 *         <element name="channel" type="{http://hl7.org/fhir}Subscription.Channel"/>
 *         <element name="end" type="{http://hl7.org/fhir}instant" minOccurs="0"/>
 *         <element name="tag" type="{http://hl7.org/fhir}Coding" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 * 
* * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Subscription", propOrder = { "criteria", "contact", "reason", "status", "error", "channel", "end", "tag" }) public class Subscription extends DomainResource implements Equals2, HashCode2, ToString2 { @XmlElement(required = true) protected org.hl7.fhir.String criteria; protected List contact; @XmlElement(required = true) protected org.hl7.fhir.String reason; @XmlElement(required = true) protected SubscriptionStatus status; protected org.hl7.fhir.String error; @XmlElement(required = true) protected SubscriptionChannel channel; protected Instant end; protected List tag; /** * Gets the value of the criteria property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getCriteria() { return criteria; } /** * Sets the value of the criteria property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setCriteria(org.hl7.fhir.String value) { this.criteria = value; } /** * Gets the value of the contact property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the Jakarta XML Binding object. * This is why there is not a set method for the contact property. * *

* For example, to add a new item, do as follows: *

     *    getContact().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link ContactPoint } * * */ public List getContact() { if (contact == null) { contact = new ArrayList(); } return this.contact; } /** * Gets the value of the reason property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getReason() { return reason; } /** * Sets the value of the reason property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setReason(org.hl7.fhir.String value) { this.reason = value; } /** * Gets the value of the status property. * * @return * possible object is * {@link SubscriptionStatus } * */ public SubscriptionStatus getStatus() { return status; } /** * Sets the value of the status property. * * @param value * allowed object is * {@link SubscriptionStatus } * */ public void setStatus(SubscriptionStatus value) { this.status = value; } /** * Gets the value of the error property. * * @return * possible object is * {@link org.hl7.fhir.String } * */ public org.hl7.fhir.String getError() { return error; } /** * Sets the value of the error property. * * @param value * allowed object is * {@link org.hl7.fhir.String } * */ public void setError(org.hl7.fhir.String value) { this.error = value; } /** * Gets the value of the channel property. * * @return * possible object is * {@link SubscriptionChannel } * */ public SubscriptionChannel getChannel() { return channel; } /** * Sets the value of the channel property. * * @param value * allowed object is * {@link SubscriptionChannel } * */ public void setChannel(SubscriptionChannel value) { this.channel = value; } /** * Gets the value of the end property. * * @return * possible object is * {@link Instant } * */ public Instant getEnd() { return end; } /** * Sets the value of the end property. * * @param value * allowed object is * {@link Instant } * */ public void setEnd(Instant value) { this.end = value; } /** * Gets the value of the tag property. * *

* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the Jakarta XML Binding object. * This is why there is not a set method for the tag property. * *

* For example, to add a new item, do as follows: *

     *    getTag().add(newItem);
     * 
* * *

* Objects of the following type(s) are allowed in the list * {@link Coding } * * */ public List getTag() { if (tag == null) { tag = new ArrayList(); } return this.tag; } public Subscription withCriteria(org.hl7.fhir.String value) { setCriteria(value); return this; } public Subscription withContact(ContactPoint... values) { if (values!= null) { for (ContactPoint value: values) { getContact().add(value); } } return this; } public Subscription withContact(Collection values) { if (values!= null) { getContact().addAll(values); } return this; } public Subscription withReason(org.hl7.fhir.String value) { setReason(value); return this; } public Subscription withStatus(SubscriptionStatus value) { setStatus(value); return this; } public Subscription withError(org.hl7.fhir.String value) { setError(value); return this; } public Subscription withChannel(SubscriptionChannel value) { setChannel(value); return this; } public Subscription withEnd(Instant value) { setEnd(value); return this; } public Subscription withTag(Coding... values) { if (values!= null) { for (Coding value: values) { getTag().add(value); } } return this; } public Subscription withTag(Collection values) { if (values!= null) { getTag().addAll(values); } return this; } @Override public Subscription withText(Narrative value) { setText(value); return this; } @Override public Subscription withContained(ResourceContainer... values) { if (values!= null) { for (ResourceContainer value: values) { getContained().add(value); } } return this; } @Override public Subscription withContained(Collection values) { if (values!= null) { getContained().addAll(values); } return this; } @Override public Subscription withExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getExtension().add(value); } } return this; } @Override public Subscription withExtension(Collection values) { if (values!= null) { getExtension().addAll(values); } return this; } @Override public Subscription withModifierExtension(Extension... values) { if (values!= null) { for (Extension value: values) { getModifierExtension().add(value); } } return this; } @Override public Subscription withModifierExtension(Collection values) { if (values!= null) { getModifierExtension().addAll(values); } return this; } @Override public Subscription withId(Id value) { setId(value); return this; } @Override public Subscription withMeta(Meta value) { setMeta(value); return this; } @Override public Subscription withImplicitRules(Uri value) { setImplicitRules(value); return this; } @Override public Subscription withLanguage(Code value) { setLanguage(value); return this; } @Override public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) { if ((object == null)||(this.getClass()!= object.getClass())) { return false; } if (this == object) { return true; } if (!super.equals(thisLocator, thatLocator, object, strategy)) { return false; } final Subscription that = ((Subscription) object); { org.hl7.fhir.String lhsCriteria; lhsCriteria = this.getCriteria(); org.hl7.fhir.String rhsCriteria; rhsCriteria = that.getCriteria(); if (!strategy.equals(LocatorUtils.property(thisLocator, "criteria", lhsCriteria), LocatorUtils.property(thatLocator, "criteria", rhsCriteria), lhsCriteria, rhsCriteria, (this.criteria!= null), (that.criteria!= null))) { return false; } } { List lhsContact; lhsContact = (((this.contact!= null)&&(!this.contact.isEmpty()))?this.getContact():null); List rhsContact; rhsContact = (((that.contact!= null)&&(!that.contact.isEmpty()))?that.getContact():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "contact", lhsContact), LocatorUtils.property(thatLocator, "contact", rhsContact), lhsContact, rhsContact, ((this.contact!= null)&&(!this.contact.isEmpty())), ((that.contact!= null)&&(!that.contact.isEmpty())))) { return false; } } { org.hl7.fhir.String lhsReason; lhsReason = this.getReason(); org.hl7.fhir.String rhsReason; rhsReason = that.getReason(); if (!strategy.equals(LocatorUtils.property(thisLocator, "reason", lhsReason), LocatorUtils.property(thatLocator, "reason", rhsReason), lhsReason, rhsReason, (this.reason!= null), (that.reason!= null))) { return false; } } { SubscriptionStatus lhsStatus; lhsStatus = this.getStatus(); SubscriptionStatus rhsStatus; rhsStatus = that.getStatus(); if (!strategy.equals(LocatorUtils.property(thisLocator, "status", lhsStatus), LocatorUtils.property(thatLocator, "status", rhsStatus), lhsStatus, rhsStatus, (this.status!= null), (that.status!= null))) { return false; } } { org.hl7.fhir.String lhsError; lhsError = this.getError(); org.hl7.fhir.String rhsError; rhsError = that.getError(); if (!strategy.equals(LocatorUtils.property(thisLocator, "error", lhsError), LocatorUtils.property(thatLocator, "error", rhsError), lhsError, rhsError, (this.error!= null), (that.error!= null))) { return false; } } { SubscriptionChannel lhsChannel; lhsChannel = this.getChannel(); SubscriptionChannel rhsChannel; rhsChannel = that.getChannel(); if (!strategy.equals(LocatorUtils.property(thisLocator, "channel", lhsChannel), LocatorUtils.property(thatLocator, "channel", rhsChannel), lhsChannel, rhsChannel, (this.channel!= null), (that.channel!= null))) { return false; } } { Instant lhsEnd; lhsEnd = this.getEnd(); Instant rhsEnd; rhsEnd = that.getEnd(); if (!strategy.equals(LocatorUtils.property(thisLocator, "end", lhsEnd), LocatorUtils.property(thatLocator, "end", rhsEnd), lhsEnd, rhsEnd, (this.end!= null), (that.end!= null))) { return false; } } { List lhsTag; lhsTag = (((this.tag!= null)&&(!this.tag.isEmpty()))?this.getTag():null); List rhsTag; rhsTag = (((that.tag!= null)&&(!that.tag.isEmpty()))?that.getTag():null); if (!strategy.equals(LocatorUtils.property(thisLocator, "tag", lhsTag), LocatorUtils.property(thatLocator, "tag", rhsTag), lhsTag, rhsTag, ((this.tag!= null)&&(!this.tag.isEmpty())), ((that.tag!= null)&&(!that.tag.isEmpty())))) { return false; } } return true; } @Override public boolean equals(Object object) { final EqualsStrategy2 strategy = JAXBEqualsStrategy.getInstance(); return equals(null, null, object, strategy); } @Override public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) { int currentHashCode = super.hashCode(locator, strategy); { org.hl7.fhir.String theCriteria; theCriteria = this.getCriteria(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "criteria", theCriteria), currentHashCode, theCriteria, (this.criteria!= null)); } { List theContact; theContact = (((this.contact!= null)&&(!this.contact.isEmpty()))?this.getContact():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contact", theContact), currentHashCode, theContact, ((this.contact!= null)&&(!this.contact.isEmpty()))); } { org.hl7.fhir.String theReason; theReason = this.getReason(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reason", theReason), currentHashCode, theReason, (this.reason!= null)); } { SubscriptionStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus, (this.status!= null)); } { org.hl7.fhir.String theError; theError = this.getError(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "error", theError), currentHashCode, theError, (this.error!= null)); } { SubscriptionChannel theChannel; theChannel = this.getChannel(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "channel", theChannel), currentHashCode, theChannel, (this.channel!= null)); } { Instant theEnd; theEnd = this.getEnd(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "end", theEnd), currentHashCode, theEnd, (this.end!= null)); } { List theTag; theTag = (((this.tag!= null)&&(!this.tag.isEmpty()))?this.getTag():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "tag", theTag), currentHashCode, theTag, ((this.tag!= null)&&(!this.tag.isEmpty()))); } return currentHashCode; } @Override public int hashCode() { final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.getInstance(); return this.hashCode(null, strategy); } @Override public java.lang.String toString() { final ToStringStrategy2 strategy = JAXBToStringStrategy.getInstance(); final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } @Override public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } @Override public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) { super.appendFields(locator, buffer, strategy); { org.hl7.fhir.String theCriteria; theCriteria = this.getCriteria(); strategy.appendField(locator, this, "criteria", buffer, theCriteria, (this.criteria!= null)); } { List theContact; theContact = (((this.contact!= null)&&(!this.contact.isEmpty()))?this.getContact():null); strategy.appendField(locator, this, "contact", buffer, theContact, ((this.contact!= null)&&(!this.contact.isEmpty()))); } { org.hl7.fhir.String theReason; theReason = this.getReason(); strategy.appendField(locator, this, "reason", buffer, theReason, (this.reason!= null)); } { SubscriptionStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus, (this.status!= null)); } { org.hl7.fhir.String theError; theError = this.getError(); strategy.appendField(locator, this, "error", buffer, theError, (this.error!= null)); } { SubscriptionChannel theChannel; theChannel = this.getChannel(); strategy.appendField(locator, this, "channel", buffer, theChannel, (this.channel!= null)); } { Instant theEnd; theEnd = this.getEnd(); strategy.appendField(locator, this, "end", buffer, theEnd, (this.end!= null)); } { List theTag; theTag = (((this.tag!= null)&&(!this.tag.isEmpty()))?this.getTag():null); strategy.appendField(locator, this, "tag", buffer, theTag, ((this.tag!= null)&&(!this.tag.isEmpty()))); } return buffer; } public void setContact(List value) { this.contact = value; } public void setTag(List value) { this.tag = value; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy