use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LinkedInLeadFormPlatformData {
#[serde(rename = "adAccountId")]
pub ad_account_id: String,
#[serde(rename = "headline")]
pub headline: String,
#[serde(rename = "description")]
pub description: String,
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<State>,
#[serde(rename = "locale", skip_serializing_if = "Option::is_none")]
pub locale: Option<Box<models::LinkedInLeadFormPlatformDataLocale>>,
#[serde(rename = "consents", skip_serializing_if = "Option::is_none")]
pub consents: Option<Vec<models::LinkedInLeadFormPlatformDataConsentsInner>>,
#[serde(rename = "questions")]
pub questions: Vec<models::LinkedInLeadFormPlatformDataQuestionsInner>,
}
impl LinkedInLeadFormPlatformData {
pub fn new(
ad_account_id: String,
headline: String,
description: String,
questions: Vec<models::LinkedInLeadFormPlatformDataQuestionsInner>,
) -> LinkedInLeadFormPlatformData {
LinkedInLeadFormPlatformData {
ad_account_id,
headline,
description,
state: None,
locale: None,
consents: None,
questions,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum State {
#[serde(rename = "DRAFT")]
Draft,
#[serde(rename = "PUBLISHED")]
Published,
}
impl Default for State {
fn default() -> State {
Self::Draft
}
}