bitwarden_api_api/models/two_factor_duo_response_model.rs
1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15/// TwoFactorDuoResponseModel : Response model carrying user-scoped Duo provider details and the
16/// user-verification token minted by the read step of two-factor enrollment.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct TwoFactorDuoResponseModel {
19 #[serde(
20 rename = "object",
21 alias = "Object",
22 skip_serializing_if = "Option::is_none"
23 )]
24 pub object: Option<String>,
25 #[serde(rename = "duo", alias = "Duo", skip_serializing_if = "Option::is_none")]
26 pub duo: Option<Box<models::TwoFactorDuoDetails>>,
27 /// User-verification token bound to `UserId + ProviderType`. Replayed on subsequent management
28 /// calls so the user does not have to re-verify.
29 #[serde(
30 rename = "userVerificationToken",
31 alias = "UserVerificationToken",
32 skip_serializing_if = "Option::is_none"
33 )]
34 pub user_verification_token: Option<String>,
35}
36
37impl TwoFactorDuoResponseModel {
38 /// Response model carrying user-scoped Duo provider details and the user-verification token
39 /// minted by the read step of two-factor enrollment.
40 pub fn new() -> TwoFactorDuoResponseModel {
41 TwoFactorDuoResponseModel {
42 object: None,
43 duo: None,
44 user_verification_token: None,
45 }
46 }
47}