Skip to main content

nautobot_openapi/models/
paginated_virtual_machine_list.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct PaginatedVirtualMachineList {
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::VirtualMachine>,
31}
32
33impl PaginatedVirtualMachineList {
34    pub fn new(
35        count: i32,
36        results: Vec<crate::models::VirtualMachine>,
37    ) -> PaginatedVirtualMachineList {
38        PaginatedVirtualMachineList {
39            count,
40            next: None,
41            previous: None,
42            results,
43        }
44    }
45}