1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
*
* The version of the OpenAPI document: 1.0.4
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadWhatsAppTemplateStatusUpdatedTemplate {
/// Meta's `message_template_id`, returned as a string.
#[serde(rename = "templateId")]
pub template_id: String,
/// Meta's `message_template_name`.
#[serde(rename = "name")]
pub name: String,
/// Meta's `message_template_language` (e.g. `en_US`).
#[serde(rename = "language")]
pub language: String,
/// New status. Forwarded verbatim from Meta's `event` field. `PENDING_DELETION` is the 24h-grace state after a delete request before the template is actually removed.
#[serde(rename = "status")]
pub status: Status,
/// Meta's free-form reason for the transition. `\"NONE\"` on approval; an explanation string on rejection.
#[serde(rename = "reason")]
pub reason: String,
}
impl WebhookPayloadWhatsAppTemplateStatusUpdatedTemplate {
pub fn new(
template_id: String,
name: String,
language: String,
status: Status,
reason: String,
) -> WebhookPayloadWhatsAppTemplateStatusUpdatedTemplate {
WebhookPayloadWhatsAppTemplateStatusUpdatedTemplate {
template_id,
name,
language,
status,
reason,
}
}
}
/// New status. Forwarded verbatim from Meta's `event` field. `PENDING_DELETION` is the 24h-grace state after a delete request before the template is actually removed.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
#[serde(rename = "APPROVED")]
Approved,
#[serde(rename = "REJECTED")]
Rejected,
#[serde(rename = "PENDING")]
Pending,
#[serde(rename = "PAUSED")]
Paused,
#[serde(rename = "DISABLED")]
Disabled,
#[serde(rename = "IN_APPEAL")]
InAppeal,
#[serde(rename = "PENDING_DELETION")]
PendingDeletion,
}
impl Default for Status {
fn default() -> Status {
Self::Approved
}
}