Skip to main content

blockfrost_openapi/models/
committee.rs

1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5pub struct Committee {
6    /// CIP-129 Governance Action Identifier of the `NewCommittee` action that seated this committee. `null` for the Conway-genesis committee.
7    #[serde(rename = "gov_action_id", deserialize_with = "Option::deserialize")]
8    pub gov_action_id: Option<String>,
9    /// Hash of the transaction containing the `NewCommittee` action that seated this committee. `null` for the Conway-genesis committee.
10    #[serde(rename = "proposal_tx_hash", deserialize_with = "Option::deserialize")]
11    pub proposal_tx_hash: Option<String>,
12    /// Index of the proposal within its transaction. `null` for the Conway-genesis committee.
13    #[serde(rename = "proposal_index", deserialize_with = "Option::deserialize")]
14    pub proposal_index: Option<i32>,
15    /// True iff an enacted `NoConfidence` governance action has dissolved this committee.
16    #[serde(rename = "is_dissolved")]
17    pub is_dissolved: bool,
18    #[serde(rename = "quorum")]
19    pub quorum: Box<models::CommitteeQuorum>,
20    /// Members of the committee.
21    #[serde(rename = "members")]
22    pub members: Vec<models::CommitteeMembersInner>,
23}
24
25impl Committee {
26    pub fn new(gov_action_id: Option<String>, proposal_tx_hash: Option<String>, proposal_index: Option<i32>, is_dissolved: bool, quorum: models::CommitteeQuorum, members: Vec<models::CommitteeMembersInner>) -> Committee {
27        Committee {
28            gov_action_id,
29            proposal_tx_hash,
30            proposal_index,
31            is_dissolved,
32            quorum: Box::new(quorum),
33            members,
34        }
35    }
36}
37