/*
 * An XML document type.
 * Localname: NotifyTo
 * Namespace: http://schemas.xmlsoap.org/ws/2004/08/eventing
 * Java type: org.codehaus.activemq.ws.schema.eventing.NotifyToDocument
 *
 * Automatically generated - do not modify.
 */
package org.codehaus.activemq.ws.schema.eventing.impl;

/**
 * A document containing one NotifyTo(@http://schemas.xmlsoap.org/ws/2004/08/eventing) element.
 * <p/>
 * This is a complex type.
 */
public class NotifyToDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.codehaus.activemq.ws.schema.eventing.NotifyToDocument {

    public NotifyToDocumentImpl(org.apache.xmlbeans.SchemaType sType) {
        super(sType);
    }

    private static final javax.xml.namespace.QName NOTIFYTO$0 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "NotifyTo");


    /**
     * Gets the "NotifyTo" element
     */
    public org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType getNotifyTo() {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType target = null;
            target = (org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType) get_store().find_element_user(NOTIFYTO$0, 0);
            if (target == null) {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "NotifyTo" element
     */
    public void setNotifyTo(org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType notifyTo) {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType target = null;
            target = (org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType) get_store().find_element_user(NOTIFYTO$0, 0);
            if (target == null) {
                target = (org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType) get_store().add_element_user(NOTIFYTO$0);
            }
            target.set(notifyTo);
        }
    }

    /**
     * Appends and returns a new empty "NotifyTo" element
     */
    public org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType addNewNotifyTo() {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType target = null;
            target = (org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType) get_store().add_element_user(NOTIFYTO$0);
            return target;
        }
    }
}
