/*
 * 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 UpdateOidcConfigRequest {
    /// Display name for the OIDC provider
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// OIDC issuer URL for discovery
    #[serde(rename = "issuer_url", skip_serializing_if = "Option::is_none")]
    pub issuer_url: Option<String>,
    /// OAuth2 client identifier
    #[serde(rename = "client_id", skip_serializing_if = "Option::is_none")]
    pub client_id: Option<String>,
    /// OAuth2 client secret (omit to keep existing)
    #[serde(rename = "client_secret", skip_serializing_if = "Option::is_none")]
    pub client_secret: Option<String>,
    /// OAuth2 scopes to request
    #[serde(rename = "scopes", skip_serializing_if = "Option::is_none")]
    pub scopes: Option<Vec<String>>,
    /// Mapping of OIDC claims to user attributes
    #[serde(rename = "attribute_mapping", skip_serializing_if = "Option::is_none")]
    pub attribute_mapping: Option<serde_json::Value>,
    /// Whether the OIDC configuration is active
    #[serde(rename = "is_enabled", skip_serializing_if = "Option::is_none")]
    pub is_enabled: Option<bool>,
    /// Whether to automatically create user accounts on first login
    #[serde(rename = "auto_create_users", skip_serializing_if = "Option::is_none")]
    pub auto_create_users: Option<bool>,
}

impl UpdateOidcConfigRequest {
    pub fn new() -> UpdateOidcConfigRequest {
        UpdateOidcConfigRequest {
            name: None,
            issuer_url: None,
            client_id: None,
            client_secret: None,
            scopes: None,
            attribute_mapping: None,
            is_enabled: None,
            auto_create_users: None,
        }
    }
}

