authentik_rust/models/
authenticator_totp_challenge_response_request.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/// AuthenticatorTotpChallengeResponseRequest : TOTP Challenge response, device is set by get_response_instance
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AuthenticatorTotpChallengeResponseRequest {
16    #[serde(rename = "component", skip_serializing_if = "Option::is_none")]
17    pub component: Option<String>,
18    #[serde(rename = "code")]
19    pub code: i32,
20}
21
22impl AuthenticatorTotpChallengeResponseRequest {
23    /// TOTP Challenge response, device is set by get_response_instance
24    pub fn new(code: i32) -> AuthenticatorTotpChallengeResponseRequest {
25        AuthenticatorTotpChallengeResponseRequest {
26            component: None,
27            code,
28        }
29    }
30}
31