1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * 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
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct UpdateKeyRequestModel {
    #[serde(rename = "masterPasswordHash")]
    pub master_password_hash: String,
    #[serde(rename = "ciphers")]
    pub ciphers: Vec<crate::models::CipherWithIdRequestModel>,
    #[serde(rename = "folders")]
    pub folders: Vec<crate::models::FolderWithIdRequestModel>,
    #[serde(rename = "sends", skip_serializing_if = "Option::is_none")]
    pub sends: Option<Vec<crate::models::SendWithIdRequestModel>>,
    #[serde(rename = "privateKey")]
    pub private_key: String,
    #[serde(rename = "key")]
    pub key: String,
}

impl UpdateKeyRequestModel {
    pub fn new(
        master_password_hash: String,
        ciphers: Vec<crate::models::CipherWithIdRequestModel>,
        folders: Vec<crate::models::FolderWithIdRequestModel>,
        private_key: String,
        key: String,
    ) -> UpdateKeyRequestModel {
        UpdateKeyRequestModel {
            master_password_hash,
            ciphers,
            folders,
            sends: None,
            private_key,
            key,
        }
    }
}