1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* 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};
#[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,
/// 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,
image_url: None,
video_url: None,
thumbnail_url: None,
}
}
}