onesignal_rust_api/models/segment_notification_target.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 SegmentNotificationTarget {
15 /// The segment names you want to target. Users in these segments will receive a notification. This targeting parameter is only compatible with excluded_segments. Example: [\"Active Users\", \"Inactive Users\"]
16 #[serde(rename = "included_segments", skip_serializing_if = "Option::is_none")]
17 pub included_segments: Option<Vec<String>>,
18 /// Segment that will be excluded when sending. Users in these segments will not receive a notification, even if they were included in included_segments. This targeting parameter is only compatible with included_segments. Example: [\"Active Users\", \"Inactive Users\"]
19 #[serde(rename = "excluded_segments", skip_serializing_if = "Option::is_none")]
20 pub excluded_segments: Option<Vec<String>>,
21}
22
23impl SegmentNotificationTarget {
24 pub fn new() -> SegmentNotificationTarget {
25 SegmentNotificationTarget {
26 included_segments: None,
27 excluded_segments: None,
28 }
29 }
30}
31
32