public ReturnLegValuation(XmlNode xmlNode)
 {
     XmlNode initialPriceNode = xmlNode.SelectSingleNode("initialPrice");
     
     if (initialPriceNode != null)
     {
         if (initialPriceNode.Attributes["href"] != null || initialPriceNode.Attributes["id"] != null) 
         {
             if (initialPriceNode.Attributes["id"] != null) 
             {
                 initialPriceIDRef_ = initialPriceNode.Attributes["id"].Value;
                 ReturnLegValuationPrice ob = new ReturnLegValuationPrice(initialPriceNode);
                 IDManager.SetID(initialPriceIDRef_, ob);
             }
             else if (initialPriceNode.Attributes["href"] != null)
             {
                 initialPriceIDRef_ = initialPriceNode.Attributes["href"].Value;
             }
             else
             {
                 initialPrice_ = new ReturnLegValuationPrice(initialPriceNode);
             }
         }
         else
         {
             initialPrice_ = new ReturnLegValuationPrice(initialPriceNode);
         }
     }
     
 
     XmlNode notionalResetNode = xmlNode.SelectSingleNode("notionalReset");
     
     if (notionalResetNode != null)
     {
         if (notionalResetNode.Attributes["href"] != null || notionalResetNode.Attributes["id"] != null) 
         {
             if (notionalResetNode.Attributes["id"] != null) 
             {
                 notionalResetIDRef_ = notionalResetNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(notionalResetNode);
                 IDManager.SetID(notionalResetIDRef_, ob);
             }
             else if (notionalResetNode.Attributes["href"] != null)
             {
                 notionalResetIDRef_ = notionalResetNode.Attributes["href"].Value;
             }
             else
             {
                 notionalReset_ = new XsdTypeBoolean(notionalResetNode);
             }
         }
         else
         {
             notionalReset_ = new XsdTypeBoolean(notionalResetNode);
         }
     }
     
 
     XmlNode valuationPriceInterimNode = xmlNode.SelectSingleNode("valuationPriceInterim");
     
     if (valuationPriceInterimNode != null)
     {
         if (valuationPriceInterimNode.Attributes["href"] != null || valuationPriceInterimNode.Attributes["id"] != null) 
         {
             if (valuationPriceInterimNode.Attributes["id"] != null) 
             {
                 valuationPriceInterimIDRef_ = valuationPriceInterimNode.Attributes["id"].Value;
                 ReturnLegValuationPrice ob = new ReturnLegValuationPrice(valuationPriceInterimNode);
                 IDManager.SetID(valuationPriceInterimIDRef_, ob);
             }
             else if (valuationPriceInterimNode.Attributes["href"] != null)
             {
                 valuationPriceInterimIDRef_ = valuationPriceInterimNode.Attributes["href"].Value;
             }
             else
             {
                 valuationPriceInterim_ = new ReturnLegValuationPrice(valuationPriceInterimNode);
             }
         }
         else
         {
             valuationPriceInterim_ = new ReturnLegValuationPrice(valuationPriceInterimNode);
         }
     }
     
 
     XmlNode valuationPriceFinalNode = xmlNode.SelectSingleNode("valuationPriceFinal");
     
     if (valuationPriceFinalNode != null)
     {
         if (valuationPriceFinalNode.Attributes["href"] != null || valuationPriceFinalNode.Attributes["id"] != null) 
         {
             if (valuationPriceFinalNode.Attributes["id"] != null) 
             {
                 valuationPriceFinalIDRef_ = valuationPriceFinalNode.Attributes["id"].Value;
                 ReturnLegValuationPrice ob = new ReturnLegValuationPrice(valuationPriceFinalNode);
                 IDManager.SetID(valuationPriceFinalIDRef_, ob);
             }
             else if (valuationPriceFinalNode.Attributes["href"] != null)
             {
                 valuationPriceFinalIDRef_ = valuationPriceFinalNode.Attributes["href"].Value;
             }
             else
             {
                 valuationPriceFinal_ = new ReturnLegValuationPrice(valuationPriceFinalNode);
             }
         }
         else
         {
             valuationPriceFinal_ = new ReturnLegValuationPrice(valuationPriceFinalNode);
         }
     }
     
 
     XmlNode paymentDatesNode = xmlNode.SelectSingleNode("paymentDates");
     
     if (paymentDatesNode != null)
     {
         if (paymentDatesNode.Attributes["href"] != null || paymentDatesNode.Attributes["id"] != null) 
         {
             if (paymentDatesNode.Attributes["id"] != null) 
             {
                 paymentDatesIDRef_ = paymentDatesNode.Attributes["id"].Value;
                 ReturnSwapPaymentDates ob = new ReturnSwapPaymentDates(paymentDatesNode);
                 IDManager.SetID(paymentDatesIDRef_, ob);
             }
             else if (paymentDatesNode.Attributes["href"] != null)
             {
                 paymentDatesIDRef_ = paymentDatesNode.Attributes["href"].Value;
             }
             else
             {
                 paymentDates_ = new ReturnSwapPaymentDates(paymentDatesNode);
             }
         }
         else
         {
             paymentDates_ = new ReturnSwapPaymentDates(paymentDatesNode);
         }
     }
     
 
     XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");
     
     if (exchangeTradedContractNearestNode != null)
     {
         if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null) 
         {
             if (exchangeTradedContractNearestNode.Attributes["id"] != null) 
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                 ExchangeTradedContract ob = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                 IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
             }
             else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
             }
         }
         else
         {
             exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
         }
     }
     
 
 }
        public ReturnLegValuation(XmlNode xmlNode)
        {
            XmlNode initialPriceNode = xmlNode.SelectSingleNode("initialPrice");

            if (initialPriceNode != null)
            {
                if (initialPriceNode.Attributes["href"] != null || initialPriceNode.Attributes["id"] != null)
                {
                    if (initialPriceNode.Attributes["id"] != null)
                    {
                        initialPriceIDRef_ = initialPriceNode.Attributes["id"].Value;
                        ReturnLegValuationPrice ob = new ReturnLegValuationPrice(initialPriceNode);
                        IDManager.SetID(initialPriceIDRef_, ob);
                    }
                    else if (initialPriceNode.Attributes["href"] != null)
                    {
                        initialPriceIDRef_ = initialPriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        initialPrice_ = new ReturnLegValuationPrice(initialPriceNode);
                    }
                }
                else
                {
                    initialPrice_ = new ReturnLegValuationPrice(initialPriceNode);
                }
            }


            XmlNode notionalResetNode = xmlNode.SelectSingleNode("notionalReset");

            if (notionalResetNode != null)
            {
                if (notionalResetNode.Attributes["href"] != null || notionalResetNode.Attributes["id"] != null)
                {
                    if (notionalResetNode.Attributes["id"] != null)
                    {
                        notionalResetIDRef_ = notionalResetNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(notionalResetNode);
                        IDManager.SetID(notionalResetIDRef_, ob);
                    }
                    else if (notionalResetNode.Attributes["href"] != null)
                    {
                        notionalResetIDRef_ = notionalResetNode.Attributes["href"].Value;
                    }
                    else
                    {
                        notionalReset_ = new XsdTypeBoolean(notionalResetNode);
                    }
                }
                else
                {
                    notionalReset_ = new XsdTypeBoolean(notionalResetNode);
                }
            }


            XmlNode valuationPriceInterimNode = xmlNode.SelectSingleNode("valuationPriceInterim");

            if (valuationPriceInterimNode != null)
            {
                if (valuationPriceInterimNode.Attributes["href"] != null || valuationPriceInterimNode.Attributes["id"] != null)
                {
                    if (valuationPriceInterimNode.Attributes["id"] != null)
                    {
                        valuationPriceInterimIDRef_ = valuationPriceInterimNode.Attributes["id"].Value;
                        ReturnLegValuationPrice ob = new ReturnLegValuationPrice(valuationPriceInterimNode);
                        IDManager.SetID(valuationPriceInterimIDRef_, ob);
                    }
                    else if (valuationPriceInterimNode.Attributes["href"] != null)
                    {
                        valuationPriceInterimIDRef_ = valuationPriceInterimNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationPriceInterim_ = new ReturnLegValuationPrice(valuationPriceInterimNode);
                    }
                }
                else
                {
                    valuationPriceInterim_ = new ReturnLegValuationPrice(valuationPriceInterimNode);
                }
            }


            XmlNode valuationPriceFinalNode = xmlNode.SelectSingleNode("valuationPriceFinal");

            if (valuationPriceFinalNode != null)
            {
                if (valuationPriceFinalNode.Attributes["href"] != null || valuationPriceFinalNode.Attributes["id"] != null)
                {
                    if (valuationPriceFinalNode.Attributes["id"] != null)
                    {
                        valuationPriceFinalIDRef_ = valuationPriceFinalNode.Attributes["id"].Value;
                        ReturnLegValuationPrice ob = new ReturnLegValuationPrice(valuationPriceFinalNode);
                        IDManager.SetID(valuationPriceFinalIDRef_, ob);
                    }
                    else if (valuationPriceFinalNode.Attributes["href"] != null)
                    {
                        valuationPriceFinalIDRef_ = valuationPriceFinalNode.Attributes["href"].Value;
                    }
                    else
                    {
                        valuationPriceFinal_ = new ReturnLegValuationPrice(valuationPriceFinalNode);
                    }
                }
                else
                {
                    valuationPriceFinal_ = new ReturnLegValuationPrice(valuationPriceFinalNode);
                }
            }


            XmlNode paymentDatesNode = xmlNode.SelectSingleNode("paymentDates");

            if (paymentDatesNode != null)
            {
                if (paymentDatesNode.Attributes["href"] != null || paymentDatesNode.Attributes["id"] != null)
                {
                    if (paymentDatesNode.Attributes["id"] != null)
                    {
                        paymentDatesIDRef_ = paymentDatesNode.Attributes["id"].Value;
                        ReturnSwapPaymentDates ob = new ReturnSwapPaymentDates(paymentDatesNode);
                        IDManager.SetID(paymentDatesIDRef_, ob);
                    }
                    else if (paymentDatesNode.Attributes["href"] != null)
                    {
                        paymentDatesIDRef_ = paymentDatesNode.Attributes["href"].Value;
                    }
                    else
                    {
                        paymentDates_ = new ReturnSwapPaymentDates(paymentDatesNode);
                    }
                }
                else
                {
                    paymentDates_ = new ReturnSwapPaymentDates(paymentDatesNode);
                }
            }


            XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");

            if (exchangeTradedContractNearestNode != null)
            {
                if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null)
                {
                    if (exchangeTradedContractNearestNode.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                        ExchangeTradedContract ob = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                        IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
                    }
                    else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                    }
                }
                else
                {
                    exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                }
            }
        }
        public Variance(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNodeList varianceAmountNodeList = xmlNode.SelectNodes("varianceAmount");

            if (varianceAmountNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in varianceAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceAmountIDRef = item.Attributes["id"].Name;
                        NonNegativeMoney ob = NonNegativeMoney();
                        IDManager.SetID(varianceAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceAmount = new NonNegativeMoney(item);
                    }
                }
            }


            XmlNodeList volatilityStrikePriceNodeList = xmlNode.SelectNodes("volatilityStrikePrice");

            if (volatilityStrikePriceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in volatilityStrikePriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        volatilityStrikePriceIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(volatilityStrikePriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        volatilityStrikePriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        volatilityStrikePrice = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList varianceStrikePriceNodeList = xmlNode.SelectNodes("varianceStrikePrice");

            if (varianceStrikePriceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in varianceStrikePriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceStrikePriceIDRef = item.Attributes["id"].Name;
                        NonNegativeDecimal ob = NonNegativeDecimal();
                        IDManager.SetID(varianceStrikePriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceStrikePriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceStrikePrice = new NonNegativeDecimal(item);
                    }
                }
            }


            XmlNodeList varianceCapNodeList = xmlNode.SelectNodes("varianceCap");

            if (varianceCapNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in varianceCapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        varianceCapIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(varianceCapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        varianceCapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        varianceCap = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList unadjustedVarianceCapNodeList = xmlNode.SelectNodes("unadjustedVarianceCap");

            if (unadjustedVarianceCapNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in unadjustedVarianceCapNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        unadjustedVarianceCapIDRef = item.Attributes["id"].Name;
                        PositiveDecimal ob = PositiveDecimal();
                        IDManager.SetID(unadjustedVarianceCapIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        unadjustedVarianceCapIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        unadjustedVarianceCap = new PositiveDecimal(item);
                    }
                }
            }


            XmlNodeList boundedVarianceNodeList = xmlNode.SelectNodes("boundedVariance");

            if (boundedVarianceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in boundedVarianceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        boundedVarianceIDRef = item.Attributes["id"].Name;
                        BoundedVariance ob = BoundedVariance();
                        IDManager.SetID(boundedVarianceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        boundedVarianceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        boundedVariance = new BoundedVariance(item);
                    }
                }
            }


            XmlNodeList exchangeTradedContractNearestNodeList = xmlNode.SelectNodes("exchangeTradedContractNearest");

            if (exchangeTradedContractNearestNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in exchangeTradedContractNearestNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["id"].Name;
                        ExchangeTradedContract ob = ExchangeTradedContract();
                        IDManager.SetID(exchangeTradedContractNearestIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeTradedContractNearest = new ExchangeTradedContract(item);
                    }
                }
            }


            XmlNodeList vegaNotionalAmountNodeList = xmlNode.SelectNodes("vegaNotionalAmount");

            if (vegaNotionalAmountNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in vegaNotionalAmountNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        vegaNotionalAmountIDRef = item.Attributes["id"].Name;
                        XsdTypeDecimal ob = XsdTypeDecimal();
                        IDManager.SetID(vegaNotionalAmountIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        vegaNotionalAmountIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        vegaNotionalAmount = new XsdTypeDecimal(item);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public Variance(XmlNode xmlNode)
            : base(xmlNode)
        {
            XmlNode varianceAmountNode = xmlNode.SelectSingleNode("varianceAmount");

            if (varianceAmountNode != null)
            {
                if (varianceAmountNode.Attributes["href"] != null || varianceAmountNode.Attributes["id"] != null)
                {
                    if (varianceAmountNode.Attributes["id"] != null)
                    {
                        varianceAmountIDRef_ = varianceAmountNode.Attributes["id"].Value;
                        NonNegativeMoney ob = new NonNegativeMoney(varianceAmountNode);
                        IDManager.SetID(varianceAmountIDRef_, ob);
                    }
                    else if (varianceAmountNode.Attributes["href"] != null)
                    {
                        varianceAmountIDRef_ = varianceAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
                    }
                }
                else
                {
                    varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
                }
            }


            XmlNode volatilityStrikePriceNode = xmlNode.SelectSingleNode("volatilityStrikePrice");

            if (volatilityStrikePriceNode != null)
            {
                if (volatilityStrikePriceNode.Attributes["href"] != null || volatilityStrikePriceNode.Attributes["id"] != null)
                {
                    if (volatilityStrikePriceNode.Attributes["id"] != null)
                    {
                        volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(volatilityStrikePriceNode);
                        IDManager.SetID(volatilityStrikePriceIDRef_, ob);
                    }
                    else if (volatilityStrikePriceNode.Attributes["href"] != null)
                    {
                        volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
                    }
                }
                else
                {
                    volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
                }
            }


            XmlNode varianceStrikePriceNode = xmlNode.SelectSingleNode("varianceStrikePrice");

            if (varianceStrikePriceNode != null)
            {
                if (varianceStrikePriceNode.Attributes["href"] != null || varianceStrikePriceNode.Attributes["id"] != null)
                {
                    if (varianceStrikePriceNode.Attributes["id"] != null)
                    {
                        varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["id"].Value;
                        NonNegativeDecimal ob = new NonNegativeDecimal(varianceStrikePriceNode);
                        IDManager.SetID(varianceStrikePriceIDRef_, ob);
                    }
                    else if (varianceStrikePriceNode.Attributes["href"] != null)
                    {
                        varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
                    }
                }
                else
                {
                    varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
                }
            }


            XmlNode varianceCapNode = xmlNode.SelectSingleNode("varianceCap");

            if (varianceCapNode != null)
            {
                if (varianceCapNode.Attributes["href"] != null || varianceCapNode.Attributes["id"] != null)
                {
                    if (varianceCapNode.Attributes["id"] != null)
                    {
                        varianceCapIDRef_ = varianceCapNode.Attributes["id"].Value;
                        XsdTypeBoolean ob = new XsdTypeBoolean(varianceCapNode);
                        IDManager.SetID(varianceCapIDRef_, ob);
                    }
                    else if (varianceCapNode.Attributes["href"] != null)
                    {
                        varianceCapIDRef_ = varianceCapNode.Attributes["href"].Value;
                    }
                    else
                    {
                        varianceCap_ = new XsdTypeBoolean(varianceCapNode);
                    }
                }
                else
                {
                    varianceCap_ = new XsdTypeBoolean(varianceCapNode);
                }
            }


            XmlNode unadjustedVarianceCapNode = xmlNode.SelectSingleNode("unadjustedVarianceCap");

            if (unadjustedVarianceCapNode != null)
            {
                if (unadjustedVarianceCapNode.Attributes["href"] != null || unadjustedVarianceCapNode.Attributes["id"] != null)
                {
                    if (unadjustedVarianceCapNode.Attributes["id"] != null)
                    {
                        unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["id"].Value;
                        PositiveDecimal ob = new PositiveDecimal(unadjustedVarianceCapNode);
                        IDManager.SetID(unadjustedVarianceCapIDRef_, ob);
                    }
                    else if (unadjustedVarianceCapNode.Attributes["href"] != null)
                    {
                        unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["href"].Value;
                    }
                    else
                    {
                        unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
                    }
                }
                else
                {
                    unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
                }
            }


            XmlNode boundedVarianceNode = xmlNode.SelectSingleNode("boundedVariance");

            if (boundedVarianceNode != null)
            {
                if (boundedVarianceNode.Attributes["href"] != null || boundedVarianceNode.Attributes["id"] != null)
                {
                    if (boundedVarianceNode.Attributes["id"] != null)
                    {
                        boundedVarianceIDRef_ = boundedVarianceNode.Attributes["id"].Value;
                        BoundedVariance ob = new BoundedVariance(boundedVarianceNode);
                        IDManager.SetID(boundedVarianceIDRef_, ob);
                    }
                    else if (boundedVarianceNode.Attributes["href"] != null)
                    {
                        boundedVarianceIDRef_ = boundedVarianceNode.Attributes["href"].Value;
                    }
                    else
                    {
                        boundedVariance_ = new BoundedVariance(boundedVarianceNode);
                    }
                }
                else
                {
                    boundedVariance_ = new BoundedVariance(boundedVarianceNode);
                }
            }


            XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");

            if (exchangeTradedContractNearestNode != null)
            {
                if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null)
                {
                    if (exchangeTradedContractNearestNode.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                        ExchangeTradedContract ob = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                        IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
                    }
                    else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
                    {
                        exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
                    }
                    else
                    {
                        exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                    }
                }
                else
                {
                    exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                }
            }


            XmlNode vegaNotionalAmountNode = xmlNode.SelectSingleNode("vegaNotionalAmount");

            if (vegaNotionalAmountNode != null)
            {
                if (vegaNotionalAmountNode.Attributes["href"] != null || vegaNotionalAmountNode.Attributes["id"] != null)
                {
                    if (vegaNotionalAmountNode.Attributes["id"] != null)
                    {
                        vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["id"].Value;
                        XsdTypeDecimal ob = new XsdTypeDecimal(vegaNotionalAmountNode);
                        IDManager.SetID(vegaNotionalAmountIDRef_, ob);
                    }
                    else if (vegaNotionalAmountNode.Attributes["href"] != null)
                    {
                        vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["href"].Value;
                    }
                    else
                    {
                        vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
                    }
                }
                else
                {
                    vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
                }
            }
        }
 public Variance(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNodeList varianceAmountNodeList = xmlNode.SelectNodes("varianceAmount");
     if (varianceAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceAmountIDRef = item.Attributes["id"].Name;
                 NonNegativeMoney ob = NonNegativeMoney();
                 IDManager.SetID(varianceAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceAmount = new NonNegativeMoney(item);
             }
         }
     }
     
 
     XmlNodeList volatilityStrikePriceNodeList = xmlNode.SelectNodes("volatilityStrikePrice");
     if (volatilityStrikePriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in volatilityStrikePriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 volatilityStrikePriceIDRef = item.Attributes["id"].Name;
                 NonNegativeDecimal ob = NonNegativeDecimal();
                 IDManager.SetID(volatilityStrikePriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 volatilityStrikePriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 volatilityStrikePrice = new NonNegativeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList varianceStrikePriceNodeList = xmlNode.SelectNodes("varianceStrikePrice");
     if (varianceStrikePriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceStrikePriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceStrikePriceIDRef = item.Attributes["id"].Name;
                 NonNegativeDecimal ob = NonNegativeDecimal();
                 IDManager.SetID(varianceStrikePriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceStrikePriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceStrikePrice = new NonNegativeDecimal(item);
             }
         }
     }
     
 
     XmlNodeList varianceCapNodeList = xmlNode.SelectNodes("varianceCap");
     if (varianceCapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in varianceCapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 varianceCapIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(varianceCapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 varianceCapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 varianceCap = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList unadjustedVarianceCapNodeList = xmlNode.SelectNodes("unadjustedVarianceCap");
     if (unadjustedVarianceCapNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in unadjustedVarianceCapNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 unadjustedVarianceCapIDRef = item.Attributes["id"].Name;
                 PositiveDecimal ob = PositiveDecimal();
                 IDManager.SetID(unadjustedVarianceCapIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 unadjustedVarianceCapIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 unadjustedVarianceCap = new PositiveDecimal(item);
             }
         }
     }
     
 
     XmlNodeList boundedVarianceNodeList = xmlNode.SelectNodes("boundedVariance");
     if (boundedVarianceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in boundedVarianceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 boundedVarianceIDRef = item.Attributes["id"].Name;
                 BoundedVariance ob = BoundedVariance();
                 IDManager.SetID(boundedVarianceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 boundedVarianceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 boundedVariance = new BoundedVariance(item);
             }
         }
     }
     
 
     XmlNodeList exchangeTradedContractNearestNodeList = xmlNode.SelectNodes("exchangeTradedContractNearest");
     if (exchangeTradedContractNearestNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeTradedContractNearestNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeTradedContractNearestIDRef = item.Attributes["id"].Name;
                 ExchangeTradedContract ob = ExchangeTradedContract();
                 IDManager.SetID(exchangeTradedContractNearestIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeTradedContractNearestIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeTradedContractNearest = new ExchangeTradedContract(item);
             }
         }
     }
     
 
     XmlNodeList vegaNotionalAmountNodeList = xmlNode.SelectNodes("vegaNotionalAmount");
     if (vegaNotionalAmountNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in vegaNotionalAmountNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 vegaNotionalAmountIDRef = item.Attributes["id"].Name;
                 XsdTypeDecimal ob = XsdTypeDecimal();
                 IDManager.SetID(vegaNotionalAmountIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 vegaNotionalAmountIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 vegaNotionalAmount = new XsdTypeDecimal(item);
             }
         }
     }
     
 
 }
 public ReturnLegValuation(XmlNode xmlNode)
 {
     XmlNodeList initialPriceNodeList = xmlNode.SelectNodes("initialPrice");
     if (initialPriceNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in initialPriceNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 initialPriceIDRef = item.Attributes["id"].Name;
                 ReturnLegValuationPrice ob = ReturnLegValuationPrice();
                 IDManager.SetID(initialPriceIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 initialPriceIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 initialPrice = new ReturnLegValuationPrice(item);
             }
         }
     }
     
 
     XmlNodeList notionalResetNodeList = xmlNode.SelectNodes("notionalReset");
     if (notionalResetNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in notionalResetNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 notionalResetIDRef = item.Attributes["id"].Name;
                 XsdTypeBoolean ob = XsdTypeBoolean();
                 IDManager.SetID(notionalResetIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 notionalResetIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 notionalReset = new XsdTypeBoolean(item);
             }
         }
     }
     
 
     XmlNodeList valuationPriceInterimNodeList = xmlNode.SelectNodes("valuationPriceInterim");
     if (valuationPriceInterimNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationPriceInterimNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationPriceInterimIDRef = item.Attributes["id"].Name;
                 ReturnLegValuationPrice ob = ReturnLegValuationPrice();
                 IDManager.SetID(valuationPriceInterimIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationPriceInterimIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationPriceInterim = new ReturnLegValuationPrice(item);
             }
         }
     }
     
 
     XmlNodeList valuationPriceFinalNodeList = xmlNode.SelectNodes("valuationPriceFinal");
     if (valuationPriceFinalNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in valuationPriceFinalNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 valuationPriceFinalIDRef = item.Attributes["id"].Name;
                 ReturnLegValuationPrice ob = ReturnLegValuationPrice();
                 IDManager.SetID(valuationPriceFinalIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 valuationPriceFinalIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 valuationPriceFinal = new ReturnLegValuationPrice(item);
             }
         }
     }
     
 
     XmlNodeList paymentDatesNodeList = xmlNode.SelectNodes("paymentDates");
     if (paymentDatesNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in paymentDatesNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 paymentDatesIDRef = item.Attributes["id"].Name;
                 ReturnSwapPaymentDates ob = ReturnSwapPaymentDates();
                 IDManager.SetID(paymentDatesIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 paymentDatesIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 paymentDates = new ReturnSwapPaymentDates(item);
             }
         }
     }
     
 
     XmlNodeList exchangeTradedContractNearestNodeList = xmlNode.SelectNodes("exchangeTradedContractNearest");
     if (exchangeTradedContractNearestNodeList.Count > 1 )
     {
             throw new Exception();
     }
     
     foreach (XmlNode item in exchangeTradedContractNearestNodeList)
     {
         if (item.Attributes["href"] != null || item.Attributes["id"] == null) 
         {
             if (item.Attributes["id"] != null) 
             {
                 exchangeTradedContractNearestIDRef = item.Attributes["id"].Name;
                 ExchangeTradedContract ob = ExchangeTradedContract();
                 IDManager.SetID(exchangeTradedContractNearestIDRef, ob);
             }
             else if (item.Attributes.ToString() == "href")
             {
                 exchangeTradedContractNearestIDRef = item.Attributes["href"].Name;
             }
             else
             {
                 exchangeTradedContractNearest = new ExchangeTradedContract(item);
             }
         }
     }
     
 
 }
        public ReturnLegValuation(XmlNode xmlNode)
        {
            XmlNodeList initialPriceNodeList = xmlNode.SelectNodes("initialPrice");

            if (initialPriceNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in initialPriceNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        initialPriceIDRef = item.Attributes["id"].Name;
                        ReturnLegValuationPrice ob = ReturnLegValuationPrice();
                        IDManager.SetID(initialPriceIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        initialPriceIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        initialPrice = new ReturnLegValuationPrice(item);
                    }
                }
            }


            XmlNodeList notionalResetNodeList = xmlNode.SelectNodes("notionalReset");

            if (notionalResetNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in notionalResetNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        notionalResetIDRef = item.Attributes["id"].Name;
                        XsdTypeBoolean ob = XsdTypeBoolean();
                        IDManager.SetID(notionalResetIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        notionalResetIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        notionalReset = new XsdTypeBoolean(item);
                    }
                }
            }


            XmlNodeList valuationPriceInterimNodeList = xmlNode.SelectNodes("valuationPriceInterim");

            if (valuationPriceInterimNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in valuationPriceInterimNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationPriceInterimIDRef = item.Attributes["id"].Name;
                        ReturnLegValuationPrice ob = ReturnLegValuationPrice();
                        IDManager.SetID(valuationPriceInterimIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationPriceInterimIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationPriceInterim = new ReturnLegValuationPrice(item);
                    }
                }
            }


            XmlNodeList valuationPriceFinalNodeList = xmlNode.SelectNodes("valuationPriceFinal");

            if (valuationPriceFinalNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in valuationPriceFinalNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        valuationPriceFinalIDRef = item.Attributes["id"].Name;
                        ReturnLegValuationPrice ob = ReturnLegValuationPrice();
                        IDManager.SetID(valuationPriceFinalIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        valuationPriceFinalIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        valuationPriceFinal = new ReturnLegValuationPrice(item);
                    }
                }
            }


            XmlNodeList paymentDatesNodeList = xmlNode.SelectNodes("paymentDates");

            if (paymentDatesNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in paymentDatesNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        paymentDatesIDRef = item.Attributes["id"].Name;
                        ReturnSwapPaymentDates ob = ReturnSwapPaymentDates();
                        IDManager.SetID(paymentDatesIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        paymentDatesIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        paymentDates = new ReturnSwapPaymentDates(item);
                    }
                }
            }


            XmlNodeList exchangeTradedContractNearestNodeList = xmlNode.SelectNodes("exchangeTradedContractNearest");

            if (exchangeTradedContractNearestNodeList.Count > 1)
            {
                throw new Exception();
            }

            foreach (XmlNode item in exchangeTradedContractNearestNodeList)
            {
                if (item.Attributes["href"] != null || item.Attributes["id"] == null)
                {
                    if (item.Attributes["id"] != null)
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["id"].Name;
                        ExchangeTradedContract ob = ExchangeTradedContract();
                        IDManager.SetID(exchangeTradedContractNearestIDRef, ob);
                    }
                    else if (item.Attributes.ToString() == "href")
                    {
                        exchangeTradedContractNearestIDRef = item.Attributes["href"].Name;
                    }
                    else
                    {
                        exchangeTradedContractNearest = new ExchangeTradedContract(item);
                    }
                }
            }
        }
 public Variance(XmlNode xmlNode)
 : base(xmlNode)
 {
     XmlNode varianceAmountNode = xmlNode.SelectSingleNode("varianceAmount");
     
     if (varianceAmountNode != null)
     {
         if (varianceAmountNode.Attributes["href"] != null || varianceAmountNode.Attributes["id"] != null) 
         {
             if (varianceAmountNode.Attributes["id"] != null) 
             {
                 varianceAmountIDRef_ = varianceAmountNode.Attributes["id"].Value;
                 NonNegativeMoney ob = new NonNegativeMoney(varianceAmountNode);
                 IDManager.SetID(varianceAmountIDRef_, ob);
             }
             else if (varianceAmountNode.Attributes["href"] != null)
             {
                 varianceAmountIDRef_ = varianceAmountNode.Attributes["href"].Value;
             }
             else
             {
                 varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
             }
         }
         else
         {
             varianceAmount_ = new NonNegativeMoney(varianceAmountNode);
         }
     }
     
 
     XmlNode volatilityStrikePriceNode = xmlNode.SelectSingleNode("volatilityStrikePrice");
     
     if (volatilityStrikePriceNode != null)
     {
         if (volatilityStrikePriceNode.Attributes["href"] != null || volatilityStrikePriceNode.Attributes["id"] != null) 
         {
             if (volatilityStrikePriceNode.Attributes["id"] != null) 
             {
                 volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(volatilityStrikePriceNode);
                 IDManager.SetID(volatilityStrikePriceIDRef_, ob);
             }
             else if (volatilityStrikePriceNode.Attributes["href"] != null)
             {
                 volatilityStrikePriceIDRef_ = volatilityStrikePriceNode.Attributes["href"].Value;
             }
             else
             {
                 volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
             }
         }
         else
         {
             volatilityStrikePrice_ = new NonNegativeDecimal(volatilityStrikePriceNode);
         }
     }
     
 
     XmlNode varianceStrikePriceNode = xmlNode.SelectSingleNode("varianceStrikePrice");
     
     if (varianceStrikePriceNode != null)
     {
         if (varianceStrikePriceNode.Attributes["href"] != null || varianceStrikePriceNode.Attributes["id"] != null) 
         {
             if (varianceStrikePriceNode.Attributes["id"] != null) 
             {
                 varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["id"].Value;
                 NonNegativeDecimal ob = new NonNegativeDecimal(varianceStrikePriceNode);
                 IDManager.SetID(varianceStrikePriceIDRef_, ob);
             }
             else if (varianceStrikePriceNode.Attributes["href"] != null)
             {
                 varianceStrikePriceIDRef_ = varianceStrikePriceNode.Attributes["href"].Value;
             }
             else
             {
                 varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
             }
         }
         else
         {
             varianceStrikePrice_ = new NonNegativeDecimal(varianceStrikePriceNode);
         }
     }
     
 
     XmlNode varianceCapNode = xmlNode.SelectSingleNode("varianceCap");
     
     if (varianceCapNode != null)
     {
         if (varianceCapNode.Attributes["href"] != null || varianceCapNode.Attributes["id"] != null) 
         {
             if (varianceCapNode.Attributes["id"] != null) 
             {
                 varianceCapIDRef_ = varianceCapNode.Attributes["id"].Value;
                 XsdTypeBoolean ob = new XsdTypeBoolean(varianceCapNode);
                 IDManager.SetID(varianceCapIDRef_, ob);
             }
             else if (varianceCapNode.Attributes["href"] != null)
             {
                 varianceCapIDRef_ = varianceCapNode.Attributes["href"].Value;
             }
             else
             {
                 varianceCap_ = new XsdTypeBoolean(varianceCapNode);
             }
         }
         else
         {
             varianceCap_ = new XsdTypeBoolean(varianceCapNode);
         }
     }
     
 
     XmlNode unadjustedVarianceCapNode = xmlNode.SelectSingleNode("unadjustedVarianceCap");
     
     if (unadjustedVarianceCapNode != null)
     {
         if (unadjustedVarianceCapNode.Attributes["href"] != null || unadjustedVarianceCapNode.Attributes["id"] != null) 
         {
             if (unadjustedVarianceCapNode.Attributes["id"] != null) 
             {
                 unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["id"].Value;
                 PositiveDecimal ob = new PositiveDecimal(unadjustedVarianceCapNode);
                 IDManager.SetID(unadjustedVarianceCapIDRef_, ob);
             }
             else if (unadjustedVarianceCapNode.Attributes["href"] != null)
             {
                 unadjustedVarianceCapIDRef_ = unadjustedVarianceCapNode.Attributes["href"].Value;
             }
             else
             {
                 unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
             }
         }
         else
         {
             unadjustedVarianceCap_ = new PositiveDecimal(unadjustedVarianceCapNode);
         }
     }
     
 
     XmlNode boundedVarianceNode = xmlNode.SelectSingleNode("boundedVariance");
     
     if (boundedVarianceNode != null)
     {
         if (boundedVarianceNode.Attributes["href"] != null || boundedVarianceNode.Attributes["id"] != null) 
         {
             if (boundedVarianceNode.Attributes["id"] != null) 
             {
                 boundedVarianceIDRef_ = boundedVarianceNode.Attributes["id"].Value;
                 BoundedVariance ob = new BoundedVariance(boundedVarianceNode);
                 IDManager.SetID(boundedVarianceIDRef_, ob);
             }
             else if (boundedVarianceNode.Attributes["href"] != null)
             {
                 boundedVarianceIDRef_ = boundedVarianceNode.Attributes["href"].Value;
             }
             else
             {
                 boundedVariance_ = new BoundedVariance(boundedVarianceNode);
             }
         }
         else
         {
             boundedVariance_ = new BoundedVariance(boundedVarianceNode);
         }
     }
     
 
     XmlNode exchangeTradedContractNearestNode = xmlNode.SelectSingleNode("exchangeTradedContractNearest");
     
     if (exchangeTradedContractNearestNode != null)
     {
         if (exchangeTradedContractNearestNode.Attributes["href"] != null || exchangeTradedContractNearestNode.Attributes["id"] != null) 
         {
             if (exchangeTradedContractNearestNode.Attributes["id"] != null) 
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["id"].Value;
                 ExchangeTradedContract ob = new ExchangeTradedContract(exchangeTradedContractNearestNode);
                 IDManager.SetID(exchangeTradedContractNearestIDRef_, ob);
             }
             else if (exchangeTradedContractNearestNode.Attributes["href"] != null)
             {
                 exchangeTradedContractNearestIDRef_ = exchangeTradedContractNearestNode.Attributes["href"].Value;
             }
             else
             {
                 exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
             }
         }
         else
         {
             exchangeTradedContractNearest_ = new ExchangeTradedContract(exchangeTradedContractNearestNode);
         }
     }
     
 
     XmlNode vegaNotionalAmountNode = xmlNode.SelectSingleNode("vegaNotionalAmount");
     
     if (vegaNotionalAmountNode != null)
     {
         if (vegaNotionalAmountNode.Attributes["href"] != null || vegaNotionalAmountNode.Attributes["id"] != null) 
         {
             if (vegaNotionalAmountNode.Attributes["id"] != null) 
             {
                 vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["id"].Value;
                 XsdTypeDecimal ob = new XsdTypeDecimal(vegaNotionalAmountNode);
                 IDManager.SetID(vegaNotionalAmountIDRef_, ob);
             }
             else if (vegaNotionalAmountNode.Attributes["href"] != null)
             {
                 vegaNotionalAmountIDRef_ = vegaNotionalAmountNode.Attributes["href"].Value;
             }
             else
             {
                 vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
             }
         }
         else
         {
             vegaNotionalAmount_ = new XsdTypeDecimal(vegaNotionalAmountNode);
         }
     }
     
 
 }