late 0.0.204

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * 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.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// CreateStandaloneAdRequestPromotedObject : Meta only. Forwarded to the ad set's `promoted_object` (snake-cased).  Required for goals whose ad-set optimization_goal points at a specific event/page/app — without it Meta rejects the ad-set create with `error_subcode: 1815430` \"Please select a promoted object for your ad set\":   - `goal: conversions` (OFFSITE_CONVERSIONS) — requires `pixelId` + `customEventType`   - `goal: app_promotion` (APP_INSTALLS) — requires `applicationId` + `objectStoreUrl`   - `goal: lead_generation` (LEAD_GENERATION) — `pageId` is auto-filled from the connected Page when omitted  Other goals (engagement, traffic, awareness, video_views) ignore this field.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateStandaloneAdRequestPromotedObject {
    /// Facebook Pixel ID. Required for `goal: conversions`.
    #[serde(rename = "pixelId", skip_serializing_if = "Option::is_none")]
    pub pixel_id: Option<String>,
    /// Standard event the campaign optimises against, e.g. `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`, `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required for `goal: conversions`.
    #[serde(rename = "customEventType", skip_serializing_if = "Option::is_none")]
    pub custom_event_type: Option<String>,
    /// Facebook Page ID. Used by `goal: lead_generation`. Auto-filled from the connected Page when omitted.
    #[serde(rename = "pageId", skip_serializing_if = "Option::is_none")]
    pub page_id: Option<String>,
    /// App ID. Required for `goal: app_promotion`.
    #[serde(rename = "applicationId", skip_serializing_if = "Option::is_none")]
    pub application_id: Option<String>,
    /// App Store / Play Store listing URL. Required for `goal: app_promotion`.
    #[serde(rename = "objectStoreUrl", skip_serializing_if = "Option::is_none")]
    pub object_store_url: Option<String>,
    /// Custom Conversion ID, when optimising against one instead of a standard event.
    #[serde(rename = "customConversionId", skip_serializing_if = "Option::is_none")]
    pub custom_conversion_id: Option<String>,
    /// Catalog ID for catalog/Advantage+ Shopping campaigns.
    #[serde(rename = "productCatalogId", skip_serializing_if = "Option::is_none")]
    pub product_catalog_id: Option<String>,
    /// Product Set ID inside the catalog.
    #[serde(rename = "productSetId", skip_serializing_if = "Option::is_none")]
    pub product_set_id: Option<String>,
}

impl CreateStandaloneAdRequestPromotedObject {
    /// Meta only. Forwarded to the ad set's `promoted_object` (snake-cased).  Required for goals whose ad-set optimization_goal points at a specific event/page/app — without it Meta rejects the ad-set create with `error_subcode: 1815430` \"Please select a promoted object for your ad set\":   - `goal: conversions` (OFFSITE_CONVERSIONS) — requires `pixelId` + `customEventType`   - `goal: app_promotion` (APP_INSTALLS) — requires `applicationId` + `objectStoreUrl`   - `goal: lead_generation` (LEAD_GENERATION) — `pageId` is auto-filled from the connected Page when omitted  Other goals (engagement, traffic, awareness, video_views) ignore this field.
    pub fn new() -> CreateStandaloneAdRequestPromotedObject {
        CreateStandaloneAdRequestPromotedObject {
            pixel_id: None,
            custom_event_type: None,
            page_id: None,
            application_id: None,
            object_store_url: None,
            custom_conversion_id: None,
            product_catalog_id: None,
            product_set_id: None,
        }
    }
}