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

/// Branding : White-label branding for notification center and email templates.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Branding {
    /// Primary brand color (hex).
    #[serde(rename = "color")]
    pub color: String,
    /// Background color for content area (hex).
    #[serde(rename = "content_background", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub content_background: Option<Option<String>>,
    /// Text direction: `ltr` or `rtl`.
    #[serde(rename = "direction", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub direction: Option<Option<String>>,
    /// Text color override (hex).
    #[serde(rename = "font_color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub font_color: Option<Option<String>>,
    /// Font family for notification UI.
    #[serde(rename = "font_family", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub font_family: Option<Option<String>>,
    /// URL of the brand logo.
    #[serde(rename = "logo")]
    pub logo: String,
}

impl Branding {
    /// White-label branding for notification center and email templates.
    pub fn new(color: String, logo: String) -> Branding {
        Branding {
            color,
            content_background: None,
            direction: None,
            font_color: None,
            font_family: None,
            logo,
        }
    }
}