/*
 * API Documentation
 *
 * Source of truth and network automation platform
 *
 * The version of the OpenAPI document: 3.1.0 (3.1)
 *
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct PaginatedDynamicGroupList {
    #[serde(rename = "count")]
    pub count: i32,
    #[serde(
        rename = "next",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub next: Option<Option<String>>,
    #[serde(
        rename = "previous",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub previous: Option<Option<String>>,
    #[serde(rename = "results")]
    pub results: Vec<crate::models::DynamicGroup>,
}

impl PaginatedDynamicGroupList {
    pub fn new(count: i32, results: Vec<crate::models::DynamicGroup>) -> PaginatedDynamicGroupList {
        PaginatedDynamicGroupList {
            count,
            next: None,
            previous: None,
            results,
        }
    }
}
