private static void UnmarshallResult(XmlUnmarshallerContext context, CreateAccessPointResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AccessPointArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AccessPointArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Alias", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Alias = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { CreateAccessPointResponse response = new CreateAccessPointResponse(); if (context.ResponseData.IsSuccessStatusCode && context.ResponseData.ContentLength == 0) { return(response); } UnmarshallResult(context, response); 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) { CreateAccessPointResponse response = new CreateAccessPointResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AccessPointArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AccessPointArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AccessPointId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AccessPointId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ClientToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ClientToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FileSystemId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FileSystemId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LifeCycleState", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.LifeCycleState = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OwnerId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OwnerId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PosixUser", targetDepth)) { var unmarshaller = PosixUserUnmarshaller.Instance; response.PosixUser = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RootDirectory", targetDepth)) { var unmarshaller = RootDirectoryUnmarshaller.Instance; response.RootDirectory = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tags", targetDepth)) { var unmarshaller = new ListUnmarshaller <Tag, TagUnmarshaller>(TagUnmarshaller.Instance); response.Tags = 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(XmlUnmarshallerContext context) { CreateAccessPointResponse response = new CreateAccessPointResponse(); return(response); }