/*
 * An XML document type.
 * Localname: StatusResponse
 * Namespace: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
 * Java type: org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument
 *
 * Automatically generated - do not modify.
 */
package org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.impl;
/**
 * A document containing one StatusResponse(@http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd) element.
 *
 * This is a complex type.
 */
public class StatusResponseDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument
{
    
    public StatusResponseDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName STATUSRESPONSE$0 = 
        new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "StatusResponse");
    
    
    /**
     * Gets the "StatusResponse" element
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse getStatusResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse)get_store().find_element_user(STATUSRESPONSE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "StatusResponse" element
     */
    public void setStatusResponse(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse statusResponse)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse)get_store().find_element_user(STATUSRESPONSE$0, 0);
            if (target == null)
            {
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse)get_store().add_element_user(STATUSRESPONSE$0);
            }
            target.set(statusResponse);
        }
    }
    
    /**
     * Appends and returns a new empty "StatusResponse" element
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse addNewStatusResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse)get_store().add_element_user(STATUSRESPONSE$0);
            return target;
        }
    }
    /**
     * An XML StatusResponse(@http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd).
     *
     * This is a complex type.
     */
    public static class StatusResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusResponseDocument.StatusResponse
    {
        
        public StatusResponseImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName REFTOMESSAGEID$0 = 
            new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "RefToMessageId");
        private static final javax.xml.namespace.QName TIMESTAMP$2 = 
            new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "Timestamp");
        private static final javax.xml.namespace.QName ID$4 = 
            new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "id");
        private static final javax.xml.namespace.QName VERSION$6 = 
            new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "version");
        private static final javax.xml.namespace.QName MESSAGESTATUS$8 = 
            new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "messageStatus");
        
        
        /**
         * Gets the "RefToMessageId" element
         */
        public java.lang.String getRefToMessageId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFTOMESSAGEID$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "RefToMessageId" element
         */
        public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString xgetRefToMessageId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_element_user(REFTOMESSAGEID$0, 0);
                return target;
            }
        }
        
        /**
         * Sets the "RefToMessageId" element
         */
        public void setRefToMessageId(java.lang.String refToMessageId)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFTOMESSAGEID$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFTOMESSAGEID$0);
                }
                target.setStringValue(refToMessageId);
            }
        }
        
        /**
         * Sets (as xml) the "RefToMessageId" element
         */
        public void xsetRefToMessageId(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString refToMessageId)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_element_user(REFTOMESSAGEID$0, 0);
                if (target == null)
                {
                    target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().add_element_user(REFTOMESSAGEID$0);
                }
                target.set(refToMessageId);
            }
        }
        
        /**
         * Gets the "Timestamp" element
         */
        public java.util.Calendar getTimestamp()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TIMESTAMP$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getCalendarValue();
            }
        }
        
        /**
         * Gets (as xml) the "Timestamp" element
         */
        public org.apache.xmlbeans.XmlDateTime xgetTimestamp()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(TIMESTAMP$2, 0);
                return target;
            }
        }
        
        /**
         * True if has "Timestamp" element
         */
        public boolean isSetTimestamp()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(TIMESTAMP$2) != 0;
            }
        }
        
        /**
         * Sets the "Timestamp" element
         */
        public void setTimestamp(java.util.Calendar timestamp)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TIMESTAMP$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TIMESTAMP$2);
                }
                target.setCalendarValue(timestamp);
            }
        }
        
        /**
         * Sets (as xml) the "Timestamp" element
         */
        public void xsetTimestamp(org.apache.xmlbeans.XmlDateTime timestamp)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(TIMESTAMP$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(TIMESTAMP$2);
                }
                target.set(timestamp);
            }
        }
        
        /**
         * Unsets the "Timestamp" element
         */
        public void unsetTimestamp()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(TIMESTAMP$2, 0);
            }
        }
        
        /**
         * Gets the "id" attribute
         */
        public java.lang.String getId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$4);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "id" attribute
         */
        public org.apache.xmlbeans.XmlID xgetId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlID target = null;
                target = (org.apache.xmlbeans.XmlID)get_store().find_attribute_user(ID$4);
                return target;
            }
        }
        
        /**
         * True if has "id" attribute
         */
        public boolean isSetId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(ID$4) != null;
            }
        }
        
        /**
         * Sets the "id" attribute
         */
        public void setId(java.lang.String id)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ID$4);
                }
                target.setStringValue(id);
            }
        }
        
        /**
         * Sets (as xml) the "id" attribute
         */
        public void xsetId(org.apache.xmlbeans.XmlID id)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlID target = null;
                target = (org.apache.xmlbeans.XmlID)get_store().find_attribute_user(ID$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlID)get_store().add_attribute_user(ID$4);
                }
                target.set(id);
            }
        }
        
        /**
         * Unsets the "id" attribute
         */
        public void unsetId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(ID$4);
            }
        }
        
        /**
         * Gets the "version" attribute
         */
        public java.lang.String getVersion()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VERSION$6);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "version" attribute
         */
        public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString xgetVersion()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_attribute_user(VERSION$6);
                return target;
            }
        }
        
        /**
         * Sets the "version" attribute
         */
        public void setVersion(java.lang.String version)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VERSION$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(VERSION$6);
                }
                target.setStringValue(version);
            }
        }
        
        /**
         * Sets (as xml) the "version" attribute
         */
        public void xsetVersion(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString version)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_attribute_user(VERSION$6);
                if (target == null)
                {
                    target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().add_attribute_user(VERSION$6);
                }
                target.set(version);
            }
        }
        
        /**
         * Gets the "messageStatus" attribute
         */
        public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType.Enum getMessageStatus()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MESSAGESTATUS$8);
                if (target == null)
                {
                    return null;
                }
                return (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType.Enum)target.getEnumValue();
            }
        }
        
        /**
         * Gets (as xml) the "messageStatus" attribute
         */
        public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType xgetMessageStatus()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType)get_store().find_attribute_user(MESSAGESTATUS$8);
                return target;
            }
        }
        
        /**
         * Sets the "messageStatus" attribute
         */
        public void setMessageStatus(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType.Enum messageStatus)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MESSAGESTATUS$8);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MESSAGESTATUS$8);
                }
                target.setEnumValue(messageStatus);
            }
        }
        
        /**
         * Sets (as xml) the "messageStatus" attribute
         */
        public void xsetMessageStatus(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType messageStatus)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType)get_store().find_attribute_user(MESSAGESTATUS$8);
                if (target == null)
                {
                    target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.MessageStatusType)get_store().add_attribute_user(MESSAGESTATUS$8);
                }
                target.set(messageStatus);
            }
        }
    }
}
