authentik_client/models/
authenticator_totp_challenge_response_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.8.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AuthenticatorTotpChallengeResponseRequest : TOTP Challenge response, device is set by get_response_instance
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AuthenticatorTotpChallengeResponseRequest {
17    #[serde(rename = "component", skip_serializing_if = "Option::is_none")]
18    pub component: Option<String>,
19    #[serde(rename = "code")]
20    pub code: i32,
21}
22
23impl AuthenticatorTotpChallengeResponseRequest {
24    /// TOTP Challenge response, device is set by get_response_instance
25    pub fn new(code: i32) -> AuthenticatorTotpChallengeResponseRequest {
26        AuthenticatorTotpChallengeResponseRequest { component: None, code }
27    }
28}