/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { RespondToAuthChallengeResponse response = new RespondToAuthChallengeResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AuthenticationResult", targetDepth)) { var unmarshaller = AuthenticationResultTypeUnmarshaller.Instance; response.AuthenticationResult = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChallengeName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ChallengeName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ChallengeParameters", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.ChallengeParameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Session", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Session = unmarshaller.Unmarshall(context); continue; } } return response; }