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

/// StepRecord : A workflow step with its template and active status.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StepRecord {
    /// Whether this resource is active.
    #[serde(rename = "active")]
    pub active: bool,
    /// Unique identifier.
    #[serde(rename = "id")]
    pub id: String,
    /// Display name.
    #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub name: Option<Option<String>>,
    #[serde(rename = "step_type")]
    pub step_type: String,
    #[serde(rename = "template", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub template: Option<Option<serde_json::Value>>,
}

impl StepRecord {
    /// A workflow step with its template and active status.
    pub fn new(active: bool, id: String, step_type: String) -> StepRecord {
        StepRecord {
            active,
            id,
            name: None,
            step_type,
            template: None,
        }
    }
}