/*
 * An XML document type.
 * Localname: SubscribeResponse
 * Namespace: http://schemas.xmlsoap.org/ws/2004/08/eventing
 * Java type: org.activemq.ws.xmlbeans.eventing.SubscribeResponseDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.eventing.impl;
/**
 * A document containing one SubscribeResponse(@http://schemas.xmlsoap.org/ws/2004/08/eventing) element.
 *
 * This is a complex type.
 */
public class SubscribeResponseDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.eventing.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://schemas.xmlsoap.org/ws/2004/08/eventing", "SubscribeResponse");
    
    
    /**
     * Gets the "SubscribeResponse" element
     */
    public org.activemq.ws.xmlbeans.eventing.SubscribeResponseDocument.SubscribeResponse getSubscribeResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.eventing.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.activemq.ws.xmlbeans.eventing.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.eventing.SubscribeResponseDocument.SubscribeResponse subscribeResponse)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.eventing.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.activemq.ws.xmlbeans.eventing.SubscribeResponseDocument.SubscribeResponse)get_store().find_element_user(SUBSCRIBERESPONSE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.eventing.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.eventing.SubscribeResponseDocument.SubscribeResponse addNewSubscribeResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.eventing.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.activemq.ws.xmlbeans.eventing.SubscribeResponseDocument.SubscribeResponse)get_store().add_element_user(SUBSCRIBERESPONSE$0);
            return target;
        }
    }
    /**
     * An XML SubscribeResponse(@http://schemas.xmlsoap.org/ws/2004/08/eventing).
     *
     * This is a complex type.
     */
    public static class SubscribeResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.eventing.SubscribeResponseDocument.SubscribeResponse
    {
        
        public SubscribeResponseImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName SUBSCRIPTIONMANAGER$0 = 
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "SubscriptionManager");
        private static final javax.xml.namespace.QName EXPIRES$2 = 
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Expires");
        
        
        /**
         * Gets the "SubscriptionManager" element
         */
        public org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType getSubscriptionManager()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType target = null;
                target = (org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType)get_store().find_element_user(SUBSCRIPTIONMANAGER$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * Sets the "SubscriptionManager" element
         */
        public void setSubscriptionManager(org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType subscriptionManager)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType target = null;
                target = (org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType)get_store().find_element_user(SUBSCRIPTIONMANAGER$0, 0);
                if (target == null)
                {
                    target = (org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType)get_store().add_element_user(SUBSCRIPTIONMANAGER$0);
                }
                target.set(subscriptionManager);
            }
        }
        
        /**
         * Appends and returns a new empty "SubscriptionManager" element
         */
        public org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType addNewSubscriptionManager()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType target = null;
                target = (org.activemq.ws.xmlbeans.addressing.v2004_08.EndpointReferenceType)get_store().add_element_user(SUBSCRIPTIONMANAGER$0);
                return target;
            }
        }
        
        /**
         * Gets the "Expires" element
         */
        public java.lang.Object getExpires()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EXPIRES$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getObjectValue();
            }
        }
        
        /**
         * Gets (as xml) the "Expires" element
         */
        public org.activemq.ws.xmlbeans.eventing.ExpirationType xgetExpires()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.eventing.ExpirationType target = null;
                target = (org.activemq.ws.xmlbeans.eventing.ExpirationType)get_store().find_element_user(EXPIRES$2, 0);
                return target;
            }
        }
        
        /**
         * Sets the "Expires" element
         */
        public void setExpires(java.lang.Object expires)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(EXPIRES$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(EXPIRES$2);
                }
                target.setObjectValue(expires);
            }
        }
        
        /**
         * Sets (as xml) the "Expires" element
         */
        public void xsetExpires(org.activemq.ws.xmlbeans.eventing.ExpirationType expires)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.eventing.ExpirationType target = null;
                target = (org.activemq.ws.xmlbeans.eventing.ExpirationType)get_store().find_element_user(EXPIRES$2, 0);
                if (target == null)
                {
                    target = (org.activemq.ws.xmlbeans.eventing.ExpirationType)get_store().add_element_user(EXPIRES$2);
                }
                target.set(expires);
            }
        }
    }
}
