blockfrost_openapi/models/
pool_updates_inner.rs1use crate::models;
2use serde::{Deserialize, Serialize};
3
4#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
5pub struct PoolUpdatesInner {
6 #[serde(rename = "tx_hash")]
8 pub tx_hash: String,
9 #[serde(rename = "cert_index")]
11 pub cert_index: i32,
12 #[serde(rename = "action")]
14 pub action: Action,
15}
16
17impl PoolUpdatesInner {
18 pub fn new(tx_hash: String, cert_index: i32, action: Action) -> PoolUpdatesInner {
19 PoolUpdatesInner {
20 tx_hash,
21 cert_index,
22 action,
23 }
24 }
25}
26#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
28pub enum Action {
29 #[serde(rename = "registered")]
30 Registered,
31 #[serde(rename = "deregistered")]
32 Deregistered,
33}
34
35impl Default for Action {
36 fn default() -> Action {
37 Self::Registered
38 }
39}
40