/*
* 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.12.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StartSmsRegistrationRequest {
#[serde(rename = "registrationType")]
pub registration_type: RegistrationType,
/// Your numbers this registration covers. When omitted or empty on a 10DLC registration, defaults to your active SMS-enabled US local numbers not already covered by another registration.
#[serde(rename = "phoneNumbers", skip_serializing_if = "Option::is_none")]
pub phone_numbers: Option<Vec<String>>,
#[serde(rename = "brand", skip_serializing_if = "Option::is_none")]
pub brand: Option<Box<models::StartSmsRegistrationRequestBrand>>,
#[serde(rename = "campaign", skip_serializing_if = "Option::is_none")]
pub campaign: Option<Box<models::StartSmsRegistrationRequestCampaign>>,
/// DBA / trade name used to brand message content (samples and auto-replies) when it differs from the legal name, e.g. a sole proprietor texting under a business name. The legal `brand.displayName` is still what the carrier vets.
#[serde(rename = "messagingBrandName", skip_serializing_if = "Option::is_none")]
pub messaging_brand_name: Option<String>,
/// Raw dashboard-wizard answers, stored only to prefill edit-and-resubmit. API integrators can omit.
#[serde(rename = "wizardValues", skip_serializing_if = "Option::is_none")]
pub wizard_values: Option<std::collections::HashMap<String, String>>,
/// Resubmit a registration that was returned for changes. Updates it in place instead of creating a new one.
#[serde(rename = "resubmitRequestId", skip_serializing_if = "Option::is_none")]
pub resubmit_request_id: Option<String>,
#[serde(rename = "tollFree", skip_serializing_if = "Option::is_none")]
pub toll_free: Option<Box<models::StartSmsRegistrationRequestTollFree>>,
}
impl StartSmsRegistrationRequest {
pub fn new(registration_type: RegistrationType) -> StartSmsRegistrationRequest {
StartSmsRegistrationRequest {
registration_type,
phone_numbers: None,
brand: None,
campaign: None,
messaging_brand_name: None,
wizard_values: None,
resubmit_request_id: None,
toll_free: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RegistrationType {
#[serde(rename = "standard_10dlc")]
Standard10dlc,
#[serde(rename = "sole_prop_10dlc")]
SoleProp10dlc,
#[serde(rename = "toll_free")]
TollFree,
}
impl Default for RegistrationType {
fn default() -> RegistrationType {
Self::Standard10dlc
}
}