code: public PagedList<CloudTask> list(final String jobId, final TaskListOptions taskListOptions) {
          ServiceResponseWithHeaders<Page<CloudTask>, TaskListHeaders> response = listSinglePageAsync(jobId, taskListOptions).toBlocking().single();
          return new PagedList<CloudTask>(response.body()) {
              @Override
              public Page<CloudTask> nextPage(String nextPageLink) {
                  TaskListNextOptions taskListNextOptions = null;
                  if (taskListOptions != null) {
                      taskListNextOptions = new TaskListNextOptions();
                      taskListNextOptions.withClientRequestId(taskListOptions.clientRequestId());
                      taskListNextOptions.withReturnClientRequestId(taskListOptions.returnClientRequestId());
                      taskListNextOptions.withOcpDate(taskListOptions.ocpDate());
                  }
                  return listNextSinglePageAsync(nextPageLink, taskListNextOptions).toBlocking().single().body();
              }
          };
      }
docs: Lists all of the tasks that are associated with the specified job.
  For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks.
  
  @param jobId The ID of the job.
  @param taskListOptions Additional parameters for the operation
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws BatchErrorException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the PagedList&lt;CloudTask&gt; object if successful.