Exemple #1
0
        public static ReservedInstancesModificationResultUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new ReservedInstancesModificationResultUnmarshaller();
            }

            return(instance);
        }
Exemple #2
0
        public ReservedInstancesModification Unmarshall(XmlUnmarshallerContext context)
        {
            ReservedInstancesModification reservedInstancesModification = new ReservedInstancesModification();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

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

                        continue;
                    }
                    if (context.TestExpression("reservedInstancesSet/item", targetDepth))
                    {
                        reservedInstancesModification.ReservedInstancesIds.Add(ReservedInstancesIdUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("modificationResultSet/item", targetDepth))
                    {
                        reservedInstancesModification.ModificationResults.Add(ReservedInstancesModificationResultUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("createDate", targetDepth))
                    {
                        reservedInstancesModification.CreateDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("updateDate", targetDepth))
                    {
                        reservedInstancesModification.UpdateDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("effectiveDate", targetDepth))
                    {
                        reservedInstancesModification.EffectiveDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("status", targetDepth))
                    {
                        reservedInstancesModification.Status = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("statusMessage", targetDepth))
                    {
                        reservedInstancesModification.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("clientToken", targetDepth))
                    {
                        reservedInstancesModification.ClientToken = StringUnmarshaller.GetInstance().Unmarshall(context);

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



            return(reservedInstancesModification);
        }