public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); UnmarshallResult(context,response); return response; }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); response.DescribeJobResult = DescribeJobResultUnmarshaller.GetInstance().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) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Action", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ArchiveId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ArchiveId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ArchiveSHA256TreeHash", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ArchiveSHA256TreeHash = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ArchiveSizeInBytes", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; response.ArchiveSizeInBytes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Completed", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.Completed = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CompletionDate", targetDepth)) { var unmarshaller = Amazon.Runtime.Internal.Transform.DateTimeUnmarshaller.Instance; response.CompletionDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationDate", targetDepth)) { var unmarshaller = Amazon.Runtime.Internal.Transform.DateTimeUnmarshaller.Instance; response.CreationDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InventoryRetrievalParameters", targetDepth)) { var unmarshaller = InventoryRetrievalJobDescriptionUnmarshaller.Instance; response.InventoryRetrievalParameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InventorySizeInBytes", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; response.InventorySizeInBytes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobDescription", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.JobDescription = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.JobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RetrievalByteRange", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RetrievalByteRange = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SHA256TreeHash", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SHA256TreeHash = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SNSTopic", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SNSTopic = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StatusCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StatusCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StatusMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StatusMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VaultARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VaultARN = unmarshaller.Unmarshall(context); continue; } } return response; }
private static void UnmarshallResult(JsonUnmarshallerContext context,DescribeJobResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("JobId", targetDepth)) { context.Read(); response.JobId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("JobDescription", targetDepth)) { context.Read(); response.JobDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Action", targetDepth)) { context.Read(); response.Action = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveId", targetDepth)) { context.Read(); response.ArchiveId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VaultARN", targetDepth)) { context.Read(); response.VaultARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreationDate", targetDepth)) { context.Read(); response.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Completed", targetDepth)) { context.Read(); response.Completed = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusCode", targetDepth)) { context.Read(); response.StatusCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusMessage", targetDepth)) { context.Read(); response.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveSizeInBytes", targetDepth)) { context.Read(); response.ArchiveSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InventorySizeInBytes", targetDepth)) { context.Read(); response.InventorySizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SNSTopic", targetDepth)) { context.Read(); response.SNSTopic = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CompletionDate", targetDepth)) { context.Read(); response.CompletionDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SHA256TreeHash", targetDepth)) { context.Read(); response.SHA256TreeHash = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveSHA256TreeHash", targetDepth)) { context.Read(); response.ArchiveSHA256TreeHash = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RetrievalByteRange", targetDepth)) { context.Read(); response.RetrievalByteRange = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InventoryRetrievalParameters", targetDepth)) { context.Read(); response.InventoryRetrievalParameters = InventoryRetrievalJobDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }