late 0.0.802

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).
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).
 *
 * 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};

/// CreateStandaloneAdRequestCreativesInner : Each creative must supply EXACTLY ONE of `imageUrl` (image creative) or `video` (video creative).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateStandaloneAdRequestCreativesInner {
    /// Exact name for this ad. Falls back to `<name> #N` (N = 1-based position).
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "headline")]
    pub headline: String,
    #[serde(rename = "body")]
    pub body: String,
    /// Link description for this ad (link_data.description; video creatives: video_data.link_description). Falls back to the top-level `description`; when both are omitted Meta scrapes the destination URL's OG description.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Image creative. Mutually exclusive with `video`.
    #[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")]
    pub image_url: Option<String>,
    #[serde(rename = "video", skip_serializing_if = "Option::is_none")]
    pub video: Option<Box<models::CreateStandaloneAdRequestCreativesInnerVideo>>,
    #[serde(rename = "linkUrl")]
    pub link_url: String,
    #[serde(rename = "callToAction")]
    pub call_to_action: CallToAction,
}

impl CreateStandaloneAdRequestCreativesInner {
    /// Each creative must supply EXACTLY ONE of `imageUrl` (image creative) or `video` (video creative).
    pub fn new(
        headline: String,
        body: String,
        link_url: String,
        call_to_action: CallToAction,
    ) -> CreateStandaloneAdRequestCreativesInner {
        CreateStandaloneAdRequestCreativesInner {
            name: None,
            headline,
            body,
            description: None,
            image_url: None,
            video: None,
            link_url,
            call_to_action,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CallToAction {
    #[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 = "ADD_TO_CART")]
    AddToCart,
    #[serde(rename = "APPLY_NOW")]
    ApplyNow,
    #[serde(rename = "BOOK_NOW")]
    BookNow,
    #[serde(rename = "BUY_TICKETS")]
    BuyTickets,
    #[serde(rename = "DONATE")]
    Donate,
    #[serde(rename = "DONATE_NOW")]
    DonateNow,
    #[serde(rename = "GET_DIRECTIONS")]
    GetDirections,
    #[serde(rename = "GET_SHOWTIMES")]
    GetShowtimes,
    #[serde(rename = "LISTEN_NOW")]
    ListenNow,
    #[serde(rename = "ORDER_NOW")]
    OrderNow,
    #[serde(rename = "PLAY_GAME")]
    PlayGame,
    #[serde(rename = "REQUEST_TIME")]
    RequestTime,
    #[serde(rename = "SEE_MENU")]
    SeeMenu,
    #[serde(rename = "START_ORDER")]
    StartOrder,
    #[serde(rename = "INSTALL_MOBILE_APP")]
    InstallMobileApp,
    #[serde(rename = "USE_APP")]
    UseApp,
}

impl Default for CallToAction {
    fn default() -> CallToAction {
        Self::LearnMore
    }
}