private void Print(string status, DescribeDocumentClassificationJobResponse result) { if (status == "FAILED") { Console.WriteLine("Error: [{0}]", result.DocumentClassificationJobProperties.Message); } else if (status == "COMPLETED") { var props = result.DocumentClassificationJobProperties; Console.WriteLine("Job Id: [{0}], Name: [{1}], Status: [{2}], Message: [{3}]", props.JobId, props.JobName, props.JobStatus, props.Message); Console.WriteLine("Started at: [{0}], completed at: [{1}]", props.SubmitTime, props.EndTime); Console.WriteLine("Output located at: [{0}]", props.OutputDataConfig.S3Uri); } }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDocumentClassificationJobResponse response = new DescribeDocumentClassificationJobResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DocumentClassificationJobProperties", targetDepth)) { var unmarshaller = DocumentClassificationJobPropertiesUnmarshaller.Instance; response.DocumentClassificationJobProperties = unmarshaller.Unmarshall(context); continue; } } return(response); }