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};

/// AgentConfig : Base serializer class which doesn't implement create/update methods
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AgentConfig {
    #[serde(rename = "device_id")]
    pub device_id: String,
    #[serde(rename = "refresh_interval")]
    pub refresh_interval: i32,
    #[serde(rename = "authorization_flow", deserialize_with = "Option::deserialize")]
    pub authorization_flow: Option<String>,
    #[serde(rename = "jwks_auth")]
    pub jwks_auth: std::collections::HashMap<String, serde_json::Value>,
    #[serde(rename = "jwks_challenge", deserialize_with = "Option::deserialize")]
    pub jwks_challenge: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "nss_uid_offset")]
    pub nss_uid_offset: i32,
    #[serde(rename = "nss_gid_offset")]
    pub nss_gid_offset: i32,
    #[serde(rename = "auth_terminate_session_on_expiry")]
    pub auth_terminate_session_on_expiry: bool,
    #[serde(rename = "system_config")]
    pub system_config: models::Config,
    #[serde(rename = "license_status", deserialize_with = "Option::deserialize")]
    pub license_status: Option<models::LicenseStatusEnum>,
}

impl AgentConfig {
    /// Base serializer class which doesn't implement create/update methods
    pub fn new(
        device_id: String,
        refresh_interval: i32,
        authorization_flow: Option<String>,
        jwks_auth: std::collections::HashMap<String, serde_json::Value>,
        jwks_challenge: Option<std::collections::HashMap<String, serde_json::Value>>,
        nss_uid_offset: i32,
        nss_gid_offset: i32,
        auth_terminate_session_on_expiry: bool,
        system_config: models::Config,
        license_status: Option<models::LicenseStatusEnum>,
    ) -> AgentConfig {
        AgentConfig {
            device_id,
            refresh_interval,
            authorization_flow,
            jwks_auth,
            jwks_challenge,
            nss_uid_offset,
            nss_gid_offset,
            auth_terminate_session_on_expiry,
            system_config,
            license_status,
        }
    }
}