/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateLaunchTemplateVersionResponse response = new CreateLaunchTemplateVersionResponse(); 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("launchTemplateVersion", targetDepth)) { var unmarshaller = LaunchTemplateVersionUnmarshaller.Instance; response.LaunchTemplateVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("warning", targetDepth)) { var unmarshaller = ValidationWarningUnmarshaller.Instance; response.Warning = unmarshaller.Unmarshall(context); continue; } } } return(response); }
public static CreateLaunchTemplateVersionResponse Unmarshall(UnmarshallerContext context) { CreateLaunchTemplateVersionResponse createLaunchTemplateVersionResponse = new CreateLaunchTemplateVersionResponse(); createLaunchTemplateVersionResponse.HttpResponse = context.HttpResponse; createLaunchTemplateVersionResponse.RequestId = context.StringValue("CreateLaunchTemplateVersion.RequestId"); createLaunchTemplateVersionResponse.LaunchTemplateVersionNumber = context.LongValue("CreateLaunchTemplateVersion.LaunchTemplateVersionNumber"); return(createLaunchTemplateVersionResponse); }