late 0.0.670

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * 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 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
    }
}