// authentik
//
// Making authentication simple.
//
// The version of the OpenAPI document: 2026.5.0-rc1
// Contact: hello@goauthentik.io
// Generated by: https://openapi-generator.tech

use serde::{Deserialize, Serialize};

use crate::models;

/// ContextualFlowInfo : Contextual flow information for a challenge
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContextualFlowInfo {
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    #[serde(rename = "background", skip_serializing_if = "Option::is_none")]
    pub background: Option<String>,
    #[serde(
        rename = "background_themed_urls",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub background_themed_urls: Option<Option<models::ThemedUrls>>,
    #[serde(rename = "cancel_url")]
    pub cancel_url: String,
    #[serde(rename = "layout")]
    pub layout: models::ContextualFlowInfoLayoutEnum,
}

impl ContextualFlowInfo {
    /// Contextual flow information for a challenge
    pub fn new(
        cancel_url: String,
        layout: models::ContextualFlowInfoLayoutEnum,
    ) -> ContextualFlowInfo {
        ContextualFlowInfo {
            title: None,
            background: None,
            background_themed_urls: None,
            cancel_url,
            layout,
        }
    }
}
