canton_api_client/models/signing_public_key.rs
1/*
2 * JSON Ledger API HTTP endpoints
3 *
4 * This specification version fixes the API inconsistencies where certain fields marked as required in the spec are in fact optional. If you use code generation tool based on this file, you might need to adjust the existing application code to handle those fields as optional. If you do not want to change your client code, continue using the OpenAPI specification for the latest Canton 3.4 patch release. MINIMUM_CANTON_VERSION=3.6.0
5 *
6 * The version of the OpenAPI document: 3.6.0-SNAPSHOT
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SigningPublicKey {
16 /// The serialization format of the public key Required
17 #[serde(rename = "format")]
18 pub format: String,
19 /// Serialized public key in the format specified above Required: must be non-empty
20 #[serde(rename = "keyData")]
21 pub key_data: String,
22 /// The key specification Required
23 #[serde(rename = "keySpec")]
24 pub key_spec: String,
25}
26
27impl SigningPublicKey {
28 pub fn new(format: String, key_data: String, key_spec: String) -> SigningPublicKey {
29 SigningPublicKey {
30 format,
31 key_data,
32 key_spec,
33 }
34 }
35}
36