/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeExportResponse response = new DescribeExportResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ExportDescription", targetDepth)) { var unmarshaller = ExportDescriptionUnmarshaller.Instance; response.ExportDescription = 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) { DescribeExportResponse response = new DescribeExportResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("creationDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreationDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("downloadUrl", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DownloadUrl = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("exportId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ExportId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("exportStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ExportStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("failureReasons", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); response.FailureReasons = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("fileFormat", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FileFormat = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("resourceSpecification", targetDepth)) { var unmarshaller = ExportResourceSpecificationUnmarshaller.Instance; response.ResourceSpecification = unmarshaller.Unmarshall(context); continue; } } return(response); }