/************************************************************************
*
* Copyright (c) 2003-2004, C&C Research Laboratories, NEC Europe Ltd.
*
* Copyright in this library belongs to C&C Research Laboratories,
* Rathausallee 10, 53757 Sankt Augustin, Germany.
*
* This software may not be used, sold, licensed, transferred, copied
* or reproduced in whole or in part in any manner or form or in or
* on any media by any person other than in accordance with the terms
* of the Licence Agreement supplied with the software, or otherwise
* without the prior written consent of the copyright owners.
*
* This software is distributed WITHOUT ANY WARRANTY, without even the
* implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE, except where stated in the Licence Agreement supplied with
* the software.
*
*  Created By :           Federico Crazzolara
*  Created for Project :  GEMSS (IST-2001-37153)
*
************************************************************************/

package de.nece.ccrl.schemas.secmsg;

public class MessageType  implements java.io.Serializable {
    private de.nece.ccrl.schemas.secmsg.EncodedString nonce;
    private java.lang.String DN;
    private de.nece.ccrl.schemas.secmsg.MessageList list;

    public MessageType() {
    }

    public de.nece.ccrl.schemas.secmsg.EncodedString getNonce() {
        return nonce;
    }

    public void setNonce(de.nece.ccrl.schemas.secmsg.EncodedString nonce) {
        this.nonce = nonce;
    }

    public java.lang.String getDN() {
        return DN;
    }

    public void setDN(java.lang.String DN) {
        this.DN = DN;
    }

    public de.nece.ccrl.schemas.secmsg.MessageList getList() {
        return list;
    }

    public void setList(de.nece.ccrl.schemas.secmsg.MessageList list) {
        this.list = list;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof MessageType)) return false;
        MessageType other = (MessageType) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.nonce==null && other.getNonce()==null) || 
             (this.nonce!=null &&
              this.nonce.equals(other.getNonce()))) &&
            ((this.DN==null && other.getDN()==null) || 
             (this.DN!=null &&
              this.DN.equals(other.getDN()))) &&
            ((this.list==null && other.getList()==null) || 
             (this.list!=null &&
              this.list.equals(other.getList())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getNonce() != null) {
            _hashCode += getNonce().hashCode();
        }
        if (getDN() != null) {
            _hashCode += getDN().hashCode();
        }
        if (getList() != null) {
            _hashCode += getList().hashCode();
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

    // Type metadata
    private static org.apache.axis.description.TypeDesc typeDesc =
        new org.apache.axis.description.TypeDesc(MessageType.class);

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://schemas.ccrl.nece.de/secmsg", "MessageType"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("nonce");
        elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.ccrl.nece.de/secmsg", "Nonce"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.ccrl.nece.de/secmsg", "EncodedString"));
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("DN");
        elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.ccrl.nece.de/secmsg", "DN"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("list");
        elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.ccrl.nece.de/secmsg", "List"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.ccrl.nece.de/secmsg", "MessageList"));
        typeDesc.addFieldDesc(elemField);
    }

    /**
     * Return type metadata object
     */
    public static org.apache.axis.description.TypeDesc getTypeDesc() {
        return typeDesc;
    }

    /**
     * Get Custom Serializer
     */
    public static org.apache.axis.encoding.Serializer getSerializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanSerializer(
            _javaType, _xmlType, typeDesc);
    }

    /**
     * Get Custom Deserializer
     */
    public static org.apache.axis.encoding.Deserializer getDeserializer(
           java.lang.String mechType, 
           java.lang.Class _javaType,  
           javax.xml.namespace.QName _xmlType) {
        return 
          new  org.apache.axis.encoding.ser.BeanDeserializer(
            _javaType, _xmlType, typeDesc);
    }

}
