/*
 * 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.1
 * 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 BoostPostRequestTargeting {
    #[serde(rename = "ageMin", skip_serializing_if = "Option::is_none")]
    pub age_min: Option<i32>,
    #[serde(rename = "ageMax", skip_serializing_if = "Option::is_none")]
    pub age_max: Option<i32>,
    /// ISO country codes. Required for TikTok boosts (TikTok's ad group requires location_ids); optional on other platforms.
    #[serde(rename = "countries", skip_serializing_if = "Option::is_none")]
    pub countries: Option<Vec<String>>,
    /// Interest objects from /v1/ads/interests. Each must include id and name.
    #[serde(rename = "interests", skip_serializing_if = "Option::is_none")]
    pub interests: Option<Vec<models::UpdateAdRequestTargetingInterestsInner>>,
    /// Meta only. 0 = disabled (default), 1 = enabled.
    #[serde(rename = "advantage_audience", skip_serializing_if = "Option::is_none")]
    pub advantage_audience: Option<AdvantageAudience>,
}

impl BoostPostRequestTargeting {
    pub fn new() -> BoostPostRequestTargeting {
        BoostPostRequestTargeting {
            age_min: None,
            age_max: None,
            countries: None,
            interests: None,
            advantage_audience: None,
        }
    }
}
/// Meta only. 0 = disabled (default), 1 = enabled.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AdvantageAudience {
    #[serde(rename = "0")]
    Variant0,
    #[serde(rename = "1")]
    Variant1,
}

impl Default for AdvantageAudience {
    fn default() -> AdvantageAudience {
        Self::Variant0
    }
}
