/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeResourceResponse response = new DescribeResourceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ResourceInfo", targetDepth)) { var unmarshaller = ResourceInfoUnmarshaller.Instance; response.ResourceInfo = 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) { DescribeResourceResponse response = new DescribeResourceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("BookingOptions", targetDepth)) { var unmarshaller = BookingOptionsUnmarshaller.Instance; response.BookingOptions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisabledDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.DisabledDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Email", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Email = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnabledDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.EnabledDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ResourceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ResourceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Type = unmarshaller.Unmarshall(context); continue; } } return(response); }