authentik_rust/models/
pagination.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct Pagination {
15    #[serde(rename = "next")]
16    pub next: f64,
17    #[serde(rename = "previous")]
18    pub previous: f64,
19    #[serde(rename = "count")]
20    pub count: f64,
21    #[serde(rename = "current")]
22    pub current: f64,
23    #[serde(rename = "total_pages")]
24    pub total_pages: f64,
25    #[serde(rename = "start_index")]
26    pub start_index: f64,
27    #[serde(rename = "end_index")]
28    pub end_index: f64,
29}
30
31impl Pagination {
32    pub fn new(next: f64, previous: f64, count: f64, current: f64, total_pages: f64, start_index: f64, end_index: f64) -> Pagination {
33        Pagination {
34            next,
35            previous,
36            count,
37            current,
38            total_pages,
39            start_index,
40            end_index,
41        }
42    }
43}
44