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 JourneyBranch {
    /// Server-assigned branch identifier. Read-only on create; echo it on update to keep the branch.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "condition", skip_serializing_if = "Option::is_none")]
    pub condition: Option<Box<crate::models::JourneyCondition>>,
    /// Branch weight for split_range nodes. Weights across a node's branches must sum to 100.
    #[serde(rename = "weight", skip_serializing_if = "Option::is_none")]
    pub weight: Option<f32>,
    /// Nodes run when this branch is taken, before flow converges to the next sibling node.
    #[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
    pub nodes: Option<Vec<crate::models::JourneyNode>>,
}

impl JourneyBranch {
    pub fn new() -> JourneyBranch {
        JourneyBranch {
            id: None,
            condition: None,
            weight: None,
            nodes: None,
        }
    }
}