@@ -11,16 +11,21 @@ package frequenz.api.common.v1.pagination;
1111
1212// A message defining parameters for paginating list requests.
1313// It can be appended to a request message to specify the desired page of
14- // results and the maximum number of results per page. For initial requests
15- // (requesting the first page), the page_token should not be provided. For
16- // subsequent requests (requesting any page after the first), the
17- // next_page_token from the previous responses PaginationInfo must be supplied.
18- // The page_size should only be specified in the initial request and will be
19- // disregarded in subsequent requests.
14+ // results and the maximum number of results per page.
2015message PaginationParams {
21- // The maximum number of results to be returned per request.
22- optional uint32 page_size = 1 ;
16+ oneof params {
17+ // The maximum number of results to return in a single page. The service may
18+ // return fewer results than requested. If unspecified, the service may
19+ // choose a reasonable default.
20+ // May only be specified in the first request.
21+ uint32 page_size = 1 ;
2322
24- // The token identifying a specific page of the list results.
25- optional string page_token = 2 ;
23+ // A token identifying a page of results to return. This should be the value
24+ // of the `next_page_token` field in the previous response's PaginationInfo.
25+ // For the first request, this field should be omitted.
26+ //
27+ // To avoid keeping remembering the page_size across requests, service
28+ // implementations may choose to encode the page_size in the page_token.
29+ string page_token = 2 ;
30+ }
2631}
0 commit comments