MCPcopy Create free account
hub / github.com/BigBoot/AutoKuma / Notification

Class Notification

kuma-client/src/models/notification.rs:17–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15#[derive(Clone, Default, Debug, Serialize, Derivative, Deserialize, Eq)]
16#[derivative(PartialEq)]
17pub struct Notification {
18 /// The unique identifier for the notification service.
19 #[serde(rename = "id")]
20 #[serde_as(as = "Option<DeserializeNumberLenient>")]
21 pub id: Option<i32>,
22
23 /// The name of the notification.
24 #[serde(rename = "name")]
25 pub name: Option<String>,
26
27 /// Indicates whether the notification service is active or not.
28 #[serde(rename = "active")]
29 #[serde_as(as = "Option<DeserializeBoolLenient>")]
30 pub active: Option<bool>,
31
32 /// The user identifier associated with the notification service.
33 #[serde(rename = "user_id")]
34 #[serde(alias = "user_id")]
35 pub user_id: Option<i32>,
36
37 /// Indicates whether the notification service is enabled by default.
38 #[serde(rename = "isDefault")]
39 #[serde(alias = "is_default")]
40 #[serde_as(as = "Option<DeserializeBoolLenient>")]
41 pub is_default: Option<bool>,
42
43 /// Additional service specific configuration in JSON format.
44 #[serde(rename = "config")]
45 #[serde_as(as = "Option<DeserializeValueLenient>")]
46 #[derivative(PartialEq(compare_with = "config_eq"))]
47 pub config: Option<serde_json::Value>,
48}
49
50fn config_eq(a: &Option<serde_json::Value>, b: &Option<serde_json::Value>) -> bool {
51 match (a, b) {

Callers 6

get_managed_entitiesFunction · 0.85
fromMethod · 0.85
fromMethod · 0.85
resolve_namesFunction · 0.85
create_entityMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected