authentik_client/models/
static_device.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.12.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// StaticDevice : Serializer for static authenticator devices
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct StaticDevice {
17    /// The human-readable name of this device.
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "token_set")]
21    pub token_set: Vec<models::StaticDeviceToken>,
22    #[serde(rename = "pk")]
23    pub pk: i32,
24    #[serde(rename = "user")]
25    pub user: models::PartialUser,
26}
27
28impl StaticDevice {
29    /// Serializer for static authenticator devices
30    pub fn new(
31        name: String,
32        token_set: Vec<models::StaticDeviceToken>,
33        pk: i32,
34        user: models::PartialUser,
35    ) -> StaticDevice {
36        StaticDevice {
37            name,
38            token_set,
39            pk,
40            user,
41        }
42    }
43}