public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
        {
            ListBucketInventoryConfigurationsResponse listBucketInventoryConfigurationsResponse = new ListBucketInventoryConfigurationsResponse();

            while (context.Read())
            {
                if (context.get_IsStartElement())
                {
                    UnmarshallResult(context, listBucketInventoryConfigurationsResponse);
                }
            }
            return(listBucketInventoryConfigurationsResponse);
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, ListBucketInventoryConfigurationsResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            if (context.IsStartOfDocument)
            {
                targetDepth += 2;
            }

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("ContinuationToken", targetDepth))
                    {
                        response.Token = StringUnmarshaller.Instance.Unmarshall(context);

                        continue;
                    }

                    if (context.TestExpression("InventoryConfiguration", targetDepth))
                    {
                        response.InventoryConfigurationList.Add(InventoryConfigurationUnmarshaller.Instance.Unmarshall(context));

                        continue;
                    }
                    if (context.TestExpression("IsTruncated", targetDepth))
                    {
                        response.IsTruncated = BoolUnmarshaller.Instance.Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("NextContinuationToken", targetDepth))
                    {
                        response.NextToken = StringUnmarshaller.Instance.Unmarshall(context);

                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth < originalDepth)
                {
                    return;
                }
            }



            return;
        }
        private static void UnmarshallResult(XmlUnmarshallerContext context, ListBucketInventoryConfigurationsResponse response)
        {
            int currentDepth = context.get_CurrentDepth();
            int num          = currentDepth + 1;

            if (context.get_IsStartOfDocument())
            {
                num += 2;
            }
            while (context.Read())
            {
                if (context.get_IsStartElement() || context.get_IsAttribute())
                {
                    if (context.TestExpression("ContinuationToken", num))
                    {
                        response.Token = StringUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("InventoryConfiguration", num))
                    {
                        response.InventoryConfigurationList.Add(InventoryConfigurationUnmarshaller.Instance.Unmarshall(context));
                    }
                    else if (context.TestExpression("IsTruncated", num))
                    {
                        response.IsTruncated = BoolUnmarshaller.get_Instance().Unmarshall(context);
                    }
                    else if (context.TestExpression("NextContinuationToken", num))
                    {
                        response.NextToken = StringUnmarshaller.get_Instance().Unmarshall(context);
                    }
                }
                else if (context.get_IsEndElement() && context.get_CurrentDepth() < currentDepth)
                {
                    break;
                }
            }
        }