onesignal_rust_api/models/get_notification_request_body.rs
1/*
2 * OneSignal
3 *
4 * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
5 *
6 * The version of the OpenAPI document: 1.4.1
7 * Contact: devrel@onesignal.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11
12
13
14#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
15pub struct GetNotificationRequestBody {
16 /// -> \"sent\" - All the devices by player_id that were sent the specified notification_id. Notifications targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. \"clicked\" - All the devices by `player_id` that clicked the specified notification_id.
17 #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
18 pub events: Option<EventsType>,
19 /// The email address you would like the report sent.
20 #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
21 pub email: Option<String>,
22 #[serde(rename = "app_id", skip_serializing_if = "Option::is_none")]
23 pub app_id: Option<String>,
24}
25
26impl GetNotificationRequestBody {
27 pub fn new() -> GetNotificationRequestBody {
28 GetNotificationRequestBody {
29 events: None,
30 email: None,
31 app_id: None,
32 }
33 }
34}
35
36/// -> \"sent\" - All the devices by player_id that were sent the specified notification_id. Notifications targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. \"clicked\" - All the devices by `player_id` that clicked the specified notification_id.
37#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
38pub enum EventsType {
39 #[serde(rename = "sent")]
40 Sent,
41 #[serde(rename = "clicked")]
42 Clicked,
43}
44
45impl Default for EventsType {
46 fn default() -> EventsType {
47 Self::Sent
48 }
49}
50