public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeSnapshotScheduleResponse response = new DescribeSnapshotScheduleResponse(); context.Read(); response.DescribeSnapshotScheduleResult = DescribeSnapshotScheduleResultUnmarshaller.GetInstance().Unmarshall(context); return(response); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeSnapshotScheduleResponse response = new DescribeSnapshotScheduleResponse(); context.Read(); UnmarshallResult(context, response); return(response); }
private static void UnmarshallResult(JsonUnmarshallerContext context, DescribeSnapshotScheduleResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("VolumeARN", targetDepth)) { context.Read(); response.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StartAt", targetDepth)) { context.Read(); response.StartAt = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RecurrenceInHours", targetDepth)) { context.Read(); response.RecurrenceInHours = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { context.Read(); response.Description = StringUnmarshaller.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) { DescribeSnapshotScheduleResponse response = new DescribeSnapshotScheduleResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RecurrenceInHours", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.RecurrenceInHours = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StartAt", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.StartAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tags", targetDepth)) { var unmarshaller = new ListUnmarshaller <Tag, TagUnmarshaller>(TagUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Timezone", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Timezone = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VolumeARN = unmarshaller.Unmarshall(context); continue; } } return(response); }