/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeStackDriftDetectionStatusResponse response = new DescribeStackDriftDetectionStatusResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("DescribeStackDriftDetectionStatusResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeStackDriftDetectionStatusResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.ReadAtDepth(originalDepth)) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DetectionStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DetectionStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DetectionStatusReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DetectionStatusReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DriftedStackResourceCount", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.DriftedStackResourceCount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackDriftDetectionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackDriftDetectionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackDriftStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackDriftStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StackId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Timestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.Timestamp = unmarshaller.Unmarshall(context); continue; } } } return; }