Skip to main content

bitwarden_api_api/models/
change_kdf_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/// ChangeKdfRequestModel : Request model for changing the KDF settings for a user's account.
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct ChangeKdfRequestModel {
18    #[serde(rename = "masterPasswordHash", alias = "MasterPasswordHash")]
19    pub master_password_hash: String,
20    #[serde(rename = "authenticationData", alias = "AuthenticationData")]
21    pub authentication_data: Box<models::MasterPasswordAuthenticationDataRequestModel>,
22    #[serde(rename = "unlockData", alias = "UnlockData")]
23    pub unlock_data: Box<models::MasterPasswordUnlockDataRequestModel>,
24}
25
26impl ChangeKdfRequestModel {
27    /// Request model for changing the KDF settings for a user's account.
28    pub fn new(
29        master_password_hash: String,
30        authentication_data: models::MasterPasswordAuthenticationDataRequestModel,
31        unlock_data: models::MasterPasswordUnlockDataRequestModel,
32    ) -> ChangeKdfRequestModel {
33        ChangeKdfRequestModel {
34            master_password_hash,
35            authentication_data: Box::new(authentication_data),
36            unlock_data: Box::new(unlock_data),
37        }
38    }
39}