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.22.0
Show newest version
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
// See http://java.sun.com/xml/jaxb 
// Any modifications to this file will be lost upon recompilation of the source schema. 
// Generated on: 2018.01.12 at 11:04:27 AM MST 
//


package org.hl7.fhir;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
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.ToString;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
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 Equals, HashCode, ToString { @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 JAXB 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 JAXB 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; } public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Subscription)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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)) { 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)) { return false; } } return true; } public boolean equals(Object object) { final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE; return equals(null, null, object, strategy); } public int hashCode(ObjectLocator locator, HashCodeStrategy 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); } { List theContact; theContact = (((this.contact!= null)&&(!this.contact.isEmpty()))?this.getContact():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "contact", theContact), currentHashCode, theContact); } { org.hl7.fhir.String theReason; theReason = this.getReason(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "reason", theReason), currentHashCode, theReason); } { SubscriptionStatus theStatus; theStatus = this.getStatus(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "status", theStatus), currentHashCode, theStatus); } { org.hl7.fhir.String theError; theError = this.getError(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "error", theError), currentHashCode, theError); } { SubscriptionChannel theChannel; theChannel = this.getChannel(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "channel", theChannel), currentHashCode, theChannel); } { Instant theEnd; theEnd = this.getEnd(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "end", theEnd), currentHashCode, theEnd); } { List theTag; theTag = (((this.tag!= null)&&(!this.tag.isEmpty()))?this.getTag():null); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "tag", theTag), currentHashCode, theTag); } return currentHashCode; } public int hashCode() { final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE; return this.hashCode(null, strategy); } public java.lang.String toString() { final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE; final StringBuilder buffer = new StringBuilder(); append(null, buffer, strategy); return buffer.toString(); } public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { strategy.appendStart(locator, this, buffer); appendFields(locator, buffer, strategy); strategy.appendEnd(locator, this, buffer); return buffer; } public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) { super.appendFields(locator, buffer, strategy); { org.hl7.fhir.String theCriteria; theCriteria = this.getCriteria(); strategy.appendField(locator, this, "criteria", buffer, theCriteria); } { List theContact; theContact = (((this.contact!= null)&&(!this.contact.isEmpty()))?this.getContact():null); strategy.appendField(locator, this, "contact", buffer, theContact); } { org.hl7.fhir.String theReason; theReason = this.getReason(); strategy.appendField(locator, this, "reason", buffer, theReason); } { SubscriptionStatus theStatus; theStatus = this.getStatus(); strategy.appendField(locator, this, "status", buffer, theStatus); } { org.hl7.fhir.String theError; theError = this.getError(); strategy.appendField(locator, this, "error", buffer, theError); } { SubscriptionChannel theChannel; theChannel = this.getChannel(); strategy.appendField(locator, this, "channel", buffer, theChannel); } { Instant theEnd; theEnd = this.getEnd(); strategy.appendField(locator, this, "end", buffer, theEnd); } { List theTag; theTag = (((this.tag!= null)&&(!this.tag.isEmpty()))?this.getTag():null); strategy.appendField(locator, this, "tag", buffer, theTag); } return buffer; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy