/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { ModifyEndpointAccessResponse response = new ModifyEndpointAccessResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.IsStartElement) { if (context.TestExpression("ModifyEndpointAccessResult", 2)) { UnmarshallResult(context, response); continue; } if (context.TestExpression("ResponseMetadata", 2)) { response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context); } } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, ModifyEndpointAccessResponse 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("Address", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Address = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ClusterIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ClusterIdentifier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndpointCreateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.EndpointCreateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndpointName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EndpointName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndpointStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EndpointStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Port", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.Port = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ResourceOwner", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ResourceOwner = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SubnetGroupName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SubnetGroupName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VpcEndpoint", targetDepth)) { var unmarshaller = VpcEndpointUnmarshaller.Instance; response.VpcEndpoint = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VpcSecurityGroups/VpcSecurityGroup", targetDepth)) { var unmarshaller = VpcSecurityGroupMembershipUnmarshaller.Instance; var item = unmarshaller.Unmarshall(context); response.VpcSecurityGroups.Add(item); continue; } } } return; }