public DBSubnetGroup Unmarshall(XmlUnmarshallerContext context) { DBSubnetGroup dBSubnetGroup = new DBSubnetGroup(); 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("DBSubnetGroupName", targetDepth)) { dBSubnetGroup.DBSubnetGroupName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBSubnetGroupDescription", targetDepth)) { dBSubnetGroup.DBSubnetGroupDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VpcId", targetDepth)) { dBSubnetGroup.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SubnetGroupStatus", targetDepth)) { dBSubnetGroup.SubnetGroupStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Subnets/Subnet", targetDepth)) { dBSubnetGroup.Subnets.Add(SubnetUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(dBSubnetGroup); } } return(dBSubnetGroup); }