/*
 * 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 GetAdTrackingTags200Response {
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<String>,
    #[serde(rename = "level", skip_serializing_if = "Option::is_none")]
    pub level: Option<Level>,
    /// Meta: &-joined click-URL params.
    #[serde(
        rename = "urlTags",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub url_tags: Option<Option<String>>,
    /// Meta: third-party click-tracking template (Dynamic Ads).
    #[serde(
        rename = "templateUrlSpec",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub template_url_spec: Option<Option<serde_json::Value>>,
    /// Google.
    #[serde(
        rename = "trackingUrlTemplate",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub tracking_url_template: Option<Option<String>>,
    /// Google.
    #[serde(
        rename = "finalUrlSuffix",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub final_url_suffix: Option<Option<String>>,
    /// LinkedIn.
    #[serde(
        rename = "dynamicValueParameters",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub dynamic_value_parameters: Option<Option<serde_json::Value>>,
    /// LinkedIn.
    #[serde(
        rename = "customValueParameters",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub custom_value_parameters: Option<Option<serde_json::Value>>,
}

impl GetAdTrackingTags200Response {
    pub fn new() -> GetAdTrackingTags200Response {
        GetAdTrackingTags200Response {
            platform: None,
            level: None,
            url_tags: None,
            template_url_spec: None,
            tracking_url_template: None,
            final_url_suffix: None,
            dynamic_value_parameters: None,
            custom_value_parameters: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Level {
    #[serde(rename = "creative")]
    Creative,
    #[serde(rename = "campaign")]
    Campaign,
}

impl Default for Level {
    fn default() -> Level {
        Self::Creative
    }
}
