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};

/// ActivityRequestRecord : A record of a trigger API request — which workflow was triggered for which subscribers.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActivityRequestRecord {
    /// ISO 8601 timestamp.
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// Request UUID.
    #[serde(rename = "id")]
    pub id: String,
    /// Processing status.
    #[serde(rename = "status")]
    pub status: String,
    /// List of targeted subscriber IDs.
    #[serde(rename = "subscriber_ids")]
    pub subscriber_ids: Vec<String>,
    /// Client-provided transaction ID for idempotency.
    #[serde(rename = "transaction_id")]
    pub transaction_id: String,
    /// The workflow that was triggered.
    #[serde(rename = "workflow_identifier")]
    pub workflow_identifier: String,
}

impl ActivityRequestRecord {
    /// A record of a trigger API request — which workflow was triggered for which subscribers.
    pub fn new(created_at: String, id: String, status: String, subscriber_ids: Vec<String>, transaction_id: String, workflow_identifier: String) -> ActivityRequestRecord {
        ActivityRequestRecord {
            created_at,
            id,
            status,
            subscriber_ids,
            transaction_id,
            workflow_identifier,
        }
    }
}