Skip to main content

bitwarden_api_api/models/
two_factor_duo_update_request_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct TwoFactorDuoUpdateRequestModel {
17    #[serde(rename = "clientId", alias = "ClientId")]
18    pub client_id: String,
19    #[serde(rename = "clientSecret", alias = "ClientSecret")]
20    pub client_secret: String,
21    #[serde(rename = "host", alias = "Host")]
22    pub host: String,
23    /// User-verification token bound to `UserId + ProviderType`. Minted by the matching GET
24    /// endpoint and replayed on subsequent management calls so the user does not have to
25    /// re-verify.
26    #[serde(rename = "userVerificationToken", alias = "UserVerificationToken")]
27    pub user_verification_token: String,
28}
29
30impl TwoFactorDuoUpdateRequestModel {
31    pub fn new(
32        client_id: String,
33        client_secret: String,
34        host: String,
35        user_verification_token: String,
36    ) -> TwoFactorDuoUpdateRequestModel {
37        TwoFactorDuoUpdateRequestModel {
38            client_id,
39            client_secret,
40            host,
41            user_verification_token,
42        }
43    }
44}