/*
 * 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 DuplicateAdCampaignRequest {
    #[serde(rename = "platform")]
    pub platform: Platform,
    /// Copy child ad sets + ads + creatives + targeting
    #[serde(rename = "deepCopy", skip_serializing_if = "Option::is_none")]
    pub deep_copy: Option<bool>,
    #[serde(rename = "statusOption", skip_serializing_if = "Option::is_none")]
    pub status_option: Option<StatusOption>,
    /// Reschedule the copied hierarchy's start time
    #[serde(rename = "startTime", skip_serializing_if = "Option::is_none")]
    pub start_time: Option<String>,
    #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")]
    pub end_time: Option<String>,
    #[serde(rename = "renameStrategy", skip_serializing_if = "Option::is_none")]
    pub rename_strategy: Option<RenameStrategy>,
    #[serde(rename = "renamePrefix", skip_serializing_if = "Option::is_none")]
    pub rename_prefix: Option<String>,
    #[serde(rename = "renameSuffix", skip_serializing_if = "Option::is_none")]
    pub rename_suffix: Option<String>,
    /// Trigger ads discovery on the owning account after the copy succeeds
    #[serde(rename = "syncAfter", skip_serializing_if = "Option::is_none")]
    pub sync_after: Option<bool>,
}

impl DuplicateAdCampaignRequest {
    pub fn new(platform: Platform) -> DuplicateAdCampaignRequest {
        DuplicateAdCampaignRequest {
            platform,
            deep_copy: None,
            status_option: None,
            start_time: None,
            end_time: None,
            rename_strategy: None,
            rename_prefix: None,
            rename_suffix: None,
            sync_after: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
    #[serde(rename = "facebook")]
    Facebook,
    #[serde(rename = "instagram")]
    Instagram,
    #[serde(rename = "tiktok")]
    Tiktok,
}

impl Default for Platform {
    fn default() -> Platform {
        Self::Facebook
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StatusOption {
    #[serde(rename = "ACTIVE")]
    Active,
    #[serde(rename = "PAUSED")]
    Paused,
    #[serde(rename = "INHERITED_FROM_SOURCE")]
    InheritedFromSource,
}

impl Default for StatusOption {
    fn default() -> StatusOption {
        Self::Active
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RenameStrategy {
    #[serde(rename = "DEEP_RENAME")]
    DeepRename,
    #[serde(rename = "ONLY_TOP_LEVEL_RENAME")]
    OnlyTopLevelRename,
    #[serde(rename = "NO_RENAME")]
    NoRename,
}

impl Default for RenameStrategy {
    fn default() -> RenameStrategy {
        Self::DeepRename
    }
}
