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 PublicKeyEncryptionKeyPairResponseModel {
    #[serde(
        rename = "object",
        alias = "Object",
        skip_serializing_if = "Option::is_none"
    )]
    pub object: Option<String>,
    #[serde(rename = "wrappedPrivateKey", alias = "WrappedPrivateKey")]
    pub wrapped_private_key: Option<String>,
    #[serde(rename = "publicKey", alias = "PublicKey")]
    pub public_key: Option<String>,
    #[serde(
        rename = "signedPublicKey",
        alias = "SignedPublicKey",
        skip_serializing_if = "Option::is_none"
    )]
    pub signed_public_key: Option<String>,
}

impl PublicKeyEncryptionKeyPairResponseModel {
    pub fn new(
        wrapped_private_key: Option<String>,
        public_key: Option<String>,
    ) -> PublicKeyEncryptionKeyPairResponseModel {
        PublicKeyEncryptionKeyPairResponseModel {
            object: None,
            wrapped_private_key,
            public_key,
            signed_public_key: None,
        }
    }
}