authentik_client/models/totp_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/// TotpDevice : Serializer for totp authenticator devices
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TotpDevice {
17 /// The human-readable name of this device.
18 #[serde(rename = "name")]
19 pub name: String,
20 #[serde(rename = "pk")]
21 pub pk: i32,
22 #[serde(rename = "user")]
23 pub user: models::PartialUser,
24}
25
26impl TotpDevice {
27 /// Serializer for totp authenticator devices
28 pub fn new(name: String, pk: i32, user: models::PartialUser) -> TotpDevice {
29 TotpDevice { name, pk, user }
30 }
31}