/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetImportJobResponse response = new GetImportJobResponse(); var unmarshaller = ImportJobResponseUnmarshaller.Instance; response.ImportJobResponse = unmarshaller.Unmarshall(context); 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) { GetImportJobResponse response = new GetImportJobResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CompletedTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CompletedTimestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedTimestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FailedRecordsCount", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.FailedRecordsCount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FailureInfo", targetDepth)) { var unmarshaller = FailureInfoUnmarshaller.Instance; response.FailureInfo = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ImportDataSource", targetDepth)) { var unmarshaller = ImportDataSourceUnmarshaller.Instance; response.ImportDataSource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ImportDestination", targetDepth)) { var unmarshaller = ImportDestinationUnmarshaller.Instance; response.ImportDestination = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.JobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.JobStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProcessedRecordsCount", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.ProcessedRecordsCount = unmarshaller.Unmarshall(context); continue; } } return(response); }