/*
 * 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. Opt-in/opt-out/help auto-responses must name the registered brand and carry the carrier-required disclosures; submissions that don't (or that are blank) are automatically rewritten to a compliant, brand-named template before the campaign is filed.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StartSmsRegistrationRequestCampaign {
    #[serde(rename = "usecase")]
    pub usecase: String,
    /// The concrete kinds of messages a MIXED campaign sends (the carrier registry requires 2-5, and reviewers match them against the sample messages). Omitted: a default pair is applied for MIXED.
    #[serde(rename = "subUsecases", skip_serializing_if = "Option::is_none")]
    pub sub_usecases: Option<Vec<SubUsecases>>,
    #[serde(rename = "description")]
    pub description: String,
    /// How a recipient ends up receiving your messages (the opt-in flow). Include a link to the page or form where they opt in — carrier reviewers reject campaigns whose consent they can't verify.
    #[serde(rename = "messageFlow")]
    pub message_flow: String,
    #[serde(rename = "sample1")]
    pub sample1: String,
    /// Second example message; carriers require two distinct samples
    #[serde(rename = "sample2")]
    pub sample2: 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. Opt-in/opt-out/help auto-responses must name the registered brand and carry the carrier-required disclosures; submissions that don't (or that are blank) are automatically rewritten to a compliant, brand-named template before the campaign is filed.
    pub fn new(
        usecase: String,
        description: String,
        message_flow: String,
        sample1: String,
        sample2: String,
        help_message: String,
        optin_keywords: String,
        optin_message: String,
        optout_keywords: String,
        optout_message: String,
        help_keywords: String,
    ) -> StartSmsRegistrationRequestCampaign {
        StartSmsRegistrationRequestCampaign {
            usecase,
            sub_usecases: None,
            description,
            message_flow,
            sample1,
            sample2,
            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,
        }
    }
}
/// The concrete kinds of messages a MIXED campaign sends (the carrier registry requires 2-5, and reviewers match them against the sample messages). Omitted: a default pair is applied for MIXED.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SubUsecases {
    #[serde(rename = "2FA")]
    Variant2Fa,
    #[serde(rename = "ACCOUNT_NOTIFICATION")]
    AccountNotification,
    #[serde(rename = "CUSTOMER_CARE")]
    CustomerCare,
    #[serde(rename = "DELIVERY_NOTIFICATION")]
    DeliveryNotification,
    #[serde(rename = "FRAUD_ALERT")]
    FraudAlert,
    #[serde(rename = "HIGHER_EDUCATION")]
    HigherEducation,
    #[serde(rename = "MARKETING")]
    Marketing,
    #[serde(rename = "POLLING_VOTING")]
    PollingVoting,
    #[serde(rename = "PUBLIC_SERVICE_ANNOUNCEMENT")]
    PublicServiceAnnouncement,
    #[serde(rename = "SECURITY_ALERT")]
    SecurityAlert,
}

impl Default for SubUsecases {
    fn default() -> SubUsecases {
        Self::Variant2Fa
    }
}
