/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateStandaloneAdRequestAttributionSpecInner {
    #[serde(rename = "eventType")]
    pub event_type: EventType,
    #[serde(rename = "windowDays")]
    pub window_days: WindowDays,
}

impl CreateStandaloneAdRequestAttributionSpecInner {
    pub fn new(
        event_type: EventType,
        window_days: WindowDays,
    ) -> CreateStandaloneAdRequestAttributionSpecInner {
        CreateStandaloneAdRequestAttributionSpecInner {
            event_type,
            window_days,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum EventType {
    #[serde(rename = "CLICK_THROUGH")]
    ClickThrough,
    #[serde(rename = "VIEW_THROUGH")]
    ViewThrough,
    #[serde(rename = "ENGAGED_VIDEO_VIEW")]
    EngagedVideoView,
}

impl Default for EventType {
    fn default() -> EventType {
        Self::ClickThrough
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum WindowDays {
    #[serde(rename = "1")]
    Variant1,
    #[serde(rename = "7")]
    Variant7,
    #[serde(rename = "28")]
    Variant28,
}

impl Default for WindowDays {
    fn default() -> WindowDays {
        Self::Variant1
    }
}
