public static RecurringChargeUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new RecurringChargeUnmarshaller();
            }

            return(instance);
        }
        public ReservedDBInstance Unmarshall(XmlUnmarshallerContext context)
        {
            ReservedDBInstance reservedDBInstance = new ReservedDBInstance();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            if (context.IsStartOfDocument)
            {
                targetDepth++;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("ReservedDBInstanceId", targetDepth))
                    {
                        reservedDBInstance.ReservedDBInstanceId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ReservedDBInstancesOfferingId", targetDepth))
                    {
                        reservedDBInstance.ReservedDBInstancesOfferingId = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("DBInstanceClass", targetDepth))
                    {
                        reservedDBInstance.DBInstanceClass = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("StartTime", targetDepth))
                    {
                        reservedDBInstance.StartTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Duration", targetDepth))
                    {
                        reservedDBInstance.Duration = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("FixedPrice", targetDepth))
                    {
                        reservedDBInstance.FixedPrice = DoubleUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("UsagePrice", targetDepth))
                    {
                        reservedDBInstance.UsagePrice = DoubleUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("CurrencyCode", targetDepth))
                    {
                        reservedDBInstance.CurrencyCode = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("DBInstanceCount", targetDepth))
                    {
                        reservedDBInstance.DBInstanceCount = IntUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ProductDescription", targetDepth))
                    {
                        reservedDBInstance.ProductDescription = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("OfferingType", targetDepth))
                    {
                        reservedDBInstance.OfferingType = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("MultiAZ", targetDepth))
                    {
                        reservedDBInstance.MultiAZ = BoolUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("State", targetDepth))
                    {
                        reservedDBInstance.State = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("RecurringCharges/RecurringCharge", targetDepth))
                    {
                        reservedDBInstance.RecurringCharges.Add(RecurringChargeUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return(reservedDBInstance);
                }
            }



            return(reservedDBInstance);
        }