bitwarden_api_api/models/
rotate_user_account_keys_and_data_request_model.rs1use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RotateUserAccountKeysAndDataRequestModel {
17 #[serde(
18 rename = "oldMasterKeyAuthenticationHash",
19 alias = "OldMasterKeyAuthenticationHash"
20 )]
21 pub old_master_key_authentication_hash: Option<String>,
22 #[serde(rename = "accountUnlockData", alias = "AccountUnlockData")]
23 pub account_unlock_data: Box<models::UnlockDataRequestModel>,
24 #[serde(rename = "accountKeys", alias = "AccountKeys")]
25 pub account_keys: Box<models::AccountKeysRequestModel>,
26 #[serde(rename = "accountData", alias = "AccountData")]
27 pub account_data: Box<models::AccountDataRequestModel>,
28}
29
30impl RotateUserAccountKeysAndDataRequestModel {
31 pub fn new(
32 old_master_key_authentication_hash: Option<String>,
33 account_unlock_data: models::UnlockDataRequestModel,
34 account_keys: models::AccountKeysRequestModel,
35 account_data: models::AccountDataRequestModel,
36 ) -> RotateUserAccountKeysAndDataRequestModel {
37 RotateUserAccountKeysAndDataRequestModel {
38 old_master_key_authentication_hash,
39 account_unlock_data: Box::new(account_unlock_data),
40 account_keys: Box::new(account_keys),
41 account_data: Box::new(account_data),
42 }
43 }
44}