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

            return(instance);
        }
Exemple #2
0
        public DBInstance Unmarshall(UnmarshallerContext context)
        {
            DBInstance dBInstance    = new DBInstance();
            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("DBInstanceIdentifier", targetDepth))
                    {
                        dBInstance.DBInstanceIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context);

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

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

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

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

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

                        continue;
                    }
                    if (context.TestExpression("Endpoint", targetDepth))
                    {
                        dBInstance.Endpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context);

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

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

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

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

                        continue;
                    }
                    if (context.TestExpression("DBSecurityGroups/DBSecurityGroup", targetDepth))
                    {
                        dBInstance.DBSecurityGroups.Add(DBSecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("DBParameterGroups/DBParameterGroup", targetDepth))
                    {
                        dBInstance.DBParameterGroups.Add(DBParameterGroupStatusUnmarshaller.GetInstance().Unmarshall(context));

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

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

                        continue;
                    }
                    if (context.TestExpression("PendingModifiedValues", targetDepth))
                    {
                        dBInstance.PendingModifiedValues = PendingModifiedValuesUnmarshaller.GetInstance().Unmarshall(context);

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

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

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

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

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

                        continue;
                    }
                    if (context.TestExpression("ReadReplicaDBInstanceIdentifiers/ReadReplicaDBInstanceIdentifier", targetDepth))
                    {
                        dBInstance.ReadReplicaDBInstanceIdentifiers.Add(StringUnmarshaller.GetInstance().Unmarshall(context));

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

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

            return(dBInstance);
        }