public static DescribeFleetInstancesResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeFleetInstancesResponse describeFleetInstancesResponse = new DescribeFleetInstancesResponse();

            describeFleetInstancesResponse.HttpResponse = context.HttpResponse;
            describeFleetInstancesResponse.RequestId    = context.StringValue("DescribeFleetInstances.RequestId");
            describeFleetInstancesResponse.TotalCount   = context.IntegerValue("DescribeFleetInstances.TotalCount");
            describeFleetInstancesResponse.PageNumber   = context.IntegerValue("DescribeFleetInstances.PageNumber");
            describeFleetInstancesResponse.PageSize     = context.IntegerValue("DescribeFleetInstances.PageSize");

            List <DescribeFleetInstancesResponse.DescribeFleetInstances_Instance> describeFleetInstancesResponse_instances = new List <DescribeFleetInstancesResponse.DescribeFleetInstances_Instance>();

            for (int i = 0; i < context.Length("DescribeFleetInstances.Instances.Length"); i++)
            {
                DescribeFleetInstancesResponse.DescribeFleetInstances_Instance instance = new DescribeFleetInstancesResponse.DescribeFleetInstances_Instance();
                instance.InstanceId   = context.StringValue("DescribeFleetInstances.Instances[" + i + "].InstanceId");
                instance.Status       = context.StringValue("DescribeFleetInstances.Instances[" + i + "].Status");
                instance.RegionId     = context.StringValue("DescribeFleetInstances.Instances[" + i + "].RegionId");
                instance.IzNo         = context.StringValue("DescribeFleetInstances.Instances[" + i + "].IzNo");
                instance.ZoneNo       = context.StringValue("DescribeFleetInstances.Instances[" + i + "].ZoneNo");
                instance.Cores        = context.IntegerValue("DescribeFleetInstances.Instances[" + i + "].Cores");
                instance.Memory       = context.IntegerValue("DescribeFleetInstances.Instances[" + i + "].Memory");
                instance.InstanceType = context.StringValue("DescribeFleetInstances.Instances[" + i + "].InstanceType");
                instance.IsSpot       = context.BooleanValue("DescribeFleetInstances.Instances[" + i + "].IsSpot");
                instance.IoOptimized  = context.BooleanValue("DescribeFleetInstances.Instances[" + i + "].IoOptimized");
                instance.NetworkType  = context.BooleanValue("DescribeFleetInstances.Instances[" + i + "].NetworkType");
                instance.OsType       = context.BooleanValue("DescribeFleetInstances.Instances[" + i + "].OsType");
                instance.CreationTime = context.StringValue("DescribeFleetInstances.Instances[" + i + "].CreationTime");

                describeFleetInstancesResponse_instances.Add(instance);
            }
            describeFleetInstancesResponse.Instances = describeFleetInstancesResponse_instances;

            return(describeFleetInstancesResponse);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            DescribeFleetInstancesResponse response = new DescribeFleetInstancesResponse();

            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("activeInstanceSet/item", targetDepth))
                    {
                        var unmarshaller = ActiveInstanceUnmarshaller.Instance;
                        var item         = unmarshaller.Unmarshall(context);
                        response.ActiveInstances.Add(item);
                        continue;
                    }
                    if (context.TestExpression("fleetId", targetDepth))
                    {
                        var unmarshaller = StringUnmarshaller.Instance;
                        response.FleetId = unmarshaller.Unmarshall(context);
                        continue;
                    }
                    if (context.TestExpression("nextToken", targetDepth))
                    {
                        var unmarshaller = StringUnmarshaller.Instance;
                        response.NextToken = unmarshaller.Unmarshall(context);
                        continue;
                    }
                }
            }

            return(response);
        }