code: public com.squareup.okhttp.Call getTasksAsync(String dtid, Integer count, Integer offset, String status, String order, String sort, final ApiCallback<TaskListEnvelope> callback) throws ApiException {
  
          ProgressResponseBody.ProgressListener progressListener = null;
          ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
  
          if (callback != null) {
              progressListener = new ProgressResponseBody.ProgressListener() {
                  @Override
                  public void update(long bytesRead, long contentLength, boolean done) {
                      callback.onDownloadProgress(bytesRead, contentLength, done);
                  }
              };
  
              progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                  @Override
                  public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                      callback.onUploadProgress(bytesWritten, contentLength, done);
                  }
              };
          }
  
          com.squareup.okhttp.Call call = getTasksValidateBeforeCall(dtid, count, offset, status, order, sort, progressListener, progressRequestListener);
          Type localVarReturnType = new TypeToken<TaskListEnvelope>(){}.getType();
          apiClient.executeAsync(call, localVarReturnType, callback);
          return call;
      }
docs: Returns the all the tasks for a device type. (asynchronously)
  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)
  @param callback The callback to be executed when the API call finishes
  @return The request call
  @throws ApiException If fail to process the API call, e.g. serializing the request body object