/*
* 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};
/// MetaLeadForm : A Meta Lead Gen form as Graph returns it, in Meta's own snake_case. Read through GET /v1/ads/lead-forms/{formId}. Every setting POST /v1/ads/lead-forms writes is present here, so a form can be diffed against what was created and drift from edits made in Meta's form builder is detectable. A compound field is omitted entirely when the form has no value for it, and `fields` narrows the selection.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MetaLeadForm {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// One of ACTIVE, ARCHIVED, DELETED or DRAFT.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "locale", skip_serializing_if = "Option::is_none")]
pub locale: Option<String>,
#[serde(rename = "created_time", skip_serializing_if = "Option::is_none")]
pub created_time: Option<String>,
/// Owning Facebook Page. A form on any other Page is a 404, whether read or archived.
#[serde(rename = "page_id", skip_serializing_if = "Option::is_none")]
pub page_id: Option<String>,
#[serde(rename = "leads_count", skip_serializing_if = "Option::is_none")]
pub leads_count: Option<i32>,
#[serde(
rename = "organic_leads_count",
skip_serializing_if = "Option::is_none"
)]
pub organic_leads_count: Option<i32>,
/// Leads Meta has aged out of the retention window.
#[serde(
rename = "expired_leads_count",
skip_serializing_if = "Option::is_none"
)]
pub expired_leads_count: Option<i32>,
#[serde(rename = "privacy_policy_url", skip_serializing_if = "Option::is_none")]
pub privacy_policy_url: Option<String>,
#[serde(
rename = "follow_up_action_url",
skip_serializing_if = "Option::is_none"
)]
pub follow_up_action_url: Option<String>,
#[serde(
rename = "follow_up_action_text",
skip_serializing_if = "Option::is_none"
)]
pub follow_up_action_text: Option<String>,
#[serde(
rename = "question_page_custom_headline",
skip_serializing_if = "Option::is_none"
)]
pub question_page_custom_headline: Option<String>,
#[serde(
rename = "is_optimized_for_quality",
skip_serializing_if = "Option::is_none"
)]
pub is_optimized_for_quality: Option<bool>,
#[serde(
rename = "block_display_for_non_targeted_viewer",
skip_serializing_if = "Option::is_none"
)]
pub block_display_for_non_targeted_viewer: Option<bool>,
/// Whether the form can also be submitted from an organic Page post.
#[serde(rename = "allow_organic_lead", skip_serializing_if = "Option::is_none")]
pub allow_organic_lead: Option<bool>,
/// Custom key/value pairs attached to every lead of this form.
#[serde(
rename = "tracking_parameters",
skip_serializing_if = "Option::is_none"
)]
pub tracking_parameters: Option<Vec<models::BoostPostRequestTrackingUrlTagsInner>>,
#[serde(rename = "legal_content", skip_serializing_if = "Option::is_none")]
pub legal_content: Option<Box<models::MetaLeadFormLegalContent>>,
#[serde(rename = "context_card", skip_serializing_if = "Option::is_none")]
pub context_card: Option<Box<models::MetaLeadFormContextCard>>,
#[serde(rename = "thank_you_page", skip_serializing_if = "Option::is_none")]
pub thank_you_page: Option<Box<models::MetaLeadFormThankYouPage>>,
#[serde(rename = "questions", skip_serializing_if = "Option::is_none")]
pub questions: Option<Vec<models::MetaLeadFormQuestionsInner>>,
}
impl MetaLeadForm {
/// A Meta Lead Gen form as Graph returns it, in Meta's own snake_case. Read through GET /v1/ads/lead-forms/{formId}. Every setting POST /v1/ads/lead-forms writes is present here, so a form can be diffed against what was created and drift from edits made in Meta's form builder is detectable. A compound field is omitted entirely when the form has no value for it, and `fields` narrows the selection.
pub fn new() -> MetaLeadForm {
MetaLeadForm {
id: None,
name: None,
status: None,
locale: None,
created_time: None,
page_id: None,
leads_count: None,
organic_leads_count: None,
expired_leads_count: None,
privacy_policy_url: None,
follow_up_action_url: None,
follow_up_action_text: None,
question_page_custom_headline: None,
is_optimized_for_quality: None,
block_display_for_non_targeted_viewer: None,
allow_organic_lead: None,
tracking_parameters: None,
legal_content: None,
context_card: None,
thank_you_page: None,
questions: None,
}
}
}