Skip to main content

authentik_client/models/
partial_group.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2026.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PartialGroup : Partial Group Serializer, does not include child relations.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PartialGroup {
17    #[serde(rename = "pk")]
18    pub pk: uuid::Uuid,
19    /// Get a numerical, int32 ID for the group
20    #[serde(rename = "num_pk")]
21    pub num_pk: i32,
22    #[serde(rename = "name")]
23    pub name: String,
24    /// Users added to this group will be superusers.
25    #[serde(rename = "is_superuser", skip_serializing_if = "Option::is_none")]
26    pub is_superuser: Option<bool>,
27    #[serde(rename = "attributes", skip_serializing_if = "Option::is_none")]
28    pub attributes: Option<std::collections::HashMap<String, serde_json::Value>>,
29}
30
31impl PartialGroup {
32    /// Partial Group Serializer, does not include child relations.
33    pub fn new(pk: uuid::Uuid, num_pk: i32, name: String) -> PartialGroup {
34        PartialGroup {
35            pk,
36            num_pk,
37            name,
38            is_superuser: None,
39            attributes: None,
40        }
41    }
42}