Skip to main content

authentik_client/models/
agent_config.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2026.2.0
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AgentConfig : Base serializer class which doesn't implement create/update methods
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AgentConfig {
17    #[serde(rename = "device_id")]
18    pub device_id: String,
19    #[serde(rename = "refresh_interval")]
20    pub refresh_interval: i32,
21    #[serde(rename = "authorization_flow", deserialize_with = "Option::deserialize")]
22    pub authorization_flow: Option<String>,
23    #[serde(rename = "jwks_auth")]
24    pub jwks_auth: std::collections::HashMap<String, serde_json::Value>,
25    #[serde(rename = "jwks_challenge", deserialize_with = "Option::deserialize")]
26    pub jwks_challenge: Option<std::collections::HashMap<String, serde_json::Value>>,
27    #[serde(rename = "nss_uid_offset")]
28    pub nss_uid_offset: i32,
29    #[serde(rename = "nss_gid_offset")]
30    pub nss_gid_offset: i32,
31    #[serde(rename = "auth_terminate_session_on_expiry")]
32    pub auth_terminate_session_on_expiry: bool,
33    #[serde(rename = "system_config")]
34    pub system_config: models::Config,
35    #[serde(rename = "license_status", deserialize_with = "Option::deserialize")]
36    pub license_status: Option<models::LicenseStatusEnum>,
37}
38
39impl AgentConfig {
40    /// Base serializer class which doesn't implement create/update methods
41    pub fn new(
42        device_id: String,
43        refresh_interval: i32,
44        authorization_flow: Option<String>,
45        jwks_auth: std::collections::HashMap<String, serde_json::Value>,
46        jwks_challenge: Option<std::collections::HashMap<String, serde_json::Value>>,
47        nss_uid_offset: i32,
48        nss_gid_offset: i32,
49        auth_terminate_session_on_expiry: bool,
50        system_config: models::Config,
51        license_status: Option<models::LicenseStatusEnum>,
52    ) -> AgentConfig {
53        AgentConfig {
54            device_id,
55            refresh_interval,
56            authorization_flow,
57            jwks_auth,
58            jwks_challenge,
59            nss_uid_offset,
60            nss_gid_offset,
61            auth_terminate_session_on_expiry,
62            system_config,
63            license_status,
64        }
65    }
66}