/*
 * An XML document type.
 * Localname: RenewResponse
 * Namespace: http://schemas.xmlsoap.org/ws/2004/08/eventing
 * Java type: org.activemq.ws.xmlbeans.eventing.RenewResponseDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.eventing.impl;
/**
 * A document containing one RenewResponse(@http://schemas.xmlsoap.org/ws/2004/08/eventing) element.
 *
 * This is a complex type.
 */
public class RenewResponseDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.eventing.RenewResponseDocument
{
    
    public RenewResponseDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName RENEWRESPONSE$0 = 
        new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "RenewResponse");
    
    
    /**
     * Gets the "RenewResponse" element
     */
    public org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse getRenewResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse target = null;
            target = (org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse)get_store().find_element_user(RENEWRESPONSE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "RenewResponse" element
     */
    public void setRenewResponse(org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse renewResponse)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse target = null;
            target = (org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse)get_store().find_element_user(RENEWRESPONSE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse)get_store().add_element_user(RENEWRESPONSE$0);
            }
            target.set(renewResponse);
        }
    }
    
    /**
     * Appends and returns a new empty "RenewResponse" element
     */
    public org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse addNewRenewResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse target = null;
            target = (org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse)get_store().add_element_user(RENEWRESPONSE$0);
            return target;
        }
    }
    /**
     * An XML RenewResponse(@http://schemas.xmlsoap.org/ws/2004/08/eventing).
     *
     * This is a complex type.
     */
    public static class RenewResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.eventing.RenewResponseDocument.RenewResponse
    {
        
        public RenewResponseImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName EXPIRES$0 = 
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/08/eventing", "Expires");
        
        
        /**
         * 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$0, 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$0, 0);
                return target;
            }
        }
        
        /**
         * True if has "Expires" element
         */
        public boolean isSetExpires()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(EXPIRES$0) != 0;
            }
        }
        
        /**
         * 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$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(EXPIRES$0);
                }
                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$0, 0);
                if (target == null)
                {
                    target = (org.activemq.ws.xmlbeans.eventing.ExpirationType)get_store().add_element_user(EXPIRES$0);
                }
                target.set(expires);
            }
        }
        
        /**
         * Unsets the "Expires" element
         */
        public void unsetExpires()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(EXPIRES$0, 0);
            }
        }
    }
}
