dodopayments_rust 2.2.2

Rust SDK for Dodo Payments API
Documentation
/*
 * public
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.87.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// ThemeModeConfig : Color configuration for a single theme mode (light or dark).  All color fields accept standard CSS color formats: - Hex: `#fff`, `#ffffff`, `#ffffffff` (with or without # prefix) - RGB/RGBA: `rgb(255, 255, 255)`, `rgba(255, 255, 255, 0.5)` - HSL/HSLA: `hsl(120, 100%, 50%)`, `hsla(120, 100%, 50%, 0.5)` - Named colors: `red`, `blue`, `transparent`, etc. - Advanced: `hwb()`, `lab()`, `lch()`, `oklab()`, `oklch()`, `color()`
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ThemeModeConfig {
    /// Background primary color  Examples: `\"#ffffff\"`, `\"rgb(255, 255, 255)\"`, `\"white\"`
    #[serde(rename = "bg_primary", skip_serializing_if = "Option::is_none")]
    pub bg_primary: Option<String>,
    /// Background secondary color
    #[serde(rename = "bg_secondary", skip_serializing_if = "Option::is_none")]
    pub bg_secondary: Option<String>,
    /// Border primary color
    #[serde(rename = "border_primary", skip_serializing_if = "Option::is_none")]
    pub border_primary: Option<String>,
    /// Border secondary color
    #[serde(rename = "border_secondary", skip_serializing_if = "Option::is_none")]
    pub border_secondary: Option<String>,
    /// Primary button background color
    #[serde(rename = "button_primary", skip_serializing_if = "Option::is_none")]
    pub button_primary: Option<String>,
    /// Primary button hover color
    #[serde(rename = "button_primary_hover", skip_serializing_if = "Option::is_none")]
    pub button_primary_hover: Option<String>,
    /// Secondary button background color
    #[serde(rename = "button_secondary", skip_serializing_if = "Option::is_none")]
    pub button_secondary: Option<String>,
    /// Secondary button hover color
    #[serde(rename = "button_secondary_hover", skip_serializing_if = "Option::is_none")]
    pub button_secondary_hover: Option<String>,
    /// Primary button text color
    #[serde(rename = "button_text_primary", skip_serializing_if = "Option::is_none")]
    pub button_text_primary: Option<String>,
    /// Secondary button text color
    #[serde(rename = "button_text_secondary", skip_serializing_if = "Option::is_none")]
    pub button_text_secondary: Option<String>,
    /// Input focus border color
    #[serde(rename = "input_focus_border", skip_serializing_if = "Option::is_none")]
    pub input_focus_border: Option<String>,
    /// Text error color
    #[serde(rename = "text_error", skip_serializing_if = "Option::is_none")]
    pub text_error: Option<String>,
    /// Text placeholder color
    #[serde(rename = "text_placeholder", skip_serializing_if = "Option::is_none")]
    pub text_placeholder: Option<String>,
    /// Text primary color
    #[serde(rename = "text_primary", skip_serializing_if = "Option::is_none")]
    pub text_primary: Option<String>,
    /// Text secondary color
    #[serde(rename = "text_secondary", skip_serializing_if = "Option::is_none")]
    pub text_secondary: Option<String>,
    /// Text success color
    #[serde(rename = "text_success", skip_serializing_if = "Option::is_none")]
    pub text_success: Option<String>,
}

impl ThemeModeConfig {
    /// Color configuration for a single theme mode (light or dark).  All color fields accept standard CSS color formats: - Hex: `#fff`, `#ffffff`, `#ffffffff` (with or without # prefix) - RGB/RGBA: `rgb(255, 255, 255)`, `rgba(255, 255, 255, 0.5)` - HSL/HSLA: `hsl(120, 100%, 50%)`, `hsla(120, 100%, 50%, 0.5)` - Named colors: `red`, `blue`, `transparent`, etc. - Advanced: `hwb()`, `lab()`, `lch()`, `oklab()`, `oklch()`, `color()`
    pub fn new() -> ThemeModeConfig {
        ThemeModeConfig {
            bg_primary: None,
            bg_secondary: None,
            border_primary: None,
            border_secondary: None,
            button_primary: None,
            button_primary_hover: None,
            button_secondary: None,
            button_secondary_hover: None,
            button_text_primary: None,
            button_text_secondary: None,
            input_focus_border: None,
            text_error: None,
            text_placeholder: None,
            text_primary: None,
            text_secondary: None,
            text_success: None,
        }
    }
}