authentik_rust/models/
patched_notification_rule_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// PatchedNotificationRuleRequest : NotificationRule Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PatchedNotificationRuleRequest {
16    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
17    pub name: Option<String>,
18    /// Select which transports should be used to notify the user. If none are selected, the notification will only be shown in the authentik UI.
19    #[serde(rename = "transports", skip_serializing_if = "Option::is_none")]
20    pub transports: Option<Vec<uuid::Uuid>>,
21    /// Controls which severity level the created notifications will have.  * `notice` - Notice * `warning` - Warning * `alert` - Alert
22    #[serde(rename = "severity", skip_serializing_if = "Option::is_none")]
23    pub severity: Option<models::SeverityEnum>,
24    /// Define which group of users this notification should be sent and shown to. If left empty, Notification won't ben sent.
25    #[serde(rename = "group", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub group: Option<Option<uuid::Uuid>>,
27}
28
29impl PatchedNotificationRuleRequest {
30    /// NotificationRule Serializer
31    pub fn new() -> PatchedNotificationRuleRequest {
32        PatchedNotificationRuleRequest {
33            name: None,
34            transports: None,
35            severity: None,
36            group: None,
37        }
38    }
39}
40