/*
 * An XML document type.
 * Localname: ReplyTo
 * Namespace: http://schemas.xmlsoap.org/ws/2003/03/addressing
 * Java type: org.activemq.ws.xmlbeans.addressing.v2003_03.ReplyToDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.addressing.v2003_03.impl;
/**
 * A document containing one ReplyTo(@http://schemas.xmlsoap.org/ws/2003/03/addressing) element.
 *
 * This is a complex type.
 */
public class ReplyToDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.addressing.v2003_03.ReplyToDocument
{
    
    public ReplyToDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName REPLYTO$0 = 
        new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2003/03/addressing", "ReplyTo");
    
    
    /**
     * Gets the "ReplyTo" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType getReplyTo()
    {
        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(REPLYTO$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "ReplyTo" element
     */
    public void setReplyTo(org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType replyTo)
    {
        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(REPLYTO$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(REPLYTO$0);
            }
            target.set(replyTo);
        }
    }
    
    /**
     * Appends and returns a new empty "ReplyTo" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType addNewReplyTo()
    {
        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(REPLYTO$0);
            return target;
        }
    }
}
