blockfrost_openapi/models/
certificate_pending_message.rs1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
6pub struct CertificatePendingMessage {
7 #[serde(rename = "epoch")]
9 pub epoch: i64,
10 #[serde(rename = "beacon", skip_serializing_if = "Option::is_none")]
11 pub beacon: Option<models::CardanoDbBeacon>,
12 #[serde(rename = "entity_type")]
14 pub entity_type: std::collections::HashMap<String, serde_json::Value>,
15 #[serde(rename = "protocol")]
16 pub protocol: models::ProtocolParameters,
17 #[serde(rename = "next_protocol")]
18 pub next_protocol: models::ProtocolParameters,
19 #[serde(rename = "signers")]
20 pub signers: Vec<models::Signer>,
21 #[serde(rename = "next_signers")]
22 pub next_signers: Vec<models::Signer>,
23}
24
25impl CertificatePendingMessage {
26 pub fn new(epoch: i64, entity_type: std::collections::HashMap<String, serde_json::Value>, protocol: models::ProtocolParameters, next_protocol: models::ProtocolParameters, signers: Vec<models::Signer>, next_signers: Vec<models::Signer>) -> CertificatePendingMessage {
28 CertificatePendingMessage {
29 epoch,
30 beacon: None,
31 entity_type,
32 protocol,
33 next_protocol,
34 signers,
35 next_signers,
36 }
37 }
38}
39