/************************************************************************
*
* 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)
*
************************************************************************/


/**
 * RequestSecurityTokenResponseType.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package org.xmlsoap.schemas.ws._2002._12.secext;

public class RequestSecurityTokenResponseType  implements java.io.Serializable {
    private org.xmlsoap.schemas.ws._2002._12.secext.TokenTypeEnum tokenType;
    private org.xmlsoap.schemas.ws._2002._12.secext.KeyEnum keyType;
    private de.nece.ccrl.schemas.secmsg.MessageType message;
    private org.xmlsoap.schemas.ws._2002._12.secext.RequestedSecurityTokenType[] requestedSecurityToken;

    public RequestSecurityTokenResponseType() {
    }

    public org.xmlsoap.schemas.ws._2002._12.secext.TokenTypeEnum getTokenType() {
        return tokenType;
    }

    public void setTokenType(org.xmlsoap.schemas.ws._2002._12.secext.TokenTypeEnum tokenType) {
        this.tokenType = tokenType;
    }

    public org.xmlsoap.schemas.ws._2002._12.secext.KeyEnum getKeyType() {
        return keyType;
    }

    public void setKeyType(org.xmlsoap.schemas.ws._2002._12.secext.KeyEnum keyType) {
        this.keyType = keyType;
    }

    public de.nece.ccrl.schemas.secmsg.MessageType getMessage() {
        return message;
    }

    public void setMessage(de.nece.ccrl.schemas.secmsg.MessageType message) {
        this.message = message;
    }

    public org.xmlsoap.schemas.ws._2002._12.secext.RequestedSecurityTokenType[] getRequestedSecurityToken() {
        return requestedSecurityToken;
    }

    public void setRequestedSecurityToken(org.xmlsoap.schemas.ws._2002._12.secext.RequestedSecurityTokenType[] requestedSecurityToken) {
        this.requestedSecurityToken = requestedSecurityToken;
    }

    public org.xmlsoap.schemas.ws._2002._12.secext.RequestedSecurityTokenType getRequestedSecurityToken(int i) {
        return requestedSecurityToken[i];
    }

    public void setRequestedSecurityToken(int i, org.xmlsoap.schemas.ws._2002._12.secext.RequestedSecurityTokenType value) {
        this.requestedSecurityToken[i] = value;
    }

    private java.lang.Object __equalsCalc = null;
    public synchronized boolean equals(java.lang.Object obj) {
        if (!(obj instanceof RequestSecurityTokenResponseType)) return false;
        RequestSecurityTokenResponseType other = (RequestSecurityTokenResponseType) obj;
        if (obj == null) return false;
        if (this == obj) return true;
        if (__equalsCalc != null) {
            return (__equalsCalc == obj);
        }
        __equalsCalc = obj;
        boolean _equals;
        _equals = true && 
            ((this.tokenType==null && other.getTokenType()==null) || 
             (this.tokenType!=null &&
              this.tokenType.equals(other.getTokenType()))) &&
            ((this.keyType==null && other.getKeyType()==null) || 
             (this.keyType!=null &&
              this.keyType.equals(other.getKeyType()))) &&
            ((this.message==null && other.getMessage()==null) || 
             (this.message!=null &&
              this.message.equals(other.getMessage()))) &&
            ((this.requestedSecurityToken==null && other.getRequestedSecurityToken()==null) || 
             (this.requestedSecurityToken!=null &&
              java.util.Arrays.equals(this.requestedSecurityToken, other.getRequestedSecurityToken())));
        __equalsCalc = null;
        return _equals;
    }

    private boolean __hashCodeCalc = false;
    public synchronized int hashCode() {
        if (__hashCodeCalc) {
            return 0;
        }
        __hashCodeCalc = true;
        int _hashCode = 1;
        if (getTokenType() != null) {
            _hashCode += getTokenType().hashCode();
        }
        if (getKeyType() != null) {
            _hashCode += getKeyType().hashCode();
        }
        if (getMessage() != null) {
            _hashCode += getMessage().hashCode();
        }
        if (getRequestedSecurityToken() != null) {
            for (int i=0;
                 i<java.lang.reflect.Array.getLength(getRequestedSecurityToken());
                 i++) {
                java.lang.Object obj = java.lang.reflect.Array.get(getRequestedSecurityToken(), i);
                if (obj != null &&
                    !obj.getClass().isArray()) {
                    _hashCode += obj.hashCode();
                }
            }
        }
        __hashCodeCalc = false;
        return _hashCode;
    }

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

    static {
        typeDesc.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "RequestSecurityTokenResponseType"));
        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("tokenType");
        elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "TokenType"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "TokenTypeEnum"));
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("keyType");
        elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "KeyType"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "KeyEnum"));
        elemField.setMinOccurs(0);
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("message");
        elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.ccrl.nece.de/secmsg", "Message"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.ccrl.nece.de/secmsg", "MessageType"));
        typeDesc.addFieldDesc(elemField);
        elemField = new org.apache.axis.description.ElementDesc();
        elemField.setFieldName("requestedSecurityToken");
        elemField.setXmlName(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "RequestedSecurityToken"));
        elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext", "RequestedSecurityTokenType"));
        elemField.setMinOccurs(0);
        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);
    }

}
