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

/**
 * A document containing one SubscribeResponse(@http://schemas.xmlsoap.org/ws/2004/08/eventing) element.
 * <p/>
 * This is a complex type.
 */
public class SubscribeResponseDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.codehaus.activemq.ws.schema.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.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse getSubscribeResponse() {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.codehaus.activemq.ws.schema.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.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse subscribeResponse) {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse) get_store().find_element_user(SUBSCRIBERESPONSE$0, 0);
            if (target == null) {
                target = (org.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse) get_store().add_element_user(SUBSCRIBERESPONSE$0);
            }
            target.set(subscribeResponse);
        }
    }

    /**
     * Appends and returns a new empty "SubscribeResponse" element
     */
    public org.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse addNewSubscribeResponse() {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse target = null;
            target = (org.codehaus.activemq.ws.schema.eventing.SubscribeResponseDocument.SubscribeResponse) get_store().add_element_user(SUBSCRIBERESPONSE$0);
            return target;
        }
    }

    /**
     * An XML SubscribeResponse(@http://schemas.xmlsoap.org/ws/2004/08/eventing).
     * <p/>
     * This is a complex type.
     */
    public static class SubscribeResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.codehaus.activemq.ws.schema.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.codehaus.activemq.ws.schema.addressing.EndpointReferenceType getSubscriptionManager() {
            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(SUBSCRIPTIONMANAGER$0, 0);
                if (target == null) {
                    return null;
                }
                return target;
            }
        }

        /**
         * Sets the "SubscriptionManager" element
         */
        public void setSubscriptionManager(org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType subscriptionManager) {
            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(SUBSCRIPTIONMANAGER$0, 0);
                if (target == null) {
                    target = (org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType) get_store().add_element_user(SUBSCRIPTIONMANAGER$0);
                }
                target.set(subscriptionManager);
            }
        }

        /**
         * Appends and returns a new empty "SubscriptionManager" element
         */
        public org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType addNewSubscriptionManager() {
            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(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.codehaus.activemq.ws.schema.eventing.ExpirationType xgetExpires() {
            synchronized (monitor()) {
                check_orphaned();
                org.codehaus.activemq.ws.schema.eventing.ExpirationType target = null;
                target = (org.codehaus.activemq.ws.schema.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.codehaus.activemq.ws.schema.eventing.ExpirationType expires) {
            synchronized (monitor()) {
                check_orphaned();
                org.codehaus.activemq.ws.schema.eventing.ExpirationType target = null;
                target = (org.codehaus.activemq.ws.schema.eventing.ExpirationType) get_store().find_element_user(EXPIRES$2, 0);
                if (target == null) {
                    target = (org.codehaus.activemq.ws.schema.eventing.ExpirationType) get_store().add_element_user(EXPIRES$2);
                }
                target.set(expires);
            }
        }
    }
}
