late/models/
webhook_payload_call_failed.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct WebhookPayloadCallFailed {
17 #[serde(rename = "id")]
18 pub id: String,
19 #[serde(rename = "event")]
20 pub event: Event,
21 #[serde(rename = "call")]
22 pub call: Box<models::WebhookPayloadCallFailedCall>,
23 #[serde(rename = "account")]
24 pub account: Box<models::InboxWebhookAccount>,
25 #[serde(rename = "timestamp")]
26 pub timestamp: String,
27}
28
29impl WebhookPayloadCallFailed {
30 pub fn new(
32 id: String,
33 event: Event,
34 call: models::WebhookPayloadCallFailedCall,
35 account: models::InboxWebhookAccount,
36 timestamp: String,
37 ) -> WebhookPayloadCallFailed {
38 WebhookPayloadCallFailed {
39 id,
40 event,
41 call: Box::new(call),
42 account: Box::new(account),
43 timestamp,
44 }
45 }
46}
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
49pub enum Event {
50 #[serde(rename = "call.failed")]
51 CallFailed,
52}
53
54impl Default for Event {
55 fn default() -> Event {
56 Self::CallFailed
57 }
58}