/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { PutMethodResponse response = new PutMethodResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("apiKeyRequired", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.ApiKeyRequired = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authorizationType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AuthorizationType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authorizerId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AuthorizerId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("httpMethod", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HttpMethod = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("methodIntegration", targetDepth)) { var unmarshaller = IntegrationUnmarshaller.Instance; response.MethodIntegration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("methodResponses", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, MethodResponse, StringUnmarshaller, MethodResponseUnmarshaller>(StringUnmarshaller.Instance, MethodResponseUnmarshaller.Instance); response.MethodResponses = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("requestModels", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.RequestModels = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("requestParameters", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, bool, StringUnmarshaller, BoolUnmarshaller>(StringUnmarshaller.Instance, BoolUnmarshaller.Instance); response.RequestParameters = unmarshaller.Unmarshall(context); continue; } } return response; }