bitwarden-api-api 3.0.0

Api bindings for the Bitwarden API.
Documentation
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RotateUserAccountKeysAndDataRequestModel {
    #[serde(
        rename = "oldMasterKeyAuthenticationHash",
        alias = "OldMasterKeyAuthenticationHash"
    )]
    pub old_master_key_authentication_hash: Option<String>,
    #[serde(rename = "accountUnlockData", alias = "AccountUnlockData")]
    pub account_unlock_data: Box<models::UnlockDataRequestModel>,
    #[serde(rename = "accountKeys", alias = "AccountKeys")]
    pub account_keys: Box<models::AccountKeysRequestModel>,
    #[serde(rename = "accountData", alias = "AccountData")]
    pub account_data: Box<models::AccountDataRequestModel>,
}

impl RotateUserAccountKeysAndDataRequestModel {
    pub fn new(
        old_master_key_authentication_hash: Option<String>,
        account_unlock_data: models::UnlockDataRequestModel,
        account_keys: models::AccountKeysRequestModel,
        account_data: models::AccountDataRequestModel,
    ) -> RotateUserAccountKeysAndDataRequestModel {
        RotateUserAccountKeysAndDataRequestModel {
            old_master_key_authentication_hash,
            account_unlock_data: Box::new(account_unlock_data),
            account_keys: Box::new(account_keys),
            account_data: Box::new(account_data),
        }
    }
}