public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeMaintenanceStartTimeResponse response = new DescribeMaintenanceStartTimeResponse(); context.Read(); UnmarshallResult(context, response); return(response); }
private static void UnmarshallResult(JsonUnmarshallerContext context, DescribeMaintenanceStartTimeResponse 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("HourOfDay", targetDepth)) { context.Read(); response.HourOfDay = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MinuteOfHour", targetDepth)) { context.Read(); response.MinuteOfHour = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DayOfWeek", targetDepth)) { context.Read(); response.DayOfWeek = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Timezone", targetDepth)) { context.Read(); response.Timezone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeMaintenanceStartTimeResponse response = new DescribeMaintenanceStartTimeResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DayOfMonth", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.DayOfMonth = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DayOfWeek", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.DayOfWeek = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GatewayARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.GatewayARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("HourOfDay", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.HourOfDay = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MinuteOfHour", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.MinuteOfHour = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Timezone", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Timezone = unmarshaller.Unmarshall(context); continue; } } return(response); }