Skip to main content

authentik_client/models/
duo_device.rs

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