private static void UnmarshallResult(XmlUnmarshallerContext context, GetStreamingDistributionConfigResponse response)
        {
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("StreamingDistributionConfig", targetDepth))
                    {
                        response.StreamingDistributionConfig = StreamingDistributionConfigUnmarshaller.GetInstance().Unmarshall(context);

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


            IWebResponseData responseData = context.ResponseData;

            if (responseData.IsHeaderPresent("ETag"))
            {
                response.ETag = responseData.GetHeaderValue("ETag");
            }


            return;
        }
        public static StreamingDistributionConfigUnmarshaller GetInstance()
        {
            if (instance == null)
            {
                instance = new StreamingDistributionConfigUnmarshaller();
            }

            return(instance);
        }
        public StreamingDistribution Unmarshall(XmlUnmarshallerContext context)
        {
            StreamingDistribution streamingDistribution = new StreamingDistribution();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

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

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("Id", targetDepth))
                    {
                        streamingDistribution.Id = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("Status", targetDepth))
                    {
                        streamingDistribution.Status = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("LastModifiedTime", targetDepth))
                    {
                        streamingDistribution.LastModifiedTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("DomainName", targetDepth))
                    {
                        streamingDistribution.DomainName = StringUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("ActiveTrustedSigners", targetDepth))
                    {
                        streamingDistribution.ActiveTrustedSigners = ActiveTrustedSignersUnmarshaller.GetInstance().Unmarshall(context);

                        continue;
                    }
                    if (context.TestExpression("StreamingDistributionConfig", targetDepth))
                    {
                        streamingDistribution.StreamingDistributionConfig = StreamingDistributionConfigUnmarshaller.GetInstance().Unmarshall(context);

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



            return(streamingDistribution);
        }
        public GetStreamingDistributionConfigResult Unmarshall(XmlUnmarshallerContext context)
        {
            GetStreamingDistributionConfigResult getStreamingDistributionConfigResult = new GetStreamingDistributionConfigResult();
            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if (context.IsStartElement || context.IsAttribute)
                {
                    if (context.TestExpression("StreamingDistributionConfig", targetDepth))
                    {
                        getStreamingDistributionConfigResult.StreamingDistributionConfig = StreamingDistributionConfigUnmarshaller.GetInstance().Unmarshall(context);

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


            getStreamingDistributionConfigResult.ETag = context.Headers["ETag"];


            return(getStreamingDistributionConfigResult);
        }