authentik-client 2026.2.2-rc2

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

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

/// PatchedWsFederationProviderRequest : WSFederationProvider Serializer
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PatchedWsFederationProviderRequest {
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
    #[serde(
        rename = "authentication_flow",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub authentication_flow: Option<Option<uuid::Uuid>>,
    /// Flow used when authorizing this provider.
    #[serde(rename = "authorization_flow", skip_serializing_if = "Option::is_none")]
    pub authorization_flow: Option<uuid::Uuid>,
    /// Flow used ending the session from a provider.
    #[serde(rename = "invalidation_flow", skip_serializing_if = "Option::is_none")]
    pub invalidation_flow: Option<uuid::Uuid>,
    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
    pub property_mappings: Option<Vec<uuid::Uuid>>,
    #[serde(rename = "reply_url", skip_serializing_if = "Option::is_none")]
    pub reply_url: Option<String>,
    #[serde(rename = "wtrealm", skip_serializing_if = "Option::is_none")]
    pub wtrealm: Option<String>,
    /// Assertion valid not before current time + this value (Format: hours=-1;minutes=-2;seconds=-3).
    #[serde(rename = "assertion_valid_not_before", skip_serializing_if = "Option::is_none")]
    pub assertion_valid_not_before: Option<String>,
    /// Assertion not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
    #[serde(rename = "assertion_valid_not_on_or_after", skip_serializing_if = "Option::is_none")]
    pub assertion_valid_not_on_or_after: Option<String>,
    /// Session not valid on or after current time + this value (Format: hours=1;minutes=2;seconds=3).
    #[serde(rename = "session_valid_not_on_or_after", skip_serializing_if = "Option::is_none")]
    pub session_valid_not_on_or_after: Option<String>,
    /// Configure how the NameID value will be created. When left empty, the NameIDPolicy of the incoming request will be considered
    #[serde(
        rename = "name_id_mapping",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub name_id_mapping: Option<Option<uuid::Uuid>>,
    /// Configure how the AuthnContextClassRef value will be created. When left empty, the AuthnContextClassRef will be set based on which authentication methods the user used to authenticate.
    #[serde(
        rename = "authn_context_class_ref_mapping",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub authn_context_class_ref_mapping: Option<Option<uuid::Uuid>>,
    #[serde(rename = "digest_algorithm", skip_serializing_if = "Option::is_none")]
    pub digest_algorithm: Option<models::DigestAlgorithmEnum>,
    #[serde(rename = "signature_algorithm", skip_serializing_if = "Option::is_none")]
    pub signature_algorithm: Option<models::SignatureAlgorithmEnum>,
    /// Keypair used to sign outgoing Responses going to the Service Provider.
    #[serde(
        rename = "signing_kp",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub signing_kp: Option<Option<uuid::Uuid>>,
    /// When selected, incoming assertions are encrypted by the IdP using the public key of the encryption keypair. The assertion is decrypted by the SP using the the private key.
    #[serde(
        rename = "encryption_kp",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub encryption_kp: Option<Option<uuid::Uuid>>,
    #[serde(rename = "sign_assertion", skip_serializing_if = "Option::is_none")]
    pub sign_assertion: Option<bool>,
    #[serde(rename = "sign_logout_request", skip_serializing_if = "Option::is_none")]
    pub sign_logout_request: Option<bool>,
    #[serde(rename = "default_name_id_policy", skip_serializing_if = "Option::is_none")]
    pub default_name_id_policy: Option<models::SamlNameIdPolicyEnum>,
}

impl PatchedWsFederationProviderRequest {
    /// WSFederationProvider Serializer
    pub fn new() -> PatchedWsFederationProviderRequest {
        PatchedWsFederationProviderRequest {
            name: None,
            authentication_flow: None,
            authorization_flow: None,
            invalidation_flow: None,
            property_mappings: None,
            reply_url: None,
            wtrealm: None,
            assertion_valid_not_before: None,
            assertion_valid_not_on_or_after: None,
            session_valid_not_on_or_after: None,
            name_id_mapping: None,
            authn_context_class_ref_mapping: None,
            digest_algorithm: None,
            signature_algorithm: None,
            signing_kp: None,
            encryption_kp: None,
            sign_assertion: None,
            sign_logout_request: None,
            default_name_id_policy: None,
        }
    }
}