Skip to main content

bitwarden_api_api/models/
two_factor_organization_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/// TwoFactorOrganizationDuoResponseModel : Response model carrying organization-scoped Duo provider
16/// details and the user-verification token minted by the read step of two-factor enrollment.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct TwoFactorOrganizationDuoResponseModel {
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 TwoFactorOrganizationDuoResponseModel {
38    /// Response model carrying organization-scoped Duo provider details and the user-verification
39    /// token minted by the read step of two-factor enrollment.
40    pub fn new() -> TwoFactorOrganizationDuoResponseModel {
41        TwoFactorOrganizationDuoResponseModel {
42            object: None,
43            duo: None,
44            user_verification_token: None,
45        }
46    }
47}