Ejemplo n.º 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)
        {
            CreateConfigResponse response = new CreateConfigResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("configArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ConfigArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("configId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ConfigId = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("configType", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ConfigType = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Ejemplo n.º 2
0
        public static CreateConfigResponse Unmarshall(UnmarshallerContext context)
        {
            CreateConfigResponse createConfigResponse = new CreateConfigResponse();

            createConfigResponse.HttpResponse = context.HttpResponse;
            createConfigResponse.RequestId    = context.StringValue("CreateConfig.RequestId");

            return(createConfigResponse);
        }