1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* 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.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// LeadGenFormQuestion : A single question on a Meta Instant Form. The `type` enum spans Meta's prefill set (FULL_NAME, EMAIL, PHONE, STREET_ADDRESS, CITY, STATE, COUNTRY, POST_CODE, DOB, GENDER, JOB_TITLE, COMPANY_NAME, etc.) plus custom types (CUSTOM, MULTIPLE_CHOICE, CONDITIONAL, STORE_LOOKUP, APPOINTMENT_REQUEST). See Meta's Lead Ads docs for the full list — we forward whatever string the caller sends so new types work without a Zernio release.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LeadGenFormQuestion {
/// Stable key returned in `field_data` on each lead. If omitted, Meta auto-derives one from `label`.
#[serde(rename = "key", skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// Display text shown above the input.
#[serde(rename = "label", skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(rename = "type")]
pub r#type: String,
/// Required for MULTIPLE_CHOICE / CONDITIONAL questions.
#[serde(rename = "options", skip_serializing_if = "Option::is_none")]
pub options: Option<Vec<models::LeadGenFormQuestionOptionsInner>>,
/// Help text rendered below the field.
#[serde(rename = "inline_context", skip_serializing_if = "Option::is_none")]
pub inline_context: Option<String>,
}
impl LeadGenFormQuestion {
/// A single question on a Meta Instant Form. The `type` enum spans Meta's prefill set (FULL_NAME, EMAIL, PHONE, STREET_ADDRESS, CITY, STATE, COUNTRY, POST_CODE, DOB, GENDER, JOB_TITLE, COMPANY_NAME, etc.) plus custom types (CUSTOM, MULTIPLE_CHOICE, CONDITIONAL, STORE_LOOKUP, APPOINTMENT_REQUEST). See Meta's Lead Ads docs for the full list — we forward whatever string the caller sends so new types work without a Zernio release.
pub fn new(r#type: String) -> LeadGenFormQuestion {
LeadGenFormQuestion {
key: None,
label: None,
r#type,
options: None,
inline_context: None,
}
}
}