class ParseRESTCommand extends ParseRequest<JSONObject> {

  public JSONObject toJSONObject() {
    JSONObject jsonObject = new JSONObject();
    try {
      if (httpPath != null) {
        jsonObject.put("httpPath", httpPath);
      }
      jsonObject.put("httpMethod", method.toString());
      if (jsonParameters != null) {
        jsonObject.put("parameters", jsonParameters);
      }
      if (sessionToken != null) {
        jsonObject.put("sessionToken", sessionToken);
      }
      if (localId != null) {
        jsonObject.put("localId", localId);
      }
    } catch (JSONException e) {
      throw new RuntimeException(e.getMessage());
    }
    return jsonObject;
  }

  public  ParseRESTCommand(
      String httpPath,
      ParseHttpRequest.Method httpMethod,
      Map<String, ?> parameters,
      String sessionToken);
  public  ParseRESTCommand(
      String httpPath,
      ParseHttpRequest.Method httpMethod,
      JSONObject jsonParameters,
      String sessionToken);
  private  ParseRESTCommand(
      String httpPath,
      ParseHttpRequest.Method httpMethod,
      JSONObject jsonParameters,
      String localId, String sessionToken);
    ParseRESTCommand(Init<?> builder);

}