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

/// JobLog : A job processing log entry with timing and status.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JobLog {
    /// ISO 8601 creation timestamp.
    #[serde(rename = "created_at")]
    pub created_at: String,
    /// Error type.
    #[serde(rename = "error", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub error: Option<Option<String>>,
    /// Unique identifier.
    #[serde(rename = "id")]
    pub id: String,
    /// Provider identifier.
    #[serde(rename = "provider_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub provider_id: Option<Option<String>>,
    /// Current status.
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "step_type")]
    pub step_type: String,
    /// ISO 8601 last-modified timestamp.
    #[serde(rename = "updated_at")]
    pub updated_at: String,
}

impl JobLog {
    /// A job processing log entry with timing and status.
    pub fn new(created_at: String, id: String, status: String, step_type: String, updated_at: String) -> JobLog {
        JobLog {
            created_at,
            error: None,
            id,
            provider_id: None,
            status,
            step_type,
            updated_at,
        }
    }
}