/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBandwidthRateLimitResponse response = new DescribeBandwidthRateLimitResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AverageDownloadRateLimitInBitsPerSec", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; response.AverageDownloadRateLimitInBitsPerSec = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AverageUploadRateLimitInBitsPerSec", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; response.AverageUploadRateLimitInBitsPerSec = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayARN = unmarshaller.Unmarshall(context); continue; } } return(response); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBandwidthRateLimitResponse response = new DescribeBandwidthRateLimitResponse(); context.Read(); response.DescribeBandwidthRateLimitResult = DescribeBandwidthRateLimitResultUnmarshaller.GetInstance().Unmarshall(context); return(response); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeBandwidthRateLimitResponse response = new DescribeBandwidthRateLimitResponse(); context.Read(); UnmarshallResult(context, response); return(response); }
private static void UnmarshallResult(JsonUnmarshallerContext context, DescribeBandwidthRateLimitResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("GatewayARN", targetDepth)) { context.Read(); response.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AverageUploadRateLimitInBitsPerSec", targetDepth)) { context.Read(); response.AverageUploadRateLimitInBitsPerSec = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AverageDownloadRateLimitInBitsPerSec", targetDepth)) { context.Read(); response.AverageDownloadRateLimitInBitsPerSec = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }