/// <summary>
        /// Parse raw PA_DATA type to IPaData object.
        /// </summary>
        /// <param name="data">Raw PA_DATA</param>
        /// <returns>Reference to IPaData object</returns>
        public static IPaData ParseReqPaData(PA_DATA data)
        {
            switch (data.padata_type.Value)
            {
            case (long)PaDataType.PA_FX_FAST:
                return(PaFxFastReq.Parse(data));

            case (long)PaDataType.PA_PAC_REQUEST:
                return(PaPacRequest.Parse(data));

            case (long)PaDataType.PA_TGS_REQ:
                return(PaTgsReq.Parse(data));

            case (long)PaDataType.PA_ETYPE_INFO2:
                return(PaETypeInfo2.Parse(data));
            }
            return(PaRawData.Parse(data));
        }
        /// <summary>
        /// Parse raw PA_DATA type to IPaData object.
        /// </summary>
        /// <param name="data">Raw PA_DATA</param>
        /// <returns>Reference to IPaData object</returns>
        public static IPaData ParseRepPaData(PA_DATA data)
        {
            switch (data.padata_type.Value)
            {
            case (long)PaDataType.PA_FX_FAST:
                return(PaFxFastRep.Parse(data));

            case (long)PaDataType.PA_ETYPE_INFO2:
                return(PaETypeInfo2.Parse(data));

            case (long)PaDataType.PA_FX_ERROR:
                return(PaFxError.Parse(data));

            case (long)PaDataType.PA_FX_COOKIE:
                return(PaFxCookie.Parse(data));

            case (long)PaDataType.PA_SUPPORTED_ENCTYPES:
                return(PaSupportedEncTypes.Parse(data));

            case (long)PaDataType.PA_SVR_REFERRAL_INFO:
                return(PaSvrReferralInfo.Parse(data));
            }
            return(PaRawData.Parse(data));
        }