/*
* 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.4
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// UpdateAdRequestCreative : Replace the ad's creative. Meta + TikTok only. - **Meta**: requires `headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`. The ad's existing creative is replaced via a new `/act_X/adcreatives` upload + ad update. The old creative is retained on the ad account for historical reporting. - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes `landing_page_url`; `videoUrl` triggers a fresh upload.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateAdRequestCreative {
/// Meta only
#[serde(rename = "headline", skip_serializing_if = "Option::is_none")]
pub headline: Option<String>,
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "callToAction", skip_serializing_if = "Option::is_none")]
pub call_to_action: Option<String>,
#[serde(rename = "linkUrl", skip_serializing_if = "Option::is_none")]
pub link_url: Option<String>,
#[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")]
pub image_url: Option<String>,
#[serde(rename = "videoUrl", skip_serializing_if = "Option::is_none")]
pub video_url: Option<String>,
}
impl UpdateAdRequestCreative {
/// Replace the ad's creative. Meta + TikTok only. - **Meta**: requires `headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`. The ad's existing creative is replaced via a new `/act_X/adcreatives` upload + ad update. The old creative is retained on the ad account for historical reporting. - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes `landing_page_url`; `videoUrl` triggers a fresh upload.
pub fn new() -> UpdateAdRequestCreative {
UpdateAdRequestCreative {
headline: None,
body: None,
call_to_action: None,
link_url: None,
image_url: None,
video_url: None,
}
}
}