예제 #1
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            UpdateThemeResponse response = new UpdateThemeResponse();

            var unmarshaller = ThemeUnmarshaller.Instance;

            response.Entity = unmarshaller.Unmarshall(context);

            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)
        {
            UpdateThemeResponse response = new UpdateThemeResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("Arn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Arn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CreationStatus", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.CreationStatus = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RequestId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.RequestId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ThemeId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ThemeId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("VersionArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.VersionArn = unmarshaller.Unmarshall(context);
                    continue;
                }
            }
            response.Status = (int)context.ResponseData.StatusCode;

            return(response);
        }