bitwarden_api_api/models/public_keys_response_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/// PublicKeysResponseModel : This response model is used to return the public keys of a user, to
16/// any other registered user or entity on the server. It can contain public keys
17/// (signature/encryption), and proofs between the two. It does not contain (encrypted) private
18/// keys.
19#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
20pub struct PublicKeysResponseModel {
21 #[serde(
22 rename = "object",
23 alias = "Object",
24 skip_serializing_if = "Option::is_none"
25 )]
26 pub object: Option<String>,
27 #[serde(
28 rename = "verifyingKey",
29 alias = "VerifyingKey",
30 skip_serializing_if = "Option::is_none"
31 )]
32 pub verifying_key: Option<String>,
33 #[serde(
34 rename = "signedPublicKey",
35 alias = "SignedPublicKey",
36 skip_serializing_if = "Option::is_none"
37 )]
38 pub signed_public_key: Option<String>,
39 #[serde(rename = "publicKey", alias = "PublicKey")]
40 pub public_key: Option<String>,
41}
42
43impl PublicKeysResponseModel {
44 /// This response model is used to return the public keys of a user, to any other registered
45 /// user or entity on the server. It can contain public keys (signature/encryption), and proofs
46 /// between the two. It does not contain (encrypted) private keys.
47 pub fn new(public_key: Option<String>) -> PublicKeysResponseModel {
48 PublicKeysResponseModel {
49 object: None,
50 verifying_key: None,
51 signed_public_key: None,
52 public_key,
53 }
54 }
55}