/*
* 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).
*
* 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. The opt-in/opt-out/help auto-responses (`optinMessage`, `optoutMessage`, `helpMessage`) are optional: when omitted, a compliant, brand-named template with the carrier-required disclosures is generated for you. If you do send them, they must name the registered brand and carry the disclosures — submissions that don't are rewritten to the compliant 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, so it must differ from sample1.
#[serde(rename = "sample2")]
pub sample2: String,
#[serde(rename = "helpMessage", skip_serializing_if = "Option::is_none")]
pub help_message: Option<String>,
#[serde(rename = "optinKeywords")]
pub optin_keywords: String,
#[serde(rename = "optinMessage", skip_serializing_if = "Option::is_none")]
pub optin_message: Option<String>,
#[serde(rename = "optoutKeywords")]
pub optout_keywords: String,
#[serde(rename = "optoutMessage", skip_serializing_if = "Option::is_none")]
pub optout_message: Option<String>,
#[serde(rename = "helpKeywords")]
pub help_keywords: String,
/// Whether messages carry links. Auto-derived from the samples when omitted, so the declaration matches what the reviewer reads.
#[serde(rename = "embeddedLink", skip_serializing_if = "Option::is_none")]
pub embedded_link: Option<bool>,
/// Whether messages carry phone numbers. Auto-derived from the samples when omitted.
#[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>,
/// Link to your privacy policy. Recommended: reviewers check that it says mobile information is not sold or shared with third parties for promotional purposes. A bare domain is normalized to https://.
#[serde(rename = "privacyPolicyLink", skip_serializing_if = "Option::is_none")]
pub privacy_policy_link: Option<String>,
/// Link to your terms & conditions. A bare domain is normalized to https://.
#[serde(
rename = "termsAndConditionsLink",
skip_serializing_if = "Option::is_none"
)]
pub terms_and_conditions_link: Option<String>,
}
impl StartSmsRegistrationRequestCampaign {
/// Required for 10DLC. What you'll send and how recipients opt in/out. The opt-in/opt-out/help auto-responses (`optinMessage`, `optoutMessage`, `helpMessage`) are optional: when omitted, a compliant, brand-named template with the carrier-required disclosures is generated for you. If you do send them, they must name the registered brand and carry the disclosures — submissions that don't are rewritten to the compliant template before the campaign is filed.
pub fn new(
usecase: String,
description: String,
message_flow: String,
sample1: String,
sample2: String,
optin_keywords: String,
optout_keywords: String,
help_keywords: String,
) -> StartSmsRegistrationRequestCampaign {
StartSmsRegistrationRequestCampaign {
usecase,
sub_usecases: None,
description,
message_flow,
sample1,
sample2,
help_message: None,
optin_keywords,
optin_message: None,
optout_keywords,
optout_message: None,
help_keywords,
embedded_link: None,
embedded_phone: None,
number_pool: None,
age_gated: None,
direct_lending: None,
privacy_policy_link: None,
terms_and_conditions_link: 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
}
}