/*
 * An XML document type.
 * Localname: authentication
 * Namespace: http://www.bea.com/2003/03/wli/tpm
 * Java type: com.bea.x2003.x03.wli.tpm.AuthenticationDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.x2003.x03.wli.tpm.impl;
/**
 * A document containing one authentication(@http://www.bea.com/2003/03/wli/tpm) element.
 *
 * This is a complex type.
 */
public class AuthenticationDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.AuthenticationDocument
{
    
    public AuthenticationDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName AUTHENTICATION$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/2003/03/wli/tpm", "authentication");
    
    
    /**
     * Gets the "authentication" element
     */
    public com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication getAuthentication()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication target = null;
            target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication)get_store().find_element_user(AUTHENTICATION$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "authentication" element
     */
    public void setAuthentication(com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication authentication)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication target = null;
            target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication)get_store().find_element_user(AUTHENTICATION$0, 0);
            if (target == null)
            {
                target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication)get_store().add_element_user(AUTHENTICATION$0);
            }
            target.set(authentication);
        }
    }
    
    /**
     * Appends and returns a new empty "authentication" element
     */
    public com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication addNewAuthentication()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication target = null;
            target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication)get_store().add_element_user(AUTHENTICATION$0);
            return target;
        }
    }
    /**
     * An XML authentication(@http://www.bea.com/2003/03/wli/tpm).
     *
     * This is a complex type.
     */
    public static class AuthenticationImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication
    {
        
        public AuthenticationImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName CLIENTPARTNERNAME$0 = 
            new javax.xml.namespace.QName("", "client-partner-name");
        private static final javax.xml.namespace.QName CLIENTAUTHENTICATION$2 = 
            new javax.xml.namespace.QName("", "client-authentication");
        private static final javax.xml.namespace.QName USERNAME$4 = 
            new javax.xml.namespace.QName("", "username");
        private static final javax.xml.namespace.QName PASSWORDALIAS$6 = 
            new javax.xml.namespace.QName("", "password-alias");
        private static final javax.xml.namespace.QName CLIENTCERTIFICATENAME$8 = 
            new javax.xml.namespace.QName("", "client-certificate-name");
        private static final javax.xml.namespace.QName SERVERAUTHENTICATION$10 = 
            new javax.xml.namespace.QName("", "server-authentication");
        private static final javax.xml.namespace.QName SERVERCERTIFICATENAME$12 = 
            new javax.xml.namespace.QName("", "server-certificate-name");
        
        
        /**
         * Gets the "client-partner-name" attribute
         */
        public java.lang.String getClientPartnerName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLIENTPARTNERNAME$0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "client-partner-name" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetClientPartnerName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(CLIENTPARTNERNAME$0);
                return target;
            }
        }
        
        /**
         * Sets the "client-partner-name" attribute
         */
        public void setClientPartnerName(java.lang.String clientPartnerName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLIENTPARTNERNAME$0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLIENTPARTNERNAME$0);
                }
                target.setStringValue(clientPartnerName);
            }
        }
        
        /**
         * Sets (as xml) the "client-partner-name" attribute
         */
        public void xsetClientPartnerName(com.bea.x2003.x03.wli.tpm.Reference clientPartnerName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(CLIENTPARTNERNAME$0);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(CLIENTPARTNERNAME$0);
                }
                target.set(clientPartnerName);
            }
        }
        
        /**
         * Gets the "client-authentication" attribute
         */
        public com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication.Enum getClientAuthentication()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLIENTAUTHENTICATION$2);
                if (target == null)
                {
                    return null;
                }
                return (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication.Enum)target.getEnumValue();
            }
        }
        
        /**
         * Gets (as xml) the "client-authentication" attribute
         */
        public com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication xgetClientAuthentication()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication target = null;
                target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication)get_store().find_attribute_user(CLIENTAUTHENTICATION$2);
                return target;
            }
        }
        
        /**
         * True if has "client-authentication" attribute
         */
        public boolean isSetClientAuthentication()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(CLIENTAUTHENTICATION$2) != null;
            }
        }
        
        /**
         * Sets the "client-authentication" attribute
         */
        public void setClientAuthentication(com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication.Enum clientAuthentication)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLIENTAUTHENTICATION$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLIENTAUTHENTICATION$2);
                }
                target.setEnumValue(clientAuthentication);
            }
        }
        
        /**
         * Sets (as xml) the "client-authentication" attribute
         */
        public void xsetClientAuthentication(com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication clientAuthentication)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication target = null;
                target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication)get_store().find_attribute_user(CLIENTAUTHENTICATION$2);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication)get_store().add_attribute_user(CLIENTAUTHENTICATION$2);
                }
                target.set(clientAuthentication);
            }
        }
        
        /**
         * Unsets the "client-authentication" attribute
         */
        public void unsetClientAuthentication()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(CLIENTAUTHENTICATION$2);
            }
        }
        
        /**
         * Gets the "username" attribute
         */
        public java.lang.String getUsername()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(USERNAME$4);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "username" attribute
         */
        public org.apache.xmlbeans.XmlString xgetUsername()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(USERNAME$4);
                return target;
            }
        }
        
        /**
         * True if has "username" attribute
         */
        public boolean isSetUsername()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(USERNAME$4) != null;
            }
        }
        
        /**
         * Sets the "username" attribute
         */
        public void setUsername(java.lang.String username)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(USERNAME$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(USERNAME$4);
                }
                target.setStringValue(username);
            }
        }
        
        /**
         * Sets (as xml) the "username" attribute
         */
        public void xsetUsername(org.apache.xmlbeans.XmlString username)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(USERNAME$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(USERNAME$4);
                }
                target.set(username);
            }
        }
        
        /**
         * Unsets the "username" attribute
         */
        public void unsetUsername()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(USERNAME$4);
            }
        }
        
        /**
         * Gets the "password-alias" attribute
         */
        public java.lang.String getPasswordAlias()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PASSWORDALIAS$6);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "password-alias" attribute
         */
        public org.apache.xmlbeans.XmlString xgetPasswordAlias()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PASSWORDALIAS$6);
                return target;
            }
        }
        
        /**
         * True if has "password-alias" attribute
         */
        public boolean isSetPasswordAlias()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(PASSWORDALIAS$6) != null;
            }
        }
        
        /**
         * Sets the "password-alias" attribute
         */
        public void setPasswordAlias(java.lang.String passwordAlias)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PASSWORDALIAS$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PASSWORDALIAS$6);
                }
                target.setStringValue(passwordAlias);
            }
        }
        
        /**
         * Sets (as xml) the "password-alias" attribute
         */
        public void xsetPasswordAlias(org.apache.xmlbeans.XmlString passwordAlias)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(PASSWORDALIAS$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(PASSWORDALIAS$6);
                }
                target.set(passwordAlias);
            }
        }
        
        /**
         * Unsets the "password-alias" attribute
         */
        public void unsetPasswordAlias()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(PASSWORDALIAS$6);
            }
        }
        
        /**
         * Gets the "client-certificate-name" attribute
         */
        public java.lang.String getClientCertificateName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLIENTCERTIFICATENAME$8);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "client-certificate-name" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetClientCertificateName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(CLIENTCERTIFICATENAME$8);
                return target;
            }
        }
        
        /**
         * True if has "client-certificate-name" attribute
         */
        public boolean isSetClientCertificateName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(CLIENTCERTIFICATENAME$8) != null;
            }
        }
        
        /**
         * Sets the "client-certificate-name" attribute
         */
        public void setClientCertificateName(java.lang.String clientCertificateName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLIENTCERTIFICATENAME$8);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLIENTCERTIFICATENAME$8);
                }
                target.setStringValue(clientCertificateName);
            }
        }
        
        /**
         * Sets (as xml) the "client-certificate-name" attribute
         */
        public void xsetClientCertificateName(com.bea.x2003.x03.wli.tpm.Reference clientCertificateName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(CLIENTCERTIFICATENAME$8);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(CLIENTCERTIFICATENAME$8);
                }
                target.set(clientCertificateName);
            }
        }
        
        /**
         * Unsets the "client-certificate-name" attribute
         */
        public void unsetClientCertificateName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(CLIENTCERTIFICATENAME$8);
            }
        }
        
        /**
         * Gets the "server-authentication" attribute
         */
        public com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication.Enum getServerAuthentication()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SERVERAUTHENTICATION$10);
                if (target == null)
                {
                    return null;
                }
                return (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication.Enum)target.getEnumValue();
            }
        }
        
        /**
         * Gets (as xml) the "server-authentication" attribute
         */
        public com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication xgetServerAuthentication()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication target = null;
                target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication)get_store().find_attribute_user(SERVERAUTHENTICATION$10);
                return target;
            }
        }
        
        /**
         * True if has "server-authentication" attribute
         */
        public boolean isSetServerAuthentication()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(SERVERAUTHENTICATION$10) != null;
            }
        }
        
        /**
         * Sets the "server-authentication" attribute
         */
        public void setServerAuthentication(com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication.Enum serverAuthentication)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SERVERAUTHENTICATION$10);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SERVERAUTHENTICATION$10);
                }
                target.setEnumValue(serverAuthentication);
            }
        }
        
        /**
         * Sets (as xml) the "server-authentication" attribute
         */
        public void xsetServerAuthentication(com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication serverAuthentication)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication target = null;
                target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication)get_store().find_attribute_user(SERVERAUTHENTICATION$10);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication)get_store().add_attribute_user(SERVERAUTHENTICATION$10);
                }
                target.set(serverAuthentication);
            }
        }
        
        /**
         * Unsets the "server-authentication" attribute
         */
        public void unsetServerAuthentication()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(SERVERAUTHENTICATION$10);
            }
        }
        
        /**
         * Gets the "server-certificate-name" attribute
         */
        public java.lang.String getServerCertificateName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SERVERCERTIFICATENAME$12);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "server-certificate-name" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetServerCertificateName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(SERVERCERTIFICATENAME$12);
                return target;
            }
        }
        
        /**
         * True if has "server-certificate-name" attribute
         */
        public boolean isSetServerCertificateName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(SERVERCERTIFICATENAME$12) != null;
            }
        }
        
        /**
         * Sets the "server-certificate-name" attribute
         */
        public void setServerCertificateName(java.lang.String serverCertificateName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SERVERCERTIFICATENAME$12);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SERVERCERTIFICATENAME$12);
                }
                target.setStringValue(serverCertificateName);
            }
        }
        
        /**
         * Sets (as xml) the "server-certificate-name" attribute
         */
        public void xsetServerCertificateName(com.bea.x2003.x03.wli.tpm.Reference serverCertificateName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(SERVERCERTIFICATENAME$12);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(SERVERCERTIFICATENAME$12);
                }
                target.set(serverCertificateName);
            }
        }
        
        /**
         * Unsets the "server-certificate-name" attribute
         */
        public void unsetServerCertificateName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(SERVERCERTIFICATENAME$12);
            }
        }
        /**
         * An XML client-authentication(@).
         *
         * This is an atomic type that is a restriction of com.bea.x2003.x03.wli.tpm.AuthenticationDocument$Authentication$ClientAuthentication.
         */
        public static class ClientAuthenticationImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ClientAuthentication
        {
            
            public ClientAuthenticationImpl(org.apache.xmlbeans.SchemaType sType)
            {
                super(sType, false);
            }
            
            protected ClientAuthenticationImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
            {
                super(sType, b);
            }
        }
        /**
         * An XML server-authentication(@).
         *
         * This is an atomic type that is a restriction of com.bea.x2003.x03.wli.tpm.AuthenticationDocument$Authentication$ServerAuthentication.
         */
        public static class ServerAuthenticationImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements com.bea.x2003.x03.wli.tpm.AuthenticationDocument.Authentication.ServerAuthentication
        {
            
            public ServerAuthenticationImpl(org.apache.xmlbeans.SchemaType sType)
            {
                super(sType, false);
            }
            
            protected ServerAuthenticationImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
            {
                super(sType, b);
            }
        }
    }
}
