late 0.0.619

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 MetaLeadFormPlatformData {
    #[serde(rename = "questions")]
    pub questions: Vec<models::CreateLeadFormRequestQuestionsInner>,
    #[serde(
        rename = "privacyPolicyLinkText",
        skip_serializing_if = "Option::is_none"
    )]
    pub privacy_policy_link_text: Option<String>,
    #[serde(rename = "followUpActionUrl", skip_serializing_if = "Option::is_none")]
    pub follow_up_action_url: Option<String>,
    #[serde(rename = "locale", skip_serializing_if = "Option::is_none")]
    pub locale: Option<String>,
    #[serde(rename = "thankYouTitle", skip_serializing_if = "Option::is_none")]
    pub thank_you_title: Option<String>,
    #[serde(rename = "thankYouBody", skip_serializing_if = "Option::is_none")]
    pub thank_you_body: Option<String>,
    #[serde(rename = "thankYouButtonText", skip_serializing_if = "Option::is_none")]
    pub thank_you_button_text: Option<String>,
    #[serde(rename = "thankYouButtonType", skip_serializing_if = "Option::is_none")]
    pub thank_you_button_type: Option<String>,
    #[serde(rename = "thankYouWebsiteUrl", skip_serializing_if = "Option::is_none")]
    pub thank_you_website_url: Option<String>,
    #[serde(
        rename = "isOptimizedForQuality",
        skip_serializing_if = "Option::is_none"
    )]
    pub is_optimized_for_quality: Option<bool>,
    #[serde(rename = "formType", skip_serializing_if = "Option::is_none")]
    pub form_type: Option<FormType>,
    #[serde(
        rename = "blockDisplayForNonTargetedViewer",
        skip_serializing_if = "Option::is_none"
    )]
    pub block_display_for_non_targeted_viewer: Option<bool>,
    #[serde(
        rename = "allowOrganicLeadGen",
        skip_serializing_if = "Option::is_none"
    )]
    pub allow_organic_lead_gen: Option<bool>,
    #[serde(
        rename = "questionPageCustomHeadline",
        skip_serializing_if = "Option::is_none"
    )]
    pub question_page_custom_headline: Option<String>,
    #[serde(rename = "contextCard", skip_serializing_if = "Option::is_none")]
    pub context_card: Option<Box<models::MetaLeadFormPlatformDataContextCard>>,
}

impl MetaLeadFormPlatformData {
    pub fn new(
        questions: Vec<models::CreateLeadFormRequestQuestionsInner>,
    ) -> MetaLeadFormPlatformData {
        MetaLeadFormPlatformData {
            questions,
            privacy_policy_link_text: None,
            follow_up_action_url: None,
            locale: None,
            thank_you_title: None,
            thank_you_body: None,
            thank_you_button_text: None,
            thank_you_button_type: None,
            thank_you_website_url: None,
            is_optimized_for_quality: None,
            form_type: None,
            block_display_for_non_targeted_viewer: None,
            allow_organic_lead_gen: None,
            question_page_custom_headline: None,
            context_card: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum FormType {
    #[serde(rename = "MORE_VOLUME")]
    MoreVolume,
    #[serde(rename = "HIGHER_INTENT")]
    HigherIntent,
    #[serde(rename = "RICH_CREATIVE")]
    RichCreative,
}

impl Default for FormType {
    fn default() -> FormType {
        Self::MoreVolume
    }
}