public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
ImportImageResponse response = new ImportImageResponse();
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("architecture", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Architecture = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("hypervisor", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Hypervisor = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("imageId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ImageId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("importTaskId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ImportTaskId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("licenseType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.LicenseType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("platform", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Platform = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("progress", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Progress = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("snapshotDetailSet/item", targetDepth))
{
var unmarshaller = SnapshotDetailUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.SnapshotDetails.Add(item);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("statusMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.StatusMessage = unmarshaller.Unmarshall(context);
continue;
}
}
}
return response;
}