/*
 * 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 SubscriptionObject {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub _type: Option<TypeType>,
    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
    pub token: Option<String>,
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "notification_types", skip_serializing_if = "Option::is_none")]
    pub notification_types: Option<f32>,
    #[serde(rename = "session_time", skip_serializing_if = "Option::is_none")]
    pub session_time: Option<f32>,
    #[serde(rename = "session_count", skip_serializing_if = "Option::is_none")]
    pub session_count: Option<f32>,
    #[serde(rename = "sdk", skip_serializing_if = "Option::is_none")]
    pub sdk: Option<String>,
    #[serde(rename = "device_model", skip_serializing_if = "Option::is_none")]
    pub device_model: Option<String>,
    #[serde(rename = "device_os", skip_serializing_if = "Option::is_none")]
    pub device_os: Option<String>,
    #[serde(rename = "rooted", skip_serializing_if = "Option::is_none")]
    pub rooted: Option<bool>,
    #[serde(rename = "test_type", skip_serializing_if = "Option::is_none")]
    pub test_type: Option<f32>,
    #[serde(rename = "app_version", skip_serializing_if = "Option::is_none")]
    pub app_version: Option<String>,
    #[serde(rename = "net_type", skip_serializing_if = "Option::is_none")]
    pub net_type: Option<f32>,
    #[serde(rename = "carrier", skip_serializing_if = "Option::is_none")]
    pub carrier: Option<String>,
    #[serde(rename = "web_auth", skip_serializing_if = "Option::is_none")]
    pub web_auth: Option<String>,
    #[serde(rename = "web_p256", skip_serializing_if = "Option::is_none")]
    pub web_p256: Option<String>,
}

impl SubscriptionObject {
    pub fn new() -> SubscriptionObject {
        SubscriptionObject {
            id: None,
            _type: None,
            token: None,
            enabled: None,
            notification_types: None,
            session_time: None,
            session_count: None,
            sdk: None,
            device_model: None,
            device_os: None,
            rooted: None,
            test_type: None,
            app_version: None,
            net_type: None,
            carrier: None,
            web_auth: None,
            web_p256: None,
        }
    }
}

/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum TypeType {
    #[serde(rename = "iOSPush")]
    IOSPush,
    #[serde(rename = "AndroidPush")]
    AndroidPush,
    #[serde(rename = "FireOSPush")]
    FireOSPush,
    #[serde(rename = "ChromeExtensionPush")]
    ChromeExtensionPush,
    #[serde(rename = "ChromePush")]
    ChromePush,
    #[serde(rename = "WindowsPush")]
    WindowsPush,
    #[serde(rename = "SafariLegacyPush")]
    SafariLegacyPush,
    #[serde(rename = "FirefoxPush")]
    FirefoxPush,
    #[serde(rename = "macOSPush")]
    MacOSPush,
    #[serde(rename = "HuaweiPush")]
    HuaweiPush,
    #[serde(rename = "SafariPush")]
    SafariPush,
    #[serde(rename = "Email")]
    Email,
    #[serde(rename = "SMS")]
    SMS,
}

impl Default for TypeType {
    fn default() -> TypeType {
        Self::IOSPush
    }
}

