Skip to main content

authentik_client/models/
notification.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.10.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// Notification : Notification Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Notification {
17    #[serde(rename = "pk")]
18    pub pk: uuid::Uuid,
19    #[serde(rename = "severity")]
20    pub severity: models::SeverityEnum,
21    #[serde(rename = "body")]
22    pub body: String,
23    #[serde(rename = "created")]
24    pub created: String,
25    #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
26    pub event: Option<models::Event>,
27    #[serde(rename = "seen", skip_serializing_if = "Option::is_none")]
28    pub seen: Option<bool>,
29}
30
31impl Notification {
32    /// Notification Serializer
33    pub fn new(pk: uuid::Uuid, severity: models::SeverityEnum, body: String, created: String) -> Notification {
34        Notification {
35            pk,
36            severity,
37            body,
38            created,
39            event: None,
40            seen: None,
41        }
42    }
43}