Skip to main content

onesignal_rust_api/models/
notification_slice.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 * Contact: devrel@onesignal.com
7 * Generated by: https://openapi-generator.tech
8 */
9
10
11
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct NotificationSlice {
15    #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")]
16    pub total_count: Option<i32>,
17    #[serde(rename = "offset", skip_serializing_if = "Option::is_none")]
18    pub offset: Option<i32>,
19    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
20    pub limit: Option<i32>,
21    /// The time_offset cursor specified in the request, if any.
22    #[serde(rename = "time_offset", skip_serializing_if = "Option::is_none")]
23    pub time_offset: Option<String>,
24    /// An opaque Base64 cursor token representing the next page of messages to fetch.  Present when time_offset was provided in the request.  Pass this value as time_offset on the next request to continue paginating.
25    #[serde(rename = "next_time_offset", skip_serializing_if = "Option::is_none")]
26    pub next_time_offset: Option<String>,
27    #[serde(rename = "notifications", skip_serializing_if = "Option::is_none")]
28    pub notifications: Option<Vec<crate::models::NotificationWithMeta>>,
29}
30
31impl NotificationSlice {
32    pub fn new() -> NotificationSlice {
33        NotificationSlice {
34            total_count: None,
35            offset: None,
36            limit: None,
37            time_offset: None,
38            next_time_offset: None,
39            notifications: None,
40        }
41    }
42}
43
44