late 0.0.383

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.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

/// CreateStandaloneAdRequestDynamicCreative : Meta only. Dynamic Creative: supply a POOL of assets and Meta auto-combines and optimises them into the best-performing variations within a single ad (mapped to the creative's `asset_feed_spec`). When set, the top-level single-creative fields (`imageUrl`, `headline`, `body`, `linkUrl`, `callToAction`) are ignored. Mutually exclusive with the `creatives[]` multi-creative shape. Meta limits: ≤10 images, ≤5 bodies / titles / descriptions.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateStandaloneAdRequestDynamicCreative {
    /// Pool of image URLs (1-10). Uploaded to the ad account and referenced by hash in the asset feed.
    #[serde(rename = "imageUrls")]
    pub image_urls: Vec<String>,
    /// Primary-text variations (the body copy).
    #[serde(rename = "bodies", skip_serializing_if = "Option::is_none")]
    pub bodies: Option<Vec<String>>,
    /// Headline variations.
    #[serde(rename = "titles", skip_serializing_if = "Option::is_none")]
    pub titles: Option<Vec<String>>,
    /// Description (link caption) variations.
    #[serde(rename = "descriptions", skip_serializing_if = "Option::is_none")]
    pub descriptions: Option<Vec<String>>,
    /// Destination URL variations. At least one is required unless `goal` is `lead_generation`.
    #[serde(rename = "linkUrls", skip_serializing_if = "Option::is_none")]
    pub link_urls: Option<Vec<String>>,
    /// CTA-button variations. Required.
    #[serde(rename = "callToActionTypes", skip_serializing_if = "Option::is_none")]
    pub call_to_action_types: Option<Vec<CallToActionTypes>>,
    /// Asset-feed ad format. Defaults to SINGLE_IMAGE.
    #[serde(rename = "adFormat", skip_serializing_if = "Option::is_none")]
    pub ad_format: Option<AdFormat>,
}

impl CreateStandaloneAdRequestDynamicCreative {
    /// Meta only. Dynamic Creative: supply a POOL of assets and Meta auto-combines and optimises them into the best-performing variations within a single ad (mapped to the creative's `asset_feed_spec`). When set, the top-level single-creative fields (`imageUrl`, `headline`, `body`, `linkUrl`, `callToAction`) are ignored. Mutually exclusive with the `creatives[]` multi-creative shape. Meta limits: ≤10 images, ≤5 bodies / titles / descriptions.
    pub fn new(image_urls: Vec<String>) -> CreateStandaloneAdRequestDynamicCreative {
        CreateStandaloneAdRequestDynamicCreative {
            image_urls,
            bodies: None,
            titles: None,
            descriptions: None,
            link_urls: None,
            call_to_action_types: None,
            ad_format: None,
        }
    }
}
/// CTA-button variations. Required.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CallToActionTypes {
    #[serde(rename = "LEARN_MORE")]
    LearnMore,
    #[serde(rename = "SHOP_NOW")]
    ShopNow,
    #[serde(rename = "SIGN_UP")]
    SignUp,
    #[serde(rename = "BOOK_TRAVEL")]
    BookTravel,
    #[serde(rename = "CONTACT_US")]
    ContactUs,
    #[serde(rename = "DOWNLOAD")]
    Download,
    #[serde(rename = "GET_OFFER")]
    GetOffer,
    #[serde(rename = "GET_QUOTE")]
    GetQuote,
    #[serde(rename = "SUBSCRIBE")]
    Subscribe,
    #[serde(rename = "WATCH_MORE")]
    WatchMore,
    #[serde(rename = "REGISTER")]
    Register,
    #[serde(rename = "JOIN")]
    Join,
    #[serde(rename = "ATTEND")]
    Attend,
    #[serde(rename = "REQUEST_DEMO")]
    RequestDemo,
    #[serde(rename = "VIEW_QUOTE")]
    ViewQuote,
    #[serde(rename = "APPLY")]
    Apply,
    #[serde(rename = "SEE_MORE")]
    SeeMore,
    #[serde(rename = "BUY_NOW")]
    BuyNow,
}

impl Default for CallToActionTypes {
    fn default() -> CallToActionTypes {
        Self::LearnMore
    }
}
/// Asset-feed ad format. Defaults to SINGLE_IMAGE.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AdFormat {
    #[serde(rename = "SINGLE_IMAGE")]
    SingleImage,
    #[serde(rename = "CAROUSEL_IMAGE")]
    CarouselImage,
}

impl Default for AdFormat {
    fn default() -> AdFormat {
        Self::SingleImage
    }
}