public static ImportSnapshotResponse Unmarshall(UnmarshallerContext context) { ImportSnapshotResponse importSnapshotResponse = new ImportSnapshotResponse(); importSnapshotResponse.HttpResponse = context.HttpResponse; importSnapshotResponse.RequestId = context.StringValue("ImportSnapshot.RequestId"); importSnapshotResponse.TaskId = context.StringValue("ImportSnapshot.TaskId"); importSnapshotResponse.SnapshotId = context.StringValue("ImportSnapshot.SnapshotId"); return(importSnapshotResponse); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ImportSnapshotResponse response = new ImportSnapshotResponse(); 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("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("importTaskId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ImportTaskId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("snapshotTaskDetail", targetDepth)) { var unmarshaller = SnapshotTaskDetailUnmarshaller.Instance; response.SnapshotTaskDetail = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tagSet/item", targetDepth)) { var unmarshaller = TagUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Tags.Add(item); continue; } } } return(response); }