netbox_openapi/models/
paginated_token_list.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct PaginatedTokenList {
13 #[serde(rename = "count")]
14 pub count: i32,
15 #[serde(
16 rename = "next",
17 default,
18 with = "::serde_with::rust::double_option",
19 skip_serializing_if = "Option::is_none"
20 )]
21 pub next: Option<Option<String>>,
22 #[serde(
23 rename = "previous",
24 default,
25 with = "::serde_with::rust::double_option",
26 skip_serializing_if = "Option::is_none"
27 )]
28 pub previous: Option<Option<String>>,
29 #[serde(rename = "results")]
30 pub results: Vec<crate::models::Token>,
31}
32
33impl PaginatedTokenList {
34 pub fn new(count: i32, results: Vec<crate::models::Token>) -> PaginatedTokenList {
35 PaginatedTokenList {
36 count,
37 next: None,
38 previous: None,
39 results,
40 }
41 }
42}