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 * 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 SegmentNotificationTarget {
16    /// 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\"] 
17    #[serde(rename = "included_segments", skip_serializing_if = "Option::is_none")]
18    pub included_segments: Option<Vec<String>>,
19    /// 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\"] 
20    #[serde(rename = "excluded_segments", skip_serializing_if = "Option::is_none")]
21    pub excluded_segments: Option<Vec<String>>,
22}
23
24impl SegmentNotificationTarget {
25    pub fn new() -> SegmentNotificationTarget {
26        SegmentNotificationTarget {
27            included_segments: None,
28            excluded_segments: None,
29        }
30    }
31}
32
33