container/src/main/java/com/streamsets/datacollector/restapi/bean/BeanHelper.java
public static StatusJson wrapState(PipelineStatus status) {
    if(status == null) {
      return null;
    }
    switch(status) {
      case STOPPED:
        return StatusJson.STOPPED;
      case STOPPING:
        return StatusJson.STOPPING;
      case RUNNING:
        return StatusJson.RUNNING;
      case RUN_ERROR:
        return StatusJson.RUN_ERROR;
      case FINISHED:
        return StatusJson.FINISHED;
      case CONNECTING:
        return StatusJson.CONNECTING;
      case CONNECT_ERROR:
        return StatusJson.CONNECT_ERROR;
      case DISCONNECTED:
        return StatusJson.DISCONNECTED;
      case DISCONNECTING:
        return StatusJson.DISCONNECTING;
      case EDITED:
        return StatusJson.EDITED;
      case FINISHING:
        return StatusJson.FINISHING;
      case KILLED:
        return StatusJson.KILLED;
      case RUNNING_ERROR:
        return StatusJson.RUNNING_ERROR;
      case STARTING:
        return StatusJson.STARTING;
      case STARTING_ERROR:
        return StatusJson.STARTING_ERROR;
      case START_ERROR:
        return StatusJson.START_ERROR;
      case RETRY:
        return StatusJson.RETRY;
      case STOP_ERROR:
        return StatusJson.STOP_ERROR;
      case STOPPING_ERROR:
        return StatusJson.STOPPING_ERROR;
      case DELETED:
        return StatusJson.DELETED;
      default:
        throw new IllegalArgumentException("Unrecognized state" + status);

    }
  }
public static StatusJson wrapState(PipelineStatus status) {
    if(status == null) {
      return null;
    }
    switch(status) {
      case STOPPED:
        return StatusJson.STOPPED;
      case STOPPING:
        return StatusJson.STOPPING;
      case RUNNING:
        return StatusJson.RUNNING;
      case RUN_ERROR:
        return StatusJson.RUN_ERROR;
      case FINISHED:
        return StatusJson.FINISHED;
      case CONNECTING:
        return StatusJson.CONNECTING;
      case CONNECT_ERROR:
        return StatusJson.CONNECT_ERROR;
      case DISCONNECTED:
        return StatusJson.DISCONNECTED;
      case DISCONNECTING:
        return StatusJson.DISCONNECTING;
      case EDITED:
        return StatusJson.EDITED;
      case FINISHING:
        return StatusJson.FINISHING;
      case KILLED:
        return StatusJson.KILLED;
      case RUNNING_ERROR:
        return StatusJson.RUNNING_ERROR;
      case STARTING:
        return StatusJson.STARTING;
      case STARTING_ERROR:
        return StatusJson.STARTING_ERROR;
      case START_ERROR:
        return StatusJson.START_ERROR;
      case RETRY:
        return StatusJson.RETRY;
      case STOP_ERROR:
        return StatusJson.STOP_ERROR;
      case STOPPING_ERROR:
        return StatusJson.STOPPING_ERROR;
      case DELETED:
        return StatusJson.DELETED;
      default:
        throw new IllegalArgumentException("Unrecognized state" + status);

    }
  }
**************************************************