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

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

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

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


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

    /**
     * Sets the "Timestamp" element
     */
    public void setTimestamp(org.xmlsoap.schemas.ws.x2002.x07.utility.TimestampType timestamp) {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.TimestampType target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.TimestampType) get_store().find_element_user(TIMESTAMP$0, 0);
            if (target == null) {
                target = (org.xmlsoap.schemas.ws.x2002.x07.utility.TimestampType) get_store().add_element_user(TIMESTAMP$0);
            }
            target.set(timestamp);
        }
    }

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