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 AccountKeysRequestModel {
    #[serde(
        rename = "userKeyEncryptedAccountPrivateKey",
        alias = "UserKeyEncryptedAccountPrivateKey"
    )]
    pub user_key_encrypted_account_private_key: Option<String>,
    #[serde(rename = "accountPublicKey", alias = "AccountPublicKey")]
    pub account_public_key: Option<String>,
    #[serde(
        rename = "publicKeyEncryptionKeyPair",
        alias = "PublicKeyEncryptionKeyPair",
        skip_serializing_if = "Option::is_none"
    )]
    pub public_key_encryption_key_pair: Option<Box<models::PublicKeyEncryptionKeyPairRequestModel>>,
    #[serde(
        rename = "signatureKeyPair",
        alias = "SignatureKeyPair",
        skip_serializing_if = "Option::is_none"
    )]
    pub signature_key_pair: Option<Box<models::SignatureKeyPairRequestModel>>,
    #[serde(
        rename = "securityState",
        alias = "SecurityState",
        skip_serializing_if = "Option::is_none"
    )]
    pub security_state: Option<Box<models::SecurityStateModel>>,
}

impl AccountKeysRequestModel {
    pub fn new(
        user_key_encrypted_account_private_key: Option<String>,
        account_public_key: Option<String>,
    ) -> AccountKeysRequestModel {
        AccountKeysRequestModel {
            user_key_encrypted_account_private_key,
            account_public_key,
            public_key_encryption_key_pair: None,
            signature_key_pair: None,
            security_state: None,
        }
    }
}