public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { GetAccountAuthorizationDetailsResponse response = new GetAccountAuthorizationDetailsResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if(context.TestExpression("GetAccountAuthorizationDetailsResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return response; }
private static void UnmarshallResult(XmlUnmarshallerContext context, GetAccountAuthorizationDetailsResponse 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("GroupDetailList/member", targetDepth)) { var unmarshaller = GroupDetailUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.GroupDetailList.Add(item); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.IsTruncated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Marker", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Marker = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Policies/member", targetDepth)) { var unmarshaller = ManagedPolicyDetailUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.Policies.Add(item); continue; } if (context.TestExpression("RoleDetailList/member", targetDepth)) { var unmarshaller = RoleDetailUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.RoleDetailList.Add(item); continue; } if (context.TestExpression("UserDetailList/member", targetDepth)) { var unmarshaller = UserDetailUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.UserDetailList.Add(item); continue; } } } return; }