github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/pagination.rs (about) 1 /* 2 * lakeFS API 3 * 4 * lakeFS HTTP API 5 * 6 * The version of the OpenAPI document: 1.0.0 7 * Contact: services@treeverse.io 8 * Generated by: https://openapi-generator.tech 9 */ 10 11 use crate::models; 12 13 #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] 14 pub struct Pagination { 15 /// Next page is available 16 #[serde(rename = "has_more")] 17 pub has_more: bool, 18 /// Token used to retrieve the next page 19 #[serde(rename = "next_offset")] 20 pub next_offset: String, 21 /// Number of values found in the results 22 #[serde(rename = "results")] 23 pub results: i32, 24 /// Maximal number of entries per page 25 #[serde(rename = "max_per_page")] 26 pub max_per_page: i32, 27 } 28 29 impl Pagination { 30 pub fn new(has_more: bool, next_offset: String, results: i32, max_per_page: i32) -> Pagination { 31 Pagination { 32 has_more, 33 next_offset, 34 results, 35 max_per_page, 36 } 37 } 38 } 39