authentik_rust/models/
static_device.rs

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