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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* 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;
/// PrivateKeysResponseModel : This response model is used to return the asymmetric encryption keys,
/// and signature keys of an entity. This includes the private keys of the key pairs, (private key,
/// signing key), and the public keys of the key pairs (unsigned public key, signed public key,
/// verification key).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PrivateKeysResponseModel {
#[serde(
rename = "object",
alias = "Object",
skip_serializing_if = "Option::is_none"
)]
pub object: Option<String>,
#[serde(
rename = "signatureKeyPair",
alias = "SignatureKeyPair",
skip_serializing_if = "Option::is_none"
)]
pub signature_key_pair: Option<Box<models::SignatureKeyPairResponseModel>>,
#[serde(
rename = "publicKeyEncryptionKeyPair",
alias = "PublicKeyEncryptionKeyPair"
)]
pub public_key_encryption_key_pair: Box<models::PublicKeyEncryptionKeyPairResponseModel>,
#[serde(
rename = "securityState",
alias = "SecurityState",
skip_serializing_if = "Option::is_none"
)]
pub security_state: Option<Box<models::SecurityStateModel>>,
}
impl PrivateKeysResponseModel {
/// This response model is used to return the asymmetric encryption keys, and signature keys of
/// an entity. This includes the private keys of the key pairs, (private key, signing key), and
/// the public keys of the key pairs (unsigned public key, signed public key, verification key).
pub fn new(
public_key_encryption_key_pair: models::PublicKeyEncryptionKeyPairResponseModel,
) -> PrivateKeysResponseModel {
PrivateKeysResponseModel {
object: None,
signature_key_pair: None,
public_key_encryption_key_pair: Box::new(public_key_encryption_key_pair),
security_state: None,
}
}
}