public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
CancelImportTaskResponse response = new CancelImportTaskResponse();
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("importTaskId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ImportTaskId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("previousState", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.PreviousState = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("state", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.State = unmarshaller.Unmarshall(context);
continue;
}
}
}
return response;
}