internal BackupRestoreView.TimeBasedBackupSchedule ToTimeBasedBackupScheduleView()
        {
            var timeBasedBackupScheduleView = new BackupRestoreView.TimeBasedBackupSchedule
            {
                RunDays = this.runDays,
                ScheduleFrequencyType = this.ScheduleFrequencyType,
                RunTimes = this.runTimes
            };

            return(timeBasedBackupScheduleView);
        }
        internal static TimeBasedBackupSchedule FromTimeBasedBackupScheduleView(
            BackupRestoreView.TimeBasedBackupSchedule timeBasedBackupScheduleView)
        {
            var timeBasedBackupSchedule = new TimeBasedBackupSchedule
            {
                runDays = timeBasedBackupScheduleView.RunDays == null ? new List <DayOfWeek>() :  timeBasedBackupScheduleView.RunDays?.Distinct().ToList(),
                ScheduleFrequencyType = timeBasedBackupScheduleView.ScheduleFrequencyType,
                runTimes = timeBasedBackupScheduleView.RunTimes?.Distinct().ToList()
            };

            return(timeBasedBackupSchedule);
        }