/*
 * Artifact Keeper API
 *
 * REST API for Artifact Keeper, an open-source universal artifact registry. Covers user management, repositories, artifacts, search, security scanning, SBOM, dependency tracking, SSO, analytics, monitoring, telemetry, lifecycle policies, plugins, edge nodes, migration, and administration. Format-specific protocol endpoints (npm, PyPI, Maven, Docker/OCI, etc.) are not included; those follow their respective upstream specifications.
 *
 * The version of the OpenAPI document: 1.0.0-a2
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateSamlConfigRequest {
    /// Display name for the SAML provider
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Identity provider entity ID
    #[serde(rename = "entity_id", skip_serializing_if = "Option::is_none")]
    pub entity_id: Option<String>,
    /// Identity provider SSO endpoint URL
    #[serde(rename = "sso_url", skip_serializing_if = "Option::is_none")]
    pub sso_url: Option<String>,
    /// Identity provider single logout endpoint URL
    #[serde(rename = "slo_url", skip_serializing_if = "Option::is_none")]
    pub slo_url: Option<String>,
    /// PEM-encoded IdP signing certificate (omit to keep existing)
    #[serde(rename = "certificate", skip_serializing_if = "Option::is_none")]
    pub certificate: Option<String>,
    /// SAML NameID format
    #[serde(rename = "name_id_format", skip_serializing_if = "Option::is_none")]
    pub name_id_format: Option<String>,
    /// Mapping of SAML attributes to user properties
    #[serde(rename = "attribute_mapping", skip_serializing_if = "Option::is_none")]
    pub attribute_mapping: Option<serde_json::Value>,
    /// Service provider entity ID
    #[serde(rename = "sp_entity_id", skip_serializing_if = "Option::is_none")]
    pub sp_entity_id: Option<String>,
    /// Whether to sign SAML authentication requests
    #[serde(rename = "sign_requests", skip_serializing_if = "Option::is_none")]
    pub sign_requests: Option<bool>,
    /// Whether to require signed SAML assertions from the IdP
    #[serde(rename = "require_signed_assertions", skip_serializing_if = "Option::is_none")]
    pub require_signed_assertions: Option<bool>,
    /// SAML group value that grants admin privileges
    #[serde(rename = "admin_group", skip_serializing_if = "Option::is_none")]
    pub admin_group: Option<String>,
    /// Whether the SAML configuration is active
    #[serde(rename = "is_enabled", skip_serializing_if = "Option::is_none")]
    pub is_enabled: Option<bool>,
}

impl UpdateSamlConfigRequest {
    pub fn new() -> UpdateSamlConfigRequest {
        UpdateSamlConfigRequest {
            name: None,
            entity_id: None,
            sso_url: None,
            slo_url: None,
            certificate: None,
            name_id_format: None,
            attribute_mapping: None,
            sp_entity_id: None,
            sign_requests: None,
            require_signed_assertions: None,
            admin_group: None,
            is_enabled: None,
        }
    }
}

