001//
002// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.10-b140310.1920 
003// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
004// Any modifications to this file will be lost upon recompilation of the source schema. 
005// Generated on: 2019.03.15 at 09:00:08 AM EDT 
006//
007
008
009package org.apache.activemq.schema.core;
010
011import java.util.HashMap;
012import java.util.Map;
013import javax.xml.bind.annotation.XmlAccessType;
014import javax.xml.bind.annotation.XmlAccessorType;
015import javax.xml.bind.annotation.XmlAnyAttribute;
016import javax.xml.bind.annotation.XmlAttribute;
017import javax.xml.bind.annotation.XmlID;
018import javax.xml.bind.annotation.XmlRootElement;
019import javax.xml.bind.annotation.XmlSchemaType;
020import javax.xml.bind.annotation.XmlType;
021import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
022import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
023import javax.xml.namespace.QName;
024import org.apache.activemq.plugin.jaxb2_commons.ElementAwareEqualsStrategy;
025import org.jvnet.jaxb2_commons.lang.Equals;
026import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
027import org.jvnet.jaxb2_commons.lang.HashCode;
028import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
029import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
030import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
031import org.jvnet.jaxb2_commons.lang.ToString;
032import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
033import org.jvnet.jaxb2_commons.locator.ObjectLocator;
034import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
035
036
037/**
038 * <p>Java class for anonymous complex type.
039 * 
040 * <p>The following schema fragment specifies the expected content contained within this class.
041 * 
042 * <pre>
043 * &lt;complexType>
044 *   &lt;complexContent>
045 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
046 *       &lt;attribute name="limit" type="{http://www.w3.org/2001/XMLSchema}long" />
047 *       &lt;attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
048 *       &lt;anyAttribute processContents='lax' namespace='##other'/>
049 *     &lt;/restriction>
050 *   &lt;/complexContent>
051 * &lt;/complexType>
052 * </pre>
053 * 
054 * 
055 */
056@XmlAccessorType(XmlAccessType.FIELD)
057@XmlType(name = "")
058@XmlRootElement(name = "usageCapacity")
059public class DtoUsageCapacity
060    implements Equals, HashCode, ToString
061{
062
063    @XmlAttribute(name = "limit")
064    protected Long limit;
065    @XmlAttribute(name = "id")
066    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
067    @XmlID
068    @XmlSchemaType(name = "ID")
069    protected String id;
070    @XmlAnyAttribute
071    private Map<QName, String> otherAttributes = new HashMap<QName, String>();
072
073    /**
074     * Gets the value of the limit property.
075     * 
076     * @return
077     *     possible object is
078     *     {@link Long }
079     *     
080     */
081    public Long getLimit() {
082        return limit;
083    }
084
085    /**
086     * Sets the value of the limit property.
087     * 
088     * @param value
089     *     allowed object is
090     *     {@link Long }
091     *     
092     */
093    public void setLimit(Long value) {
094        this.limit = value;
095    }
096
097    /**
098     * Gets the value of the id property.
099     * 
100     * @return
101     *     possible object is
102     *     {@link String }
103     *     
104     */
105    public String getId() {
106        return id;
107    }
108
109    /**
110     * Sets the value of the id property.
111     * 
112     * @param value
113     *     allowed object is
114     *     {@link String }
115     *     
116     */
117    public void setId(String value) {
118        this.id = value;
119    }
120
121    /**
122     * Gets a map that contains attributes that aren't bound to any typed property on this class.
123     * 
124     * <p>
125     * the map is keyed by the name of the attribute and 
126     * the value is the string value of the attribute.
127     * 
128     * the map returned by this method is live, and you can add new attribute
129     * by updating the map directly. Because of this design, there's no setter.
130     * 
131     * 
132     * @return
133     *     always non-null
134     */
135    public Map<QName, String> getOtherAttributes() {
136        return otherAttributes;
137    }
138
139    public String toString() {
140        final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
141        final StringBuilder buffer = new StringBuilder();
142        append(null, buffer, strategy);
143        return buffer.toString();
144    }
145
146    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
147        strategy.appendStart(locator, this, buffer);
148        appendFields(locator, buffer, strategy);
149        strategy.appendEnd(locator, this, buffer);
150        return buffer;
151    }
152
153    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
154        {
155            Long theLimit;
156            theLimit = this.getLimit();
157            strategy.appendField(locator, this, "limit", buffer, theLimit);
158        }
159        {
160            String theId;
161            theId = this.getId();
162            strategy.appendField(locator, this, "id", buffer, theId);
163        }
164        return buffer;
165    }
166
167    public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
168        int currentHashCode = 1;
169        {
170            Long theLimit;
171            theLimit = this.getLimit();
172            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "limit", theLimit), currentHashCode, theLimit);
173        }
174        {
175            String theId;
176            theId = this.getId();
177            currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
178        }
179        return currentHashCode;
180    }
181
182    public int hashCode() {
183        final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
184        return this.hashCode(null, strategy);
185    }
186
187    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
188        if (!(object instanceof DtoUsageCapacity)) {
189            return false;
190        }
191        if (this == object) {
192            return true;
193        }
194        final DtoUsageCapacity that = ((DtoUsageCapacity) object);
195        {
196            Long lhsLimit;
197            lhsLimit = this.getLimit();
198            Long rhsLimit;
199            rhsLimit = that.getLimit();
200            if (!strategy.equals(LocatorUtils.property(thisLocator, "limit", lhsLimit), LocatorUtils.property(thatLocator, "limit", rhsLimit), lhsLimit, rhsLimit)) {
201                return false;
202            }
203        }
204        {
205            String lhsId;
206            lhsId = this.getId();
207            String rhsId;
208            rhsId = that.getId();
209            if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
210                return false;
211            }
212        }
213        return true;
214    }
215
216    public boolean equals(Object object) {
217        final EqualsStrategy strategy = new ElementAwareEqualsStrategy();
218        return equals(null, null, object, strategy);
219    }
220
221}