/*
* 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). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.115.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 DuplicateAdSetRequest {
#[serde(rename = "platform")]
pub platform: Platform,
/// Destination platform campaign id (defaults to the source's campaign)
#[serde(rename = "campaignId", skip_serializing_if = "Option::is_none")]
pub campaign_id: Option<String>,
/// Copy child ads + creatives
#[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 copy'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>,
#[serde(rename = "syncAfter", skip_serializing_if = "Option::is_none")]
pub sync_after: Option<bool>,
}
impl DuplicateAdSetRequest {
pub fn new(platform: Platform) -> DuplicateAdSetRequest {
DuplicateAdSetRequest {
platform,
campaign_id: None,
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,
}
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
}
}