public Builder withCronSchedule(String cronExpression) {
   request.setTriggerType(TriggerType.CronTrigger);
   Map<String, String> config = new HashMap<String, String>();
   config.put(TriggerConstants.CronTrigger.CRON_EXPRESSION, cronExpression);
   request.setTriggerConfiguration(config);
   return this;
 }
 public Builder(ISchedule schedule) {
   request.setToken(schedule.getToken());
   request.setName(schedule.getName());
   request.setTriggerType(schedule.getTriggerType());
   request.setTriggerConfiguration(schedule.getTriggerConfiguration());
   request.setStartDate(schedule.getStartDate());
   request.setEndDate(schedule.getEndDate());
   request.setMetadata(schedule.getMetadata());
 }
 public Builder withSimpleSchedule(Long interval, Integer count) {
   request.setTriggerType(TriggerType.SimpleTrigger);
   Map<String, String> config = new HashMap<String, String>();
   if (interval != null) {
     config.put(TriggerConstants.SimpleTrigger.REPEAT_INTERVAL, String.valueOf(interval));
   }
   if (count != null) {
     config.put(TriggerConstants.SimpleTrigger.REPEAT_COUNT, String.valueOf(count));
   }
   request.setTriggerConfiguration(config);
   return this;
 }