/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
*
* The version of the OpenAPI document: 1.41.0
* 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>,
/// ACTIVE = launch the clone immediately (spends the moment LinkedIn approves it). PAUSED = clone stays DRAFT, safe default. INHERITED_FROM_SOURCE = mirror each entity's source status per-entity. Duplicating an ACTIVE campaign this way starts a second front of spend.
#[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,
#[serde(rename = "linkedin")]
Linkedin,
}
impl Default for Platform {
fn default() -> Platform {
Self::Facebook
}
}
/// ACTIVE = launch the clone immediately (spends the moment LinkedIn approves it). PAUSED = clone stays DRAFT, safe default. INHERITED_FROM_SOURCE = mirror each entity's source status per-entity. Duplicating an ACTIVE campaign this way starts a second front of spend.
#[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
}
}