/*
* 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};
/// UpdateAdSetRequestPlatformSpecificData : Platform-specific post-launch delivery settings. The platform is implied by the `platform` body param. Meta only; other platforms return 400. Unknown keys are rejected.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateAdSetRequestPlatformSpecificData {
/// Meta ad-set optimization_goal (e.g. OFFSITE_CONVERSIONS, LANDING_PAGE_VIEWS).
#[serde(rename = "optimizationGoal", skip_serializing_if = "Option::is_none")]
pub optimization_goal: Option<String>,
/// Meta ad-set billing_event (e.g. IMPRESSIONS, LINK_CLICKS, THRUPLAY).
#[serde(rename = "billingEvent", skip_serializing_if = "Option::is_none")]
pub billing_event: Option<String>,
/// Ad set start_time (ISO 8601).
#[serde(rename = "startDate", skip_serializing_if = "Option::is_none")]
pub start_date: Option<String>,
/// Ad set end_time (ISO 8601).
#[serde(rename = "endDate", skip_serializing_if = "Option::is_none")]
pub end_date: Option<String>,
/// Meta `daily_min_spend_target`: the least this ad set should spend per day, in whole currency units of the ad account. It reserves a share of a CAMPAIGN budget for one ad set, so it requires a campaign using Advantage campaign budget (CBO). On an ad set that owns its budget (ABO) this returns 409. Move the budget to the campaign with `PUT /v1/ads/campaigns/{campaignId}` first. Meta treats it as a target, not a guarantee, and rejects the combined minimum of a campaign's ad sets going over the campaign budget. Mutually exclusive with `lifetimeMinSpendTarget` (400): the flavour must match the campaign budget type, a daily budget takes a daily target. Read it back with `GET /v1/ads/ad-sets/{adSetId}?fields=daily_min_spend_target`.
#[serde(
rename = "dailyMinSpendTarget",
skip_serializing_if = "Option::is_none"
)]
pub daily_min_spend_target: Option<f64>,
/// Meta `lifetime_min_spend_target`: the lifetime-budget flavour of `dailyMinSpendTarget`, in whole currency units. Send this one when the campaign budget is a lifetime budget. Same rules and same rejections.
#[serde(
rename = "lifetimeMinSpendTarget",
skip_serializing_if = "Option::is_none"
)]
pub lifetime_min_spend_target: Option<f64>,
#[serde(rename = "promotedObject", skip_serializing_if = "Option::is_none")]
pub promoted_object: Option<Box<models::UpdateAdSetRequestPlatformSpecificDataPromotedObject>>,
}
impl UpdateAdSetRequestPlatformSpecificData {
/// Platform-specific post-launch delivery settings. The platform is implied by the `platform` body param. Meta only; other platforms return 400. Unknown keys are rejected.
pub fn new() -> UpdateAdSetRequestPlatformSpecificData {
UpdateAdSetRequestPlatformSpecificData {
optimization_goal: None,
billing_event: None,
start_date: None,
end_date: None,
daily_min_spend_target: None,
lifetime_min_spend_target: None,
promoted_object: None,
}
}
}