示例#1
0
        public static ListJobGroupsResponse Unmarshall(UnmarshallerContext context)
        {
            ListJobGroupsResponse listJobGroupsResponse = new ListJobGroupsResponse();

            listJobGroupsResponse.HttpResponse   = context.HttpResponse;
            listJobGroupsResponse.RequestId      = context.StringValue("ListJobGroups.RequestId");
            listJobGroupsResponse.Success        = context.BooleanValue("ListJobGroups.Success");
            listJobGroupsResponse.Code           = context.StringValue("ListJobGroups.Code");
            listJobGroupsResponse.Message        = context.StringValue("ListJobGroups.Message");
            listJobGroupsResponse.HttpStatusCode = context.IntegerValue("ListJobGroups.HttpStatusCode");

            ListJobGroupsResponse.ListJobGroups_JobGroups jobGroups = new ListJobGroupsResponse.ListJobGroups_JobGroups();
            jobGroups.TotalCount = context.IntegerValue("ListJobGroups.JobGroups.TotalCount");
            jobGroups.PageNumber = context.IntegerValue("ListJobGroups.JobGroups.PageNumber");
            jobGroups.PageSize   = context.IntegerValue("ListJobGroups.JobGroups.PageSize");

            List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup> jobGroups_list = new List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup>();

            for (int i = 0; i < context.Length("ListJobGroups.JobGroups.List.Length"); i++)
            {
                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup jobGroup = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup();
                jobGroup.JobGroupId          = context.StringValue("ListJobGroups.JobGroups.List[" + i + "].JobGroupId");
                jobGroup.JobGroupName        = context.StringValue("ListJobGroups.JobGroups.List[" + i + "].JobGroupName");
                jobGroup.JobGroupDescription = context.StringValue("ListJobGroups.JobGroups.List[" + i + "].JobGroupDescription");
                jobGroup.ScriptId            = context.StringValue("ListJobGroups.JobGroups.List[" + i + "].ScriptId");
                jobGroup.ScriptName          = context.StringValue("ListJobGroups.JobGroups.List[" + i + "].ScriptName");
                jobGroup.CreationTime        = context.LongValue("ListJobGroups.JobGroups.List[" + i + "].CreationTime");

                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy strategy = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy();
                strategy.StartTime = context.LongValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.StartTime");
                strategy.EndTime   = context.LongValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.EndTime");
                jobGroup.Strategy  = strategy;

                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress progress = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress();
                progress.TotalJobs        = context.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalJobs");
                progress.Status           = context.StringValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Status");
                progress.TotalNotAnswered = context.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalNotAnswered");
                progress.TotalCompleted   = context.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalCompleted");
                progress.StartTime        = context.LongValue("ListJobGroups.JobGroups.List[" + i + "].Progress.StartTime");
                progress.Duration         = context.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Duration");
                jobGroup.Progress         = progress;

                jobGroups_list.Add(jobGroup);
            }
            jobGroups.List = jobGroups_list;
            listJobGroupsResponse.JobGroups = jobGroups;

            return(listJobGroupsResponse);
        }
示例#2
0
        public static ListJobGroupsResponse Unmarshall(UnmarshallerContext _ctx)
        {
            ListJobGroupsResponse listJobGroupsResponse = new ListJobGroupsResponse();

            listJobGroupsResponse.HttpResponse   = _ctx.HttpResponse;
            listJobGroupsResponse.RequestId      = _ctx.StringValue("ListJobGroups.RequestId");
            listJobGroupsResponse.Success        = _ctx.BooleanValue("ListJobGroups.Success");
            listJobGroupsResponse.Code           = _ctx.StringValue("ListJobGroups.Code");
            listJobGroupsResponse.Message        = _ctx.StringValue("ListJobGroups.Message");
            listJobGroupsResponse.HttpStatusCode = _ctx.IntegerValue("ListJobGroups.HttpStatusCode");

            ListJobGroupsResponse.ListJobGroups_JobGroups jobGroups = new ListJobGroupsResponse.ListJobGroups_JobGroups();
            jobGroups.TotalCount = _ctx.IntegerValue("ListJobGroups.JobGroups.TotalCount");
            jobGroups.PageNumber = _ctx.IntegerValue("ListJobGroups.JobGroups.PageNumber");
            jobGroups.PageSize   = _ctx.IntegerValue("ListJobGroups.JobGroups.PageSize");

            List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup> jobGroups_list = new List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup>();

            for (int i = 0; i < _ctx.Length("ListJobGroups.JobGroups.List.Length"); i++)
            {
                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup jobGroup = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup();
                jobGroup.Id           = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Id");
                jobGroup.Name         = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Name");
                jobGroup.Description  = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Description");
                jobGroup.ScenarioId   = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].ScenarioId");
                jobGroup.JobFilePath  = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].JobFilePath");
                jobGroup.CreationTime = _ctx.LongValue("ListJobGroups.JobGroups.List[" + i + "].CreationTime");

                List <string> jobGroup_callingNumbers = new List <string>();
                for (int j = 0; j < _ctx.Length("ListJobGroups.JobGroups.List[" + i + "].CallingNumbers.Length"); j++)
                {
                    jobGroup_callingNumbers.Add(_ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].CallingNumbers[" + j + "]"));
                }
                jobGroup.CallingNumbers = jobGroup_callingNumbers;

                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy strategy = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy();
                strategy.Id                 = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.Id");
                strategy.Name               = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.Name");
                strategy.Description        = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.Description");
                strategy.Type               = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.Type");
                strategy.StartTime          = _ctx.LongValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.StartTime");
                strategy.EndTime            = _ctx.LongValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.EndTime");
                strategy.RepeatBy           = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.RepeatBy");
                strategy.MaxAttemptsPerDay  = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.MaxAttemptsPerDay");
                strategy.MinAttemptInterval = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.MinAttemptInterval");
                strategy.Customized         = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.Customized");
                strategy.RoutingStrategy    = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.RoutingStrategy");
                strategy.FollowUpStrategy   = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.FollowUpStrategy");
                strategy.IsTemplate         = _ctx.BooleanValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.IsTemplate");

                List <string> strategy_repeatDays = new List <string>();
                for (int j = 0; j < _ctx.Length("ListJobGroups.JobGroups.List[" + i + "].Strategy.RepeatDays.Length"); j++)
                {
                    strategy_repeatDays.Add(_ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.RepeatDays[" + j + "]"));
                }
                strategy.RepeatDays = strategy_repeatDays;

                List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy.ListJobGroups_TimeFrame> strategy_workingTime = new List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy.ListJobGroups_TimeFrame>();
                for (int j = 0; j < _ctx.Length("ListJobGroups.JobGroups.List[" + i + "].Strategy.WorkingTime.Length"); j++)
                {
                    ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy.ListJobGroups_TimeFrame timeFrame = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy.ListJobGroups_TimeFrame();
                    timeFrame.BeginTime = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.WorkingTime[" + j + "].BeginTime");
                    timeFrame.EndTime   = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.WorkingTime[" + j + "].EndTime");

                    strategy_workingTime.Add(timeFrame);
                }
                strategy.WorkingTime = strategy_workingTime;
                jobGroup.Strategy    = strategy;

                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress progress = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress();
                progress.TotalJobs        = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalJobs");
                progress.Status           = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Status");
                progress.TotalNotAnswered = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalNotAnswered");
                progress.TotalCompleted   = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalCompleted");
                progress.StartTime        = _ctx.LongValue("ListJobGroups.JobGroups.List[" + i + "].Progress.StartTime");
                progress.Duration         = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Duration");

                List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress.ListJobGroups_KeyValuePair> progress_categories = new List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress.ListJobGroups_KeyValuePair>();
                for (int j = 0; j < _ctx.Length("ListJobGroups.JobGroups.List[" + i + "].Progress.Categories.Length"); j++)
                {
                    ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress.ListJobGroups_KeyValuePair keyValuePair = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress.ListJobGroups_KeyValuePair();
                    keyValuePair.Key    = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Categories[" + j + "].Key");
                    keyValuePair._Value = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Categories[" + j + "].Value");

                    progress_categories.Add(keyValuePair);
                }
                progress.Categories = progress_categories;
                jobGroup.Progress   = progress;

                jobGroups_list.Add(jobGroup);
            }
            jobGroups.List = jobGroups_list;
            listJobGroupsResponse.JobGroups = jobGroups;

            return(listJobGroupsResponse);
        }
示例#3
0
        public static ListJobGroupsResponse Unmarshall(UnmarshallerContext _ctx)
        {
            ListJobGroupsResponse listJobGroupsResponse = new ListJobGroupsResponse();

            listJobGroupsResponse.HttpResponse   = _ctx.HttpResponse;
            listJobGroupsResponse.Code           = _ctx.StringValue("ListJobGroups.Code");
            listJobGroupsResponse.HttpStatusCode = _ctx.IntegerValue("ListJobGroups.HttpStatusCode");
            listJobGroupsResponse.Message        = _ctx.StringValue("ListJobGroups.Message");
            listJobGroupsResponse.RequestId      = _ctx.StringValue("ListJobGroups.RequestId");
            listJobGroupsResponse.Success        = _ctx.BooleanValue("ListJobGroups.Success");
            listJobGroupsResponse.AsyncTaskId    = _ctx.StringValue("ListJobGroups.AsyncTaskId");

            ListJobGroupsResponse.ListJobGroups_JobGroups jobGroups = new ListJobGroupsResponse.ListJobGroups_JobGroups();
            jobGroups.PageNumber = _ctx.IntegerValue("ListJobGroups.JobGroups.PageNumber");
            jobGroups.PageSize   = _ctx.IntegerValue("ListJobGroups.JobGroups.PageSize");
            jobGroups.TotalCount = _ctx.IntegerValue("ListJobGroups.JobGroups.TotalCount");

            List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup> jobGroups_list = new List <ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup>();

            for (int i = 0; i < _ctx.Length("ListJobGroups.JobGroups.List.Length"); i++)
            {
                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup jobGroup = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup();
                jobGroup.CreationTime         = _ctx.LongValue("ListJobGroups.JobGroups.List[" + i + "].CreationTime");
                jobGroup.JobGroupDescription  = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].JobGroupDescription");
                jobGroup.JobGroupId           = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].JobGroupId");
                jobGroup.JobGroupName         = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].JobGroupName");
                jobGroup.ScriptId             = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].ScriptId");
                jobGroup.ScriptName           = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].ScriptName");
                jobGroup.JobDataParsingTaskId = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].JobDataParsingTaskId");
                jobGroup.ModifyTime           = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].ModifyTime");
                jobGroup.ScriptVersion        = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].ScriptVersion");
                jobGroup.Status = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Status");

                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress progress = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Progress();
                progress.Duration         = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Duration");
                progress.StartTime        = _ctx.LongValue("ListJobGroups.JobGroups.List[" + i + "].Progress.StartTime");
                progress.Status           = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Status");
                progress.TotalCompleted   = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalCompleted");
                progress.TotalJobs        = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalJobs");
                progress.TotalNotAnswered = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.TotalNotAnswered");
                progress.CancelledNum     = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.CancelledNum");
                progress.FailedNum        = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.FailedNum");
                progress.Scheduling       = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.Scheduling");
                progress.PausedNum        = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.PausedNum");
                progress.ExecutingNum     = _ctx.IntegerValue("ListJobGroups.JobGroups.List[" + i + "].Progress.ExecutingNum");
                jobGroup.Progress         = progress;

                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_ExportProgress exportProgress = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_ExportProgress();
                exportProgress.FileHttpUrl = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].ExportProgress.FileHttpUrl");
                exportProgress.Progress    = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].ExportProgress.Progress");
                exportProgress.Status      = _ctx.StringValue("ListJobGroups.JobGroups.List[" + i + "].ExportProgress.Status");
                jobGroup.ExportProgress    = exportProgress;

                ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy strategy = new ListJobGroupsResponse.ListJobGroups_JobGroups.ListJobGroups_JobGroup.ListJobGroups_Strategy();
                strategy.EndTime   = _ctx.LongValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.EndTime");
                strategy.StartTime = _ctx.LongValue("ListJobGroups.JobGroups.List[" + i + "].Strategy.StartTime");
                jobGroup.Strategy  = strategy;

                jobGroups_list.Add(jobGroup);
            }
            jobGroups.List = jobGroups_list;
            listJobGroupsResponse.JobGroups = jobGroups;

            return(listJobGroupsResponse);
        }