onesignal-rust-api 5.12.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
 */

/// JourneyStats : Journey-level counts plus flat, id-keyed maps of node and branch stats. Contains no definition detail; join it by id against the journey from View journey.



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct JourneyStats {
    /// UUID of the journey these stats belong to.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Users who entered the journey.
    #[serde(rename = "started", skip_serializing_if = "Option::is_none")]
    pub started: Option<i32>,
    /// Users who reached the end of the journey normally.
    #[serde(rename = "completed", skip_serializing_if = "Option::is_none")]
    pub completed: Option<i32>,
    /// Users who left the journey through an early exit rule.
    #[serde(rename = "exited_early", skip_serializing_if = "Option::is_none")]
    pub exited_early: Option<i32>,
    /// Node stats keyed by node id. Includes every node in the graph, at any nesting depth.
    #[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
    pub nodes: Option<::std::collections::HashMap<String, crate::models::JourneyNodeStats>>,
    /// Branch stats keyed by branch id. Empty for a journey with no branching nodes.
    #[serde(rename = "branches", skip_serializing_if = "Option::is_none")]
    pub branches: Option<::std::collections::HashMap<String, crate::models::JourneyBranchStats>>,
}

impl JourneyStats {
    /// Journey-level counts plus flat, id-keyed maps of node and branch stats. Contains no definition detail; join it by id against the journey from View journey.
    pub fn new() -> JourneyStats {
        JourneyStats {
            id: None,
            started: None,
            completed: None,
            exited_early: None,
            nodes: None,
            branches: None,
        }
    }
}