/*
* 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.39.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 LinkedInLeadFormPlatformData {
/// LinkedIn ad account id (resolves the owning organization).
#[serde(rename = "adAccountId")]
pub ad_account_id: String,
#[serde(rename = "headline")]
pub headline: String,
#[serde(rename = "description")]
pub description: String,
/// Defaults to DRAFT.
#[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,
}
}
}
/// Defaults to DRAFT.
#[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
}
}