Skip to main content

onesignal_rust_api/models/
audit_log_event.rs

1/*
2 * OneSignal
3 *
4 * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5 *
6 * Contact: devrel@onesignal.com
7 * Generated by: https://openapi-generator.tech
8 */
9
10
11
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct AuditLogEvent {
15    /// The action that was performed (e.g. notification.sent, segment.created, member.invited).
16    #[serde(rename = "action", skip_serializing_if = "Option::is_none")]
17    pub action: Option<String>,
18    #[serde(rename = "actor", skip_serializing_if = "Option::is_none")]
19    pub actor: Option<Box<crate::models::AuditLogActor>>,
20    /// UUID of the app the event is associated with. Absent for org-level events.
21    #[serde(rename = "app_id", skip_serializing_if = "Option::is_none")]
22    pub app_id: Option<String>,
23    #[serde(rename = "context", skip_serializing_if = "Option::is_none")]
24    pub context: Option<Box<crate::models::AuditLogContext>>,
25    /// UUID of the audit log event.
26    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
27    pub id: Option<String>,
28    /// Additional event-specific data that does not fit into the standard fields.
29    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
30    pub metadata: Option<serde_json::Value>,
31    /// RFC 3339 timestamp of when the event occurred (e.g. 2026-02-18T12:34:56Z).
32    #[serde(rename = "occurred_at", skip_serializing_if = "Option::is_none")]
33    pub occurred_at: Option<String>,
34    /// UUID of the organization the event belongs to.
35    #[serde(rename = "organization_id", skip_serializing_if = "Option::is_none")]
36    pub organization_id: Option<String>,
37    /// The resources the action was performed on. May be empty for org-level events.
38    #[serde(rename = "targets", skip_serializing_if = "Option::is_none")]
39    pub targets: Option<Vec<crate::models::AuditLogTarget>>,
40    /// Schema version of the event payload.
41    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
42    pub version: Option<i32>,
43}
44
45impl AuditLogEvent {
46    pub fn new() -> AuditLogEvent {
47        AuditLogEvent {
48            action: None,
49            actor: None,
50            app_id: None,
51            context: None,
52            id: None,
53            metadata: None,
54            occurred_at: None,
55            organization_id: None,
56            targets: None,
57            version: None,
58        }
59    }
60}
61
62