/*
 * 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};

/// StartSmsRegistrationRequestCampaign : Required for 10DLC. What you'll send and how recipients opt in/out.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StartSmsRegistrationRequestCampaign {
    #[serde(rename = "usecase")]
    pub usecase: String,
    #[serde(rename = "description")]
    pub description: String,
    /// How a recipient ends up receiving your messages (the opt-in flow).
    #[serde(rename = "messageFlow")]
    pub message_flow: String,
    #[serde(rename = "sample1")]
    pub sample1: String,
    #[serde(rename = "sample2", skip_serializing_if = "Option::is_none")]
    pub sample2: Option<String>,
    #[serde(rename = "helpMessage")]
    pub help_message: String,
    #[serde(rename = "optinKeywords")]
    pub optin_keywords: String,
    #[serde(rename = "optinMessage")]
    pub optin_message: String,
    #[serde(rename = "optoutKeywords")]
    pub optout_keywords: String,
    #[serde(rename = "optoutMessage")]
    pub optout_message: String,
    #[serde(rename = "helpKeywords")]
    pub help_keywords: String,
    #[serde(rename = "embeddedLink", skip_serializing_if = "Option::is_none")]
    pub embedded_link: Option<bool>,
    #[serde(rename = "embeddedPhone", skip_serializing_if = "Option::is_none")]
    pub embedded_phone: Option<bool>,
    #[serde(rename = "numberPool", skip_serializing_if = "Option::is_none")]
    pub number_pool: Option<bool>,
    #[serde(rename = "ageGated", skip_serializing_if = "Option::is_none")]
    pub age_gated: Option<bool>,
    #[serde(rename = "directLending", skip_serializing_if = "Option::is_none")]
    pub direct_lending: Option<bool>,
}

impl StartSmsRegistrationRequestCampaign {
    /// Required for 10DLC. What you'll send and how recipients opt in/out.
    pub fn new(
        usecase: String,
        description: String,
        message_flow: String,
        sample1: String,
        help_message: String,
        optin_keywords: String,
        optin_message: String,
        optout_keywords: String,
        optout_message: String,
        help_keywords: String,
    ) -> StartSmsRegistrationRequestCampaign {
        StartSmsRegistrationRequestCampaign {
            usecase,
            description,
            message_flow,
            sample1,
            sample2: None,
            help_message,
            optin_keywords,
            optin_message,
            optout_keywords,
            optout_message,
            help_keywords,
            embedded_link: None,
            embedded_phone: None,
            number_pool: None,
            age_gated: None,
            direct_lending: None,
        }
    }
}
