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
/*
* 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};
/// LinkedInAdsPlatformDataConversation : POST /v1/ads/create only. Conversation Ad: a choose-your-path message tree delivered to the member's LinkedIn inbox. Messages are flat nodes wired by local ids; each button either opens a url or leads to nextMessageId. Cycles, unknown ids and a missing firstMessageId return a 400. LinkedIn does not deliver message ads to EU members. Mutually exclusive with the other creative sources.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LinkedInAdsPlatformDataConversation {
/// InMail subject shown in the inbox.
#[serde(rename = "subject")]
pub subject: String,
/// Person or organization URN. Defaults to the authoring Company Page. The sender must be approved for the ad account first (Campaign Manager > Manage message ad senders) or LinkedIn rejects the create with SINMAIL_SENDER_NOT_APPROVED.
#[serde(rename = "sender", skip_serializing_if = "Option::is_none")]
pub sender: Option<String>,
/// Optional intro body (HTML allowed).
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
/// Terms shown at the bottom of the message.
#[serde(rename = "footer", skip_serializing_if = "Option::is_none")]
pub footer: Option<String>,
/// Conversation headline. Defaults to the first message's first line.
#[serde(rename = "headline", skip_serializing_if = "Option::is_none")]
pub headline: Option<String>,
#[serde(rename = "firstMessageId")]
pub first_message_id: String,
#[serde(rename = "messages")]
pub messages: Vec<models::LinkedInAdsPlatformDataConversationMessagesInner>,
}
impl LinkedInAdsPlatformDataConversation {
/// POST /v1/ads/create only. Conversation Ad: a choose-your-path message tree delivered to the member's LinkedIn inbox. Messages are flat nodes wired by local ids; each button either opens a url or leads to nextMessageId. Cycles, unknown ids and a missing firstMessageId return a 400. LinkedIn does not deliver message ads to EU members. Mutually exclusive with the other creative sources.
pub fn new(
subject: String,
first_message_id: String,
messages: Vec<models::LinkedInAdsPlatformDataConversationMessagesInner>,
) -> LinkedInAdsPlatformDataConversation {
LinkedInAdsPlatformDataConversation {
subject,
sender: None,
body: None,
footer: None,
headline: None,
first_message_id,
messages,
}
}
}