fireblocks_sdk/models/
notification.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct Notification {
16    /// The id of the Notification
17    #[serde(rename = "id")]
18    pub id: uuid::Uuid,
19    /// The creation date of the notification
20    #[serde(rename = "createdAt")]
21    pub created_at: String,
22    /// The date when the notification was updated
23    #[serde(rename = "updatedAt")]
24    pub updated_at: String,
25    #[serde(rename = "status")]
26    pub status: models::NotificationStatus,
27    #[serde(rename = "eventType")]
28    pub event_type: models::WebhookEvent,
29    /// The event version of the Notification
30    #[serde(rename = "eventVersion")]
31    pub event_version: f64,
32    /// The resource id of the event which the Notification is listen to
33    #[serde(
34        rename = "resourceId",
35        default,
36        with = "::serde_with::rust::double_option",
37        skip_serializing_if = "Option::is_none"
38    )]
39    pub resource_id: Option<Option<uuid::Uuid>>,
40    /// The attempts related to Notification
41    #[serde(rename = "attempts", skip_serializing_if = "Option::is_none")]
42    pub attempts: Option<Vec<String>>,
43}
44
45impl Notification {
46    pub fn new(
47        id: uuid::Uuid,
48        created_at: String,
49        updated_at: String,
50        status: models::NotificationStatus,
51        event_type: models::WebhookEvent,
52        event_version: f64,
53    ) -> Notification {
54        Notification {
55            id,
56            created_at,
57            updated_at,
58            status,
59            event_type,
60            event_version,
61            resource_id: None,
62            attempts: None,
63        }
64    }
65}