/*
 * An XML document type.
 * Localname: Received
 * Namespace: http://schemas.xmlsoap.org/ws/2002/07/utility
 * Java type: org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedDocument
 *
 * Automatically generated - do not modify.
 */
package org.xmlsoap.schemas.ws.x2002.x07.utility.impl;

/**
 * A document containing one Received(@http://schemas.xmlsoap.org/ws/2002/07/utility) element.
 * <p/>
 * This is a complex type.
 */
public class ReceivedDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedDocument {

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

    private static final javax.xml.namespace.QName RECEIVED$0 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/07/utility", "Received");


    /**
     * Gets the "Received" element
     */
    public org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType getReceived() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType) get_store().find_element_user(RECEIVED$0, 0);
            if (target == null) {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "Received" element
     */
    public void setReceived(org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType received) {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType) get_store().find_element_user(RECEIVED$0, 0);
            if (target == null) {
                target = (org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType) get_store().add_element_user(RECEIVED$0);
            }
            target.set(received);
        }
    }

    /**
     * Appends and returns a new empty "Received" element
     */
    public org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType addNewReceived() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.ReceivedType) get_store().add_element_user(RECEIVED$0);
            return target;
        }
    }
}
