/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeTaskResponse response = new DescribeTaskResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CloudWatchLogGroupArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CloudWatchLogGroupArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CurrentTaskExecutionArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CurrentTaskExecutionArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DestinationLocationArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DestinationLocationArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ErrorCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ErrorCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ErrorDetail", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ErrorDetail = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Options", targetDepth)) { var unmarshaller = OptionsUnmarshaller.Instance; response.Options = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SourceLocationArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SourceLocationArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TaskArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TaskArn = 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) { DescribeTaskResponse response = new DescribeTaskResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("completedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CompletedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("state", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("targets", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); response.Targets = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("taskArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TaskArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("taskId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TaskId = unmarshaller.Unmarshall(context); continue; } } return(response); }