use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateLeadFormRequest {
#[serde(rename = "accountId")]
pub account_id: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "questions")]
pub questions: Vec<models::CreateLeadFormRequestQuestionsInner>,
#[serde(rename = "privacyPolicyUrl")]
pub privacy_policy_url: String,
#[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>,
}
impl CreateLeadFormRequest {
pub fn new(
account_id: String,
name: String,
questions: Vec<models::CreateLeadFormRequestQuestionsInner>,
privacy_policy_url: String,
) -> CreateLeadFormRequest {
CreateLeadFormRequest {
account_id,
name,
questions,
privacy_policy_url,
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,
}
}
}