zernio 0.0.445

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StartSmsRegistrationRequest {
    #[serde(rename = "registrationType")]
    pub registration_type: RegistrationType,
    /// Your numbers this registration covers.
    #[serde(rename = "phoneNumbers")]
    pub phone_numbers: 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>>,
    #[serde(rename = "tollFree", skip_serializing_if = "Option::is_none")]
    pub toll_free: Option<Box<models::StartSmsRegistrationRequestTollFree>>,
}

impl StartSmsRegistrationRequest {
    pub fn new(
        registration_type: RegistrationType,
        phone_numbers: Vec<String>,
    ) -> StartSmsRegistrationRequest {
        StartSmsRegistrationRequest {
            registration_type,
            phone_numbers,
            brand: None,
            campaign: 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
    }
}