Skip to main content

bitwarden_api_api/models/
wrapped_account_cryptographic_state_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 WrappedAccountCryptographicStateRequestModel {
17    #[serde(
18        rename = "publicKeyEncryptionKeyPair",
19        alias = "PublicKeyEncryptionKeyPair"
20    )]
21    pub public_key_encryption_key_pair: Box<models::PublicKeyEncryptionKeyPairRequestModel>,
22    #[serde(rename = "signatureKeyPair", alias = "SignatureKeyPair")]
23    pub signature_key_pair: Box<models::SignatureKeyPairRequestModel>,
24    #[serde(rename = "securityState", alias = "SecurityState")]
25    pub security_state: Box<models::SecurityStateModel>,
26}
27
28impl WrappedAccountCryptographicStateRequestModel {
29    pub fn new(
30        public_key_encryption_key_pair: models::PublicKeyEncryptionKeyPairRequestModel,
31        signature_key_pair: models::SignatureKeyPairRequestModel,
32        security_state: models::SecurityStateModel,
33    ) -> WrappedAccountCryptographicStateRequestModel {
34        WrappedAccountCryptographicStateRequestModel {
35            public_key_encryption_key_pair: Box::new(public_key_encryption_key_pair),
36            signature_key_pair: Box::new(signature_key_pair),
37            security_state: Box::new(security_state),
38        }
39    }
40}