// 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;

/// RelatedGroup : Stripped down group serializer to show relevant children/parents for groups
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RelatedGroup {
    #[serde(rename = "pk")]
    pub pk: uuid::Uuid,
    #[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>>,
    #[serde(rename = "group_uuid")]
    pub group_uuid: uuid::Uuid,
}

impl RelatedGroup {
    /// Stripped down group serializer to show relevant children/parents for groups
    pub fn new(pk: uuid::Uuid, name: String, group_uuid: uuid::Uuid) -> RelatedGroup {
        RelatedGroup {
            pk,
            name,
            is_superuser: None,
            attributes: None,
            group_uuid,
        }
    }
}
