Skip to main content

authentik_client/models/
agent_token_response.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/// AgentTokenResponse : Base serializer class which doesn't implement create/update methods
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AgentTokenResponse {
17    #[serde(rename = "token")]
18    pub token: String,
19    #[serde(rename = "expires_in", skip_serializing_if = "Option::is_none")]
20    pub expires_in: Option<i32>,
21}
22
23impl AgentTokenResponse {
24    /// Base serializer class which doesn't implement create/update methods
25    pub fn new(token: String) -> AgentTokenResponse {
26        AgentTokenResponse {
27            token,
28            expires_in: None,
29        }
30    }
31}