onesignal-rust-api 5.14.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
 *
 * Contact: devrel@onesignal.com
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct JourneyEarlyExitRules {
    #[serde(rename = "on_segment", skip_serializing_if = "Option::is_none")]
    pub on_segment: Option<Box<crate::models::JourneyEarlyExitRulesOnSegment>>,
    /// Exit when the user no longer matches the journey audience. Defaults to false.
    #[serde(rename = "when_not_in_audience", skip_serializing_if = "Option::is_none")]
    pub when_not_in_audience: Option<bool>,
    /// Exit on a new session start. Defaults to false.
    #[serde(rename = "on_session", skip_serializing_if = "Option::is_none")]
    pub on_session: Option<bool>,
    #[serde(rename = "on_event", skip_serializing_if = "Option::is_none")]
    pub on_event: Option<Box<crate::models::JourneyEarlyExitRulesOnEvent>>,
}

impl JourneyEarlyExitRules {
    pub fn new() -> JourneyEarlyExitRules {
        JourneyEarlyExitRules {
            on_segment: None,
            when_not_in_audience: None,
            on_session: None,
            on_event: None,
        }
    }
}