code: public TaskListEnvelope getTasks(String dtid, Integer count, Integer offset, String status, String order, String sort) throws ApiException {
          ApiResponse<TaskListEnvelope> resp = getTasksWithHttpInfo(dtid, count, offset, status, order, sort);
          return resp.getData();
      }
docs: Returns the all the tasks for a device type.
  Returns the all the tasks for a device type.
  @param dtid Device Type ID. (required)
  @param count Max results count. (optional)
  @param offset Result starting offset. (optional)
  @param status Status filter. Comma-separated statuses. (optional)
  @param order Sort results by a field. Valid fields: createdOn. (optional)
  @param sort Sort order. Valid values: asc or desc. (optional)
  @return TaskListEnvelope
  @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body