Paginated Response

constructor(data: List<T>, page: Int, pageSize: Int, totalDataCount: Long)

Constructor to init the PaginatedResponse

Parameters

data

The data retrieved by the request

page

The number of the page requested

pageSize

The size of the maximum items for page

totalDataCount

The total amount of data available, it is used to automatically detect if the page is the last one available


constructor(data: List<T>, page: Int, pageSize: Int, isLastPage: Boolean)

Constructor to init the PaginatedResponse

Parameters

data

The data retrieved by the request

page

The number of the page requested

pageSize

The size of the maximum items for page

isLastPage

Whether the retrieved page is the last available