bitwarden_api_api/models/
rotate_user_account_keys_and_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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RotateUserAccountKeysAndDataRequestModel {
17    #[serde(rename = "oldMasterKeyAuthenticationHash")]
18    pub old_master_key_authentication_hash: Option<String>,
19    #[serde(rename = "accountUnlockData")]
20    pub account_unlock_data: Box<models::UnlockDataRequestModel>,
21    #[serde(rename = "accountKeys")]
22    pub account_keys: Box<models::AccountKeysRequestModel>,
23    #[serde(rename = "accountData")]
24    pub account_data: Box<models::AccountDataRequestModel>,
25}
26
27impl RotateUserAccountKeysAndDataRequestModel {
28    pub fn new(
29        old_master_key_authentication_hash: Option<String>,
30        account_unlock_data: models::UnlockDataRequestModel,
31        account_keys: models::AccountKeysRequestModel,
32        account_data: models::AccountDataRequestModel,
33    ) -> RotateUserAccountKeysAndDataRequestModel {
34        RotateUserAccountKeysAndDataRequestModel {
35            old_master_key_authentication_hash,
36            account_unlock_data: Box::new(account_unlock_data),
37            account_keys: Box::new(account_keys),
38            account_data: Box::new(account_data),
39        }
40    }
41}