/*
* 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.104.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 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>,
/// Adds a 'Continue in Messenger' option to the thank-you page (Meta thank_you_page.enable_messenger), so the lead can carry on chatting with the Page. Set thankYouButtonType to MESSAGE_BUSINESS or P2B_MESSENGER to make the chat the primary button.
#[serde(
rename = "thankYouEnableMessenger",
skip_serializing_if = "Option::is_none"
)]
pub thank_you_enable_messenger: Option<bool>,
/// Set true for a higher-intent form (adds a review step before submit).
#[serde(
rename = "isOptimizedForQuality",
skip_serializing_if = "Option::is_none"
)]
pub is_optimized_for_quality: Option<bool>,
/// Requires the lead to verify their phone number over SMS before the form submits (Meta is_phone_sms_verify_enabled). Only meaningful on a form with a PHONE question. Meta can restrict this parameter to apps holding a capability: when it does, the create fails with a 422 naming platformSpecificData.isPhoneSmsVerifyEnabled, and the toggle then has to be set in Meta's form builder.
#[serde(
rename = "isPhoneSmsVerifyEnabled",
skip_serializing_if = "Option::is_none"
)]
pub is_phone_sms_verify_enabled: Option<bool>,
#[serde(
rename = "blockDisplayForNonTargetedViewer",
skip_serializing_if = "Option::is_none"
)]
pub block_display_for_non_targeted_viewer: 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,
thank_you_enable_messenger: None,
is_optimized_for_quality: None,
is_phone_sms_verify_enabled: None,
block_display_for_non_targeted_viewer: None,
question_page_custom_headline: None,
context_card: None,
}
}
}