authentik-client 2026.2.2-rc1

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

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

/// AgentTokenResponse : Base serializer class which doesn't implement create/update methods
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AgentTokenResponse {
    #[serde(rename = "token")]
    pub token: String,
    #[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
    pub expires_in: Option<i32>,
}

impl AgentTokenResponse {
    /// Base serializer class which doesn't implement create/update methods
    pub fn new(token: String) -> AgentTokenResponse {
        AgentTokenResponse {
            token,
            expires_in: None,
        }
    }
}