public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
InitiateAuthResponse response = new InitiateAuthResponse();
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;
}