code: public Map<String, Object> toObject() {
      final List<String> slaActions = new ArrayList<>();
      final Map<String, Object> slaInfo = new HashMap<>();
  
      slaInfo.put(SlaOptionDeprecated.INFO_FLOW_NAME, this.flowName);
      if (hasAlert()) {
        slaActions.add(SlaOptionDeprecated.ACTION_ALERT);
        slaInfo.put(SlaOptionDeprecated.ALERT_TYPE, ALERT_TYPE_EMAIL);
      }
      if (hasKill()) {
        if (this.type.getComponent() == ComponentType.FLOW) {
          slaActions.add(SlaOptionDeprecated.ACTION_CANCEL_FLOW);
        } else { // JOB
          slaActions.add(SlaOptionDeprecated.ACTION_KILL_JOB);
        }
      }
      if (this.type.getComponent() == ComponentType.JOB) {
        slaInfo.put(SlaOptionDeprecated.INFO_JOB_NAME, this.jobName);
      }
  
      String slaType;
      switch (this.type) {
        case FLOW_FINISH:
          slaType = SlaOptionDeprecated.TYPE_FLOW_FINISH;
          break;
        case FLOW_SUCCEED:
          slaType = SlaOptionDeprecated.TYPE_FLOW_SUCCEED;
          break;
        case JOB_FINISH:
          slaType = SlaOptionDeprecated.TYPE_JOB_FINISH;
          break;
        case JOB_SUCCEED:
          slaType = SlaOptionDeprecated.TYPE_JOB_SUCCEED;
          break;
        default:
          throw new IllegalStateException("unsupported SLA type " + this.type.getName());
      }
  
      slaInfo.put(SlaOptionDeprecated.INFO_DURATION, durationToString(this.duration));
      slaInfo.put(SlaOptionDeprecated.INFO_EMAIL_LIST, emails);
  
      SlaOptionDeprecated slaOption = new SlaOptionDeprecated(slaType, slaActions, slaInfo);
      return slaOption.toObject();
  
    }
docs: Convert the SLA option to the original JSON format, used by {@link SlaOptionDeprecated}.
  
  @return the JSON format for {@link SlaOptionDeprecated}.