tembo_api_client/models/pagination_info.rs
1/*
2 * Tembo Cloud
3 *
4 * Platform API for Tembo Cloud </br> </br> To find a Tembo Data API, please find it here: </br> </br> [AWS US East 1](https://api.data-1.use1.tembo.io/swagger-ui/)
5 *
6 * The version of the OpenAPI document: v1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct PaginationInfo {
15 /// The page returned
16 #[serde(rename = "currentPage")]
17 pub current_page: i32,
18 /// True if more results are available on the next page
19 #[serde(rename = "hasMore")]
20 pub has_more: bool,
21 /// The maximum number of results returned
22 #[serde(rename = "limit")]
23 pub limit: i32,
24}
25
26impl PaginationInfo {
27 pub fn new(current_page: i32, has_more: bool, limit: i32) -> PaginationInfo {
28 PaginationInfo {
29 current_page,
30 has_more,
31 limit,
32 }
33 }
34}