コード例 #1
0
        public static DeleteBranchResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DeleteBranchResponse deleteBranchResponse = new DeleteBranchResponse();

            deleteBranchResponse.HttpResponse = _ctx.HttpResponse;
            deleteBranchResponse.RequestId    = _ctx.StringValue("DeleteBranch.RequestId");
            deleteBranchResponse.ErrorCode    = _ctx.StringValue("DeleteBranch.ErrorCode");
            deleteBranchResponse.Success      = _ctx.BooleanValue("DeleteBranch.Success");
            deleteBranchResponse.ErrorMessage = _ctx.StringValue("DeleteBranch.ErrorMessage");

            DeleteBranchResponse.DeleteBranch_Result result = new DeleteBranchResponse.DeleteBranch_Result();
            result.BranchName           = _ctx.StringValue("DeleteBranch.Result.BranchName");
            deleteBranchResponse.Result = result;

            return(deleteBranchResponse);
        }
コード例 #2
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)
        {
            DeleteBranchResponse response = new DeleteBranchResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("deletedBranch", targetDepth))
                {
                    var unmarshaller = BranchInfoUnmarshaller.Instance;
                    response.DeletedBranch = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }