Skip to main content

bitwarden_api_api/models/
unlock_method_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 UnlockMethodRequestModel {
17    #[serde(rename = "unlockMethod", alias = "UnlockMethod")]
18    pub unlock_method: models::UnlockMethod,
19    #[serde(
20        rename = "masterPasswordUnlockData",
21        alias = "MasterPasswordUnlockData",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub master_password_unlock_data: Option<Box<models::MasterPasswordUnlockDataRequestModel>>,
25    #[serde(
26        rename = "keyConnectorKeyWrappedUserKey",
27        alias = "KeyConnectorKeyWrappedUserKey",
28        skip_serializing_if = "Option::is_none"
29    )]
30    pub key_connector_key_wrapped_user_key: Option<String>,
31}
32
33impl UnlockMethodRequestModel {
34    pub fn new(unlock_method: models::UnlockMethod) -> UnlockMethodRequestModel {
35        UnlockMethodRequestModel {
36            unlock_method,
37            master_password_unlock_data: None,
38            key_connector_key_wrapped_user_key: None,
39        }
40    }
41}