/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDetectorResponse response = new DescribeDetectorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("detectorId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DetectorId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("detectorVersionSummaries", targetDepth)) { var unmarshaller = new ListUnmarshaller <DetectorVersionSummary, DetectorVersionSummaryUnmarshaller>(DetectorVersionSummaryUnmarshaller.Instance); response.DetectorVersionSummaries = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("nextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDetectorResponse response = new DescribeDetectorResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("detector", targetDepth)) { var unmarshaller = DetectorUnmarshaller.Instance; response.Detector = unmarshaller.Unmarshall(context); continue; } } return(response); }