late 0.0.1055

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.
Documentation
/*
 * 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.104.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 DuplicateAdRequest {
    /// Destination platform ad set id (defaults to the source's ad set)
    #[serde(rename = "adSetId", skip_serializing_if = "Option::is_none")]
    pub ad_set_id: Option<String>,
    #[serde(rename = "statusOption", skip_serializing_if = "Option::is_none")]
    pub status_option: Option<StatusOption>,
    #[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>,
    /// Point the copy at the source ad's creative object instead of copying it, so the copy keeps the same Facebook post, the same Instagram media, their existing likes, comments and shares, and the full creative setup (text variations included). This is what Ads Manager's \"show existing reactions, comments and shares\" does. Meta's native copy always publishes new posts. A creative belongs to one ad account, so `adSetId` must be in the source ad's account. 400 when the source ad has no creative yet.
    #[serde(
        rename = "reuseSourceCreative",
        skip_serializing_if = "Option::is_none"
    )]
    pub reuse_source_creative: Option<bool>,
}

impl DuplicateAdRequest {
    pub fn new() -> DuplicateAdRequest {
        DuplicateAdRequest {
            ad_set_id: None,
            status_option: None,
            rename_strategy: None,
            rename_prefix: None,
            rename_suffix: None,
            sync_after: None,
            reuse_source_creative: None,
        }
    }
}
///
#[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
    }
}