public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
BatchGetDeploymentInstancesResponse response = new BatchGetDeploymentInstancesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("errorMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ErrorMessage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("instancesSummary", targetDepth))
{
var unmarshaller = new ListUnmarshaller<InstanceSummary, InstanceSummaryUnmarshaller>(InstanceSummaryUnmarshaller.Instance);
response.InstancesSummary = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}