onesignal-rust-api 5.4.0

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
Documentation
/*
 * OneSignal
 *
 * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
 *
 * The version of the OpenAPI document: 5.4.0
 * Contact: devrel@onesignal.com
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GetNotificationHistoryRequestBody {
    /// -> \"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.
    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
    pub events: Option<EventsType>,
    /// The email address you would like the report sent.
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    #[serde(rename = "app_id", skip_serializing_if = "Option::is_none")]
    pub app_id: Option<String>,
}

impl GetNotificationHistoryRequestBody {
    pub fn new() -> GetNotificationHistoryRequestBody {
        GetNotificationHistoryRequestBody {
            events: None,
            email: None,
            app_id: None,
        }
    }
}

/// -> \"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.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EventsType {
    #[serde(rename = "sent")]
    Sent,
    #[serde(rename = "clicked")]
    Clicked,
}

impl Default for EventsType {
    fn default() -> EventsType {
        Self::Sent
    }
}