Exemplo n.º 1
0
        public static DescribeTasksResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DescribeTasksResponse describeTasksResponse = new DescribeTasksResponse();

            describeTasksResponse.HttpResponse     = _ctx.HttpResponse;
            describeTasksResponse.RequestId        = _ctx.StringValue("DescribeTasks.RequestId");
            describeTasksResponse.TotalRecordCount = _ctx.IntegerValue("DescribeTasks.TotalRecordCount");
            describeTasksResponse.PageNumber       = _ctx.IntegerValue("DescribeTasks.PageNumber");
            describeTasksResponse.PageRecordCount  = _ctx.IntegerValue("DescribeTasks.PageRecordCount");

            List <DescribeTasksResponse.DescribeTasks_TaskProgressInfo> describeTasksResponse_items = new List <DescribeTasksResponse.DescribeTasks_TaskProgressInfo>();

            for (int i = 0; i < _ctx.Length("DescribeTasks.Items.Length"); i++)
            {
                DescribeTasksResponse.DescribeTasks_TaskProgressInfo taskProgressInfo = new DescribeTasksResponse.DescribeTasks_TaskProgressInfo();
                taskProgressInfo.DBName             = _ctx.StringValue("DescribeTasks.Items[" + i + "].DBName");
                taskProgressInfo.BeginTime          = _ctx.StringValue("DescribeTasks.Items[" + i + "].BeginTime");
                taskProgressInfo.ProgressInfo       = _ctx.StringValue("DescribeTasks.Items[" + i + "].ProgressInfo");
                taskProgressInfo.FinishTime         = _ctx.StringValue("DescribeTasks.Items[" + i + "].FinishTime");
                taskProgressInfo.TaskAction         = _ctx.StringValue("DescribeTasks.Items[" + i + "].TaskAction");
                taskProgressInfo.TaskId             = _ctx.StringValue("DescribeTasks.Items[" + i + "].TaskId");
                taskProgressInfo.Progress           = _ctx.StringValue("DescribeTasks.Items[" + i + "].Progress");
                taskProgressInfo.ExpectedFinishTime = _ctx.StringValue("DescribeTasks.Items[" + i + "].ExpectedFinishTime");
                taskProgressInfo.Status             = _ctx.StringValue("DescribeTasks.Items[" + i + "].Status");
                taskProgressInfo.TaskErrorCode      = _ctx.StringValue("DescribeTasks.Items[" + i + "].TaskErrorCode");
                taskProgressInfo.TaskErrorMessage   = _ctx.StringValue("DescribeTasks.Items[" + i + "].TaskErrorMessage");

                describeTasksResponse_items.Add(taskProgressInfo);
            }
            describeTasksResponse.Items = describeTasksResponse_items;

            return(describeTasksResponse);
        }
        public static DescribeTasksResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeTasksResponse describeTasksResponse = new DescribeTasksResponse();

            describeTasksResponse.HttpResponse     = context.HttpResponse;
            describeTasksResponse.RequestId        = context.StringValue("DescribeTasks.RequestId");
            describeTasksResponse.PageNumber       = context.IntegerValue("DescribeTasks.PageNumber");
            describeTasksResponse.PageSize         = context.IntegerValue("DescribeTasks.PageSize");
            describeTasksResponse.TotalRecordCount = context.IntegerValue("DescribeTasks.TotalRecordCount");

            List <DescribeTasksResponse.DescribeTasks_TaskProgressInfo> describeTasksResponse_items = new List <DescribeTasksResponse.DescribeTasks_TaskProgressInfo>();

            for (int i = 0; i < context.Length("DescribeTasks.Items.Length"); i++)
            {
                DescribeTasksResponse.DescribeTasks_TaskProgressInfo taskProgressInfo = new DescribeTasksResponse.DescribeTasks_TaskProgressInfo();
                taskProgressInfo.TaskId           = context.StringValue("DescribeTasks.Items[" + i + "].TaskId");
                taskProgressInfo.TaskAction       = context.StringValue("DescribeTasks.Items[" + i + "].TaskAction");
                taskProgressInfo.Status           = context.StringValue("DescribeTasks.Items[" + i + "].Status");
                taskProgressInfo.Progress         = context.FloatValue("DescribeTasks.Items[" + i + "].Progress");
                taskProgressInfo.BeginTime        = context.StringValue("DescribeTasks.Items[" + i + "].BeginTime");
                taskProgressInfo.FinishTime       = context.StringValue("DescribeTasks.Items[" + i + "].FinishTime");
                taskProgressInfo.StepsInfo        = context.StringValue("DescribeTasks.Items[" + i + "].StepsInfo");
                taskProgressInfo.Remain           = context.IntegerValue("DescribeTasks.Items[" + i + "].Remain");
                taskProgressInfo.StepProgressInfo = context.StringValue("DescribeTasks.Items[" + i + "].StepProgressInfo");
                taskProgressInfo.CurrentStepName  = context.StringValue("DescribeTasks.Items[" + i + "].CurrentStepName");

                describeTasksResponse_items.Add(taskProgressInfo);
            }
            describeTasksResponse.Items = describeTasksResponse_items;

            return(describeTasksResponse);
        }