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

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

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

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


    /**
     * Gets the "GetStatusResponse" element
     */
    public org.codehaus.activemq.ws.schema.eventing.GetStatusResponseDocument.GetStatusResponse getGetStatusResponse() {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.eventing.GetStatusResponseDocument.GetStatusResponse target = null;
            target = (org.codehaus.activemq.ws.schema.eventing.GetStatusResponseDocument.GetStatusResponse) get_store().find_element_user(GETSTATUSRESPONSE$0, 0);
            if (target == null) {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "GetStatusResponse" element
     */
    public void setGetStatusResponse(org.codehaus.activemq.ws.schema.eventing.GetStatusResponseDocument.GetStatusResponse getStatusResponse) {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.eventing.GetStatusResponseDocument.GetStatusResponse target = null;
            target = (org.codehaus.activemq.ws.schema.eventing.GetStatusResponseDocument.GetStatusResponse) get_store().find_element_user(GETSTATUSRESPONSE$0, 0);
            if (target == null) {
                target = (org.codehaus.activemq.ws.schema.eventing.GetStatusResponseDocument.GetStatusResponse) get_store().add_element_user(GETSTATUSRESPONSE$0);
            }
            target.set(getStatusResponse);
        }
    }

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

    /**
     * An XML GetStatusResponse(@http://schemas.xmlsoap.org/ws/2004/08/eventing).
     * <p/>
     * This is a complex type.
     */
    public static class GetStatusResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.codehaus.activemq.ws.schema.eventing.GetStatusResponseDocument.GetStatusResponse {

        public GetStatusResponseImpl(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.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$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.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$0, 0);
                if (target == null) {
                    target = (org.codehaus.activemq.ws.schema.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);
            }
        }
    }
}
