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

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("clientToken", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ClientToken = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("imagePipelineArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ImagePipelineArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("requestId", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.RequestId = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
        public static CreateImagePipelineResponse Unmarshall(UnmarshallerContext _ctx)
        {
            CreateImagePipelineResponse createImagePipelineResponse = new CreateImagePipelineResponse();

            createImagePipelineResponse.HttpResponse    = _ctx.HttpResponse;
            createImagePipelineResponse.RequestId       = _ctx.StringValue("CreateImagePipeline.RequestId");
            createImagePipelineResponse.ImagePipelineId = _ctx.StringValue("CreateImagePipeline.ImagePipelineId");

            return(createImagePipelineResponse);
        }