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

            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("creationDateTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.CreationDateTime = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Esempio n. 2
0
        public static CreateSceneResponse Unmarshall(UnmarshallerContext _ctx)
        {
            CreateSceneResponse createSceneResponse = new CreateSceneResponse();

            createSceneResponse.HttpResponse = _ctx.HttpResponse;
            createSceneResponse.RequestId    = _ctx.StringValue("CreateScene.RequestId");
            createSceneResponse.SceneId      = _ctx.LongValue("CreateScene.SceneId");
            createSceneResponse.Success      = _ctx.BooleanValue("CreateScene.Success");
            createSceneResponse.ErrMessage   = _ctx.StringValue("CreateScene.ErrMessage");
            createSceneResponse.PreviewToken = _ctx.StringValue("CreateScene.PreviewToken");

            return(createSceneResponse);
        }
        public static CreateSceneResponse Unmarshall(UnmarshallerContext _ctx)
        {
            CreateSceneResponse createSceneResponse = new CreateSceneResponse();

            createSceneResponse.HttpResponse = _ctx.HttpResponse;
            createSceneResponse.Code         = _ctx.StringValue("CreateScene.code");
            createSceneResponse.RequestId    = _ctx.StringValue("CreateScene.requestId");
            createSceneResponse.Message      = _ctx.StringValue("CreateScene.message");

            CreateSceneResponse.CreateScene_Result result = new CreateSceneResponse.CreateScene_Result();
            result.GmtModified         = _ctx.StringValue("CreateScene.Result.gmtModified");
            result.SceneId             = _ctx.StringValue("CreateScene.Result.sceneId");
            result.GmtCreate           = _ctx.StringValue("CreateScene.Result.gmtCreate");
            result.Status              = _ctx.StringValue("CreateScene.Result.status");
            createSceneResponse.Result = result;

            return(createSceneResponse);
        }