Skip to main content

bitwarden_api_api/models/
two_factor_web_authn_details.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/// TwoFactorWebAuthnDetails : WebAuthn provider details. Hydrated from Bit.Core.Entities.User;
16/// embedded by the per-action `TwoFactorWebAuthn*ResponseModel` wrappers.
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct TwoFactorWebAuthnDetails {
19    #[serde(
20        rename = "enabled",
21        alias = "Enabled",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub enabled: Option<bool>,
25    #[serde(
26        rename = "keys",
27        alias = "Keys",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub keys: Option<Vec<models::KeyModel>>,
31}
32
33impl TwoFactorWebAuthnDetails {
34    /// WebAuthn provider details. Hydrated from Bit.Core.Entities.User; embedded by the per-action
35    /// `TwoFactorWebAuthn*ResponseModel` wrappers.
36    pub fn new() -> TwoFactorWebAuthnDetails {
37        TwoFactorWebAuthnDetails {
38            enabled: None,
39            keys: None,
40        }
41    }
42}