// Parameters for pagination.
//
// Copyright 2023 Frequenz Energy-as-a-Service GmbH
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.

syntax = "proto3";

package frequenz.api.common.v1.pagination;

// A message defining parameters for paginating list requests.
// It can be appended to a request message to specify the desired page of
// results and the maximum number of results per page. For initial requests
// (requesting the first page), the page_token should not be provided. For
// subsequent requests (requesting any page after the first), the
// next_page_token from the previous responses PaginationInfo must be supplied.
// The page_size should only be specified in the initial request and will be
// disregarded in subsequent requests.
message PaginationParams {
  // The maximum number of results to be returned per request.
  optional uint32 page_size = 1;

  // The token identifying a specific page of the list results.
  optional string page_token = 2;
}
