authentik-client 3.2024122.1

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

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

/// PatchedSamlProviderRequest : SAMLProvider Serializer
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PatchedSamlProviderRequest {
    #[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 = "acs_url", skip_serializing_if = "Option::is_none")]
    pub acs_url: Option<String>,
    /// Value of the audience restriction field of the assertion. When left empty, no audience restriction will be added.
    #[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
    pub audience: Option<String>,
    /// Also known as EntityID
    #[serde(rename = "issuer", skip_serializing_if = "Option::is_none")]
    pub issuer: 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>>,
    #[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 assertion's Signatures will be validated against this certificate. To allow unsigned Requests, leave on default.
    #[serde(
        rename = "verification_kp",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub verification_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_response", skip_serializing_if = "Option::is_none")]
    pub sign_response: Option<bool>,
    /// This determines how authentik sends the response back to the Service Provider.
    #[serde(rename = "sp_binding", skip_serializing_if = "Option::is_none")]
    pub sp_binding: Option<models::SpBindingEnum>,
    /// Default relay_state value for IDP-initiated logins
    #[serde(rename = "default_relay_state", skip_serializing_if = "Option::is_none")]
    pub default_relay_state: Option<String>,
}

impl PatchedSamlProviderRequest {
    /// SAMLProvider Serializer
    pub fn new() -> PatchedSamlProviderRequest {
        PatchedSamlProviderRequest {
            name: None,
            authentication_flow: None,
            authorization_flow: None,
            invalidation_flow: None,
            property_mappings: None,
            acs_url: None,
            audience: None,
            issuer: None,
            assertion_valid_not_before: None,
            assertion_valid_not_on_or_after: None,
            session_valid_not_on_or_after: None,
            name_id_mapping: None,
            digest_algorithm: None,
            signature_algorithm: None,
            signing_kp: None,
            verification_kp: None,
            encryption_kp: None,
            sign_assertion: None,
            sign_response: None,
            sp_binding: None,
            default_relay_state: None,
        }
    }
}