/*
* 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). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.123.0
* 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,
}
}
}