/*
* 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.34.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateStandaloneAdRequestTranslationsInner {
/// Language code, resolved to Meta's numeric locale id. Bare codes target the '(All)' umbrella (`es` = every Spanish variant); region-qualified codes target the variant (`pt_BR`, `en_GB`).
#[serde(rename = "locale")]
pub locale: String,
/// Headline for this language. REQUIRED, and must differ from every other locale and from the ad's top-level headline.
#[serde(rename = "headline")]
pub headline: String,
/// Primary text for this language. REQUIRED, and must differ from every other locale and from the ad's top-level body.
#[serde(rename = "body")]
pub body: String,
/// Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description.
#[serde(rename = "description")]
pub description: String,
/// Destination URL for this language. Inherits the ad's top-level `linkUrl` when omitted, and requires it to be present (400 otherwise): the top-level URL is the destination for every locale you did not override. Unlike text, identical URLs across locales are fine (they share one asset).
#[serde(rename = "linkUrl", skip_serializing_if = "Option::is_none")]
pub link_url: Option<String>,
/// Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
#[serde(rename = "imageUrl", skip_serializing_if = "Option::is_none")]
pub image_url: Option<String>,
/// Video for this language. Inherits the ad's `video.url` when omitted. The feed is all-image OR all-video.
#[serde(rename = "videoUrl", skip_serializing_if = "Option::is_none")]
pub video_url: Option<String>,
/// Poster frame for this language's video.
#[serde(rename = "thumbnailUrl", skip_serializing_if = "Option::is_none")]
pub thumbnail_url: Option<String>,
}
impl CreateStandaloneAdRequestTranslationsInner {
pub fn new(
locale: String,
headline: String,
body: String,
description: String,
) -> CreateStandaloneAdRequestTranslationsInner {
CreateStandaloneAdRequestTranslationsInner {
locale,
headline,
body,
description,
link_url: None,
image_url: None,
video_url: None,
thumbnail_url: None,
}
}
}