// authentik
//
// Making authentication simple.
//
// The version of the OpenAPI document: 2026.5.0-rc1
// Contact: hello@goauthentik.io
// Generated by: https://openapi-generator.tech

use serde::{Deserialize, Serialize};

use crate::models;

/// PartialGroup : Partial Group Serializer, does not include child relations.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PartialGroup {
    #[serde(rename = "pk")]
    pub pk: uuid::Uuid,
    /// Get a numerical, int32 ID for the group
    #[serde(rename = "num_pk")]
    pub num_pk: i32,
    #[serde(rename = "name")]
    pub name: String,
    /// Users added to this group will be superusers.
    #[serde(rename = "is_superuser", skip_serializing_if = "Option::is_none")]
    pub is_superuser: Option<bool>,
    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
    pub attributes: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl PartialGroup {
    /// Partial Group Serializer, does not include child relations.
    pub fn new(pk: uuid::Uuid, num_pk: i32, name: String) -> PartialGroup {
        PartialGroup {
            pk,
            num_pk,
            name,
            is_superuser: None,
            attributes: None,
        }
    }
}
