/*
 * An XML document type.
 * Localname: RegisterPublisherResponse
 * Namespace: http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.notification.brokered.impl;
/**
 * A document containing one RegisterPublisherResponse(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class RegisterPublisherResponseDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument
{
    
    public RegisterPublisherResponseDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName REGISTERPUBLISHERRESPONSE$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd", "RegisterPublisherResponse");
    
    
    /**
     * Gets the "RegisterPublisherResponse" element
     */
    public org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse getRegisterPublisherResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse target = null;
            target = (org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse)get_store().find_element_user(REGISTERPUBLISHERRESPONSE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "RegisterPublisherResponse" element
     */
    public void setRegisterPublisherResponse(org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse registerPublisherResponse)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse target = null;
            target = (org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse)get_store().find_element_user(REGISTERPUBLISHERRESPONSE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse)get_store().add_element_user(REGISTERPUBLISHERRESPONSE$0);
            }
            target.set(registerPublisherResponse);
        }
    }
    
    /**
     * Appends and returns a new empty "RegisterPublisherResponse" element
     */
    public org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse addNewRegisterPublisherResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse target = null;
            target = (org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse)get_store().add_element_user(REGISTERPUBLISHERRESPONSE$0);
            return target;
        }
    }
    /**
     * An XML RegisterPublisherResponse(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd).
     *
     * This is a complex type.
     */
    public static class RegisterPublisherResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.brokered.RegisterPublisherResponseDocument.RegisterPublisherResponse
    {
        
        public RegisterPublisherResponseImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName PUBLISHERREGISTRATIONREFERENCE$0 = 
            new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BrokeredNotification-1.2-draft-01.xsd", "PublisherRegistrationReference");
        
        
        /**
         * Gets the "PublisherRegistrationReference" element
         */
        public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType getPublisherRegistrationReference()
        {
            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(PUBLISHERREGISTRATIONREFERENCE$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * True if has "PublisherRegistrationReference" element
         */
        public boolean isSetPublisherRegistrationReference()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(PUBLISHERREGISTRATIONREFERENCE$0) != 0;
            }
        }
        
        /**
         * Sets the "PublisherRegistrationReference" element
         */
        public void setPublisherRegistrationReference(org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType publisherRegistrationReference)
        {
            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(PUBLISHERREGISTRATIONREFERENCE$0, 0);
                if (target == null)
                {
                    target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(PUBLISHERREGISTRATIONREFERENCE$0);
                }
                target.set(publisherRegistrationReference);
            }
        }
        
        /**
         * Appends and returns a new empty "PublisherRegistrationReference" element
         */
        public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType addNewPublisherRegistrationReference()
        {
            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(PUBLISHERREGISTRATIONREFERENCE$0);
                return target;
            }
        }
        
        /**
         * Unsets the "PublisherRegistrationReference" element
         */
        public void unsetPublisherRegistrationReference()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(PUBLISHERREGISTRATIONREFERENCE$0, 0);
            }
        }
    }
}
