/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetAccessKeyLastUsedResponse response = new GetAccessKeyLastUsedResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("GetAccessKeyLastUsedResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetAccessKeyLastUsedResponse response) { 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("AccessKeyLastUsed", targetDepth)) { var unmarshaller = AccessKeyLastUsedUnmarshaller.Instance; response.AccessKeyLastUsed = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UserName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.UserName = unmarshaller.Unmarshall(context); continue; } } } return; }
public static GetAccessKeyLastUsedResponse Unmarshall(UnmarshallerContext context) { GetAccessKeyLastUsedResponse getAccessKeyLastUsedResponse = new GetAccessKeyLastUsedResponse(); getAccessKeyLastUsedResponse.HttpResponse = context.HttpResponse; getAccessKeyLastUsedResponse.RequestId = context.StringValue("GetAccessKeyLastUsed.RequestId"); GetAccessKeyLastUsedResponse.GetAccessKeyLastUsed_AccessKeyLastUsed accessKeyLastUsed = new GetAccessKeyLastUsedResponse.GetAccessKeyLastUsed_AccessKeyLastUsed(); accessKeyLastUsed.LastUsedDate = context.StringValue("GetAccessKeyLastUsed.AccessKeyLastUsed.LastUsedDate"); getAccessKeyLastUsedResponse.AccessKeyLastUsed = accessKeyLastUsed; return(getAccessKeyLastUsedResponse); }