/*
 * OneSignal
 *
 * A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
 *
 * The version of the OpenAPI document: 1.2.1
 * Contact: devrel@onesignal.com
 * Generated by: https://openapi-generator.tech
 */




#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct OutcomeData {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "value")]
    pub value: i32,
    #[serde(rename = "aggregation")]
    pub aggregation: AggregationType,
}

impl OutcomeData {
    pub fn new(id: String, value: i32, aggregation: AggregationType) -> OutcomeData {
        OutcomeData {
            id,
            value,
            aggregation,
        }
    }
}

/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AggregationType {
    #[serde(rename = "sum")]
    Sum,
    #[serde(rename = "count")]
    Count,
}

impl Default for AggregationType {
    fn default() -> AggregationType {
        Self::Sum
    }
}

