bitwarden_api_api/models/
two_factor_web_authn_update_request_model.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TwoFactorWebAuthnUpdateRequestModel {
17 #[serde(rename = "id", alias = "Id")]
18 pub id: i32,
19 #[serde(rename = "userVerificationToken", alias = "UserVerificationToken")]
23 pub user_verification_token: String,
24 #[serde(rename = "deviceResponse", alias = "DeviceResponse")]
25 pub device_response: Box<models::AuthenticatorAttestationRawResponse>,
26 #[serde(
27 rename = "name",
28 alias = "Name",
29 skip_serializing_if = "Option::is_none"
30 )]
31 pub name: Option<String>,
32}
33
34impl TwoFactorWebAuthnUpdateRequestModel {
35 pub fn new(
36 id: i32,
37 user_verification_token: String,
38 device_response: models::AuthenticatorAttestationRawResponse,
39 ) -> TwoFactorWebAuthnUpdateRequestModel {
40 TwoFactorWebAuthnUpdateRequestModel {
41 id,
42 user_verification_token,
43 device_response: Box::new(device_response),
44 name: None,
45 }
46 }
47}