fireblocks_sdk/models/
webhook.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 Webhook {
16    /// The id of the webhook
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<uuid::Uuid>,
19    /// The url of the webhook where notifications will be sent. Must be a valid
20    /// URL and https.
21    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
22    pub url: Option<String>,
23    /// description of the webhook of what it is used for
24    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
25    pub description: Option<String>,
26    /// The events that the webhook will be subscribed to
27    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
28    pub events: Option<Vec<models::WebhookEvent>>,
29    /// The status of the webhook
30    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
31    pub status: Option<Status>,
32    /// The date and time the webhook was created
33    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
34    pub created_at: Option<String>,
35    /// The date and time the webhook was last updated
36    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
37    pub updated_at: Option<String>,
38}
39
40impl Webhook {
41    pub fn new() -> Webhook {
42        Webhook {
43            id: None,
44            url: None,
45            description: None,
46            events: None,
47            status: None,
48            created_at: None,
49            updated_at: None,
50        }
51    }
52}
53/// The status of the webhook
54#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
55pub enum Status {
56    #[serde(rename = "DISABLED")]
57    Disabled,
58    #[serde(rename = "ENABLED")]
59    Enabled,
60}
61
62impl Default for Status {
63    fn default() -> Status {
64        Self::Disabled
65    }
66}