Skip to main content

bitwarden_api_api/models/
two_factor_email_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/// TwoFactorEmailResponseModel : Response model carrying Email 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 TwoFactorEmailResponseModel {
19    #[serde(
20        rename = "object",
21        alias = "Object",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub object: Option<String>,
25    #[serde(
26        rename = "email",
27        alias = "Email",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub email: Option<Box<models::TwoFactorEmailDetails>>,
31    /// User-verification token bound to `UserId + ProviderType`. Replayed on subsequent management
32    /// calls so the user does not have to re-verify.
33    #[serde(
34        rename = "userVerificationToken",
35        alias = "UserVerificationToken",
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub user_verification_token: Option<String>,
39}
40
41impl TwoFactorEmailResponseModel {
42    /// Response model carrying Email provider details and the user-verification token minted by the
43    /// read step of two-factor enrollment.
44    pub fn new() -> TwoFactorEmailResponseModel {
45        TwoFactorEmailResponseModel {
46            object: None,
47            email: None,
48            user_verification_token: None,
49        }
50    }
51}