public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeSpotFleetRequestHistoryResponse response = new DescribeSpotFleetRequestHistoryResponse();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth = 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("historyRecordSet/item", targetDepth))
{
var unmarshaller = HistoryRecordUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.HistoryRecords.Add(item);
continue;
}
if (context.TestExpression("lastEvaluatedTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.LastEvaluatedTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("spotFleetRequestId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SpotFleetRequestId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("startTime", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.StartTime = unmarshaller.Unmarshall(context);
continue;
}
}
}
return response;
}