/*
 * An XML document type.
 * Localname: SubscribeResponse
 * Namespace: http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.notification.base.impl;
/**
 * A document containing one SubscribeResponse(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class SubscribeResponseDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument
{
    
    public SubscribeResponseDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SUBSCRIBERESPONSE$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "SubscribeResponse");
    
    
    /**
     * Gets the "SubscribeResponse" element
     */
    public org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse getSubscribeResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse)get_store().find_element_user(SUBSCRIBERESPONSE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "SubscribeResponse" element
     */
    public void setSubscribeResponse(org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse subscribeResponse)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse)get_store().find_element_user(SUBSCRIBERESPONSE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse)get_store().add_element_user(SUBSCRIBERESPONSE$0);
            }
            target.set(subscribeResponse);
        }
    }
    
    /**
     * Appends and returns a new empty "SubscribeResponse" element
     */
    public org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse addNewSubscribeResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse)get_store().add_element_user(SUBSCRIBERESPONSE$0);
            return target;
        }
    }
    /**
     * An XML SubscribeResponse(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd).
     *
     * This is a complex type.
     */
    public static class SubscribeResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.base.SubscribeResponseDocument.SubscribeResponse
    {
        
        public SubscribeResponseImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName SUBSCRIPTIONREFERENCE$0 = 
            new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "SubscriptionReference");
        
        
        /**
         * Gets the "SubscriptionReference" element
         */
        public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType getSubscriptionReference()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
                target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().find_element_user(SUBSCRIPTIONREFERENCE$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * True if has "SubscriptionReference" element
         */
        public boolean isSetSubscriptionReference()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(SUBSCRIPTIONREFERENCE$0) != 0;
            }
        }
        
        /**
         * Sets the "SubscriptionReference" element
         */
        public void setSubscriptionReference(org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType subscriptionReference)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
                target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().find_element_user(SUBSCRIPTIONREFERENCE$0, 0);
                if (target == null)
                {
                    target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(SUBSCRIPTIONREFERENCE$0);
                }
                target.set(subscriptionReference);
            }
        }
        
        /**
         * Appends and returns a new empty "SubscriptionReference" element
         */
        public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType addNewSubscriptionReference()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
                target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(SUBSCRIPTIONREFERENCE$0);
                return target;
            }
        }
        
        /**
         * Unsets the "SubscriptionReference" element
         */
        public void unsetSubscriptionReference()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(SUBSCRIPTIONREFERENCE$0, 0);
            }
        }
    }
}
