enbbox 1.0.1

Notification infrastructure API — open-source alternative to Novu/Courier
Documentation
/*
 * enbbox API
 *
 * Notification infrastructure API — open-source alternative to Novu/Courier
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// NotificationLog : A notification log entry with processing status and metadata.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NotificationLog {
    #[serde(rename = "channels")]
    pub channels: Vec<String>,
    /// ISO 8601 creation timestamp.
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// Unique identifier.
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "jobs")]
    pub jobs: Vec<models::JobLog>,
    /// Subscriber identifier.
    #[serde(rename = "subscriber_id")]
    pub subscriber_id: String,
    #[serde(rename = "transaction_id")]
    pub transaction_id: String,
    #[serde(rename = "workflow_id")]
    pub workflow_id: String,
}

impl NotificationLog {
    /// A notification log entry with processing status and metadata.
    pub fn new(channels: Vec<String>, created_at: String, id: String, jobs: Vec<models::JobLog>, subscriber_id: String, transaction_id: String, workflow_id: String) -> NotificationLog {
        NotificationLog {
            channels,
            created_at,
            id,
            jobs,
            subscriber_id,
            transaction_id,
            workflow_id,
        }
    }
}