bitwarden_api_api/models/
master_password_authentication_data_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/// MasterPasswordAuthenticationDataRequestModel : Use this datatype when interfacing with requests
16/// to create a separation of concern. See
17/// Bit.Core.KeyManagement.Models.Data.MasterPasswordAuthenticationData to use for commands,
18/// queries, services.
19#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
20pub struct MasterPasswordAuthenticationDataRequestModel {
21    #[serde(rename = "kdf", alias = "Kdf")]
22    pub kdf: Box<models::KdfRequestModel>,
23    #[serde(
24        rename = "masterPasswordAuthenticationHash",
25        alias = "MasterPasswordAuthenticationHash"
26    )]
27    pub master_password_authentication_hash: String,
28    #[serde(rename = "salt", alias = "Salt")]
29    pub salt: String,
30}
31
32impl MasterPasswordAuthenticationDataRequestModel {
33    /// Use this datatype when interfacing with requests to create a separation of concern. See
34    /// Bit.Core.KeyManagement.Models.Data.MasterPasswordAuthenticationData to use for commands,
35    /// queries, services.
36    pub fn new(
37        kdf: models::KdfRequestModel,
38        master_password_authentication_hash: String,
39        salt: String,
40    ) -> MasterPasswordAuthenticationDataRequestModel {
41        MasterPasswordAuthenticationDataRequestModel {
42            kdf: Box::new(kdf),
43            master_password_authentication_hash,
44            salt,
45        }
46    }
47}