/*
 * 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 GetSmsRegistration200Response {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "registrationType", skip_serializing_if = "Option::is_none")]
    pub registration_type: Option<RegistrationType>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "brandStatus", skip_serializing_if = "Option::is_none")]
    pub brand_status: Option<String>,
    #[serde(rename = "campaignStatus", skip_serializing_if = "Option::is_none")]
    pub campaign_status: Option<String>,
    #[serde(
        rename = "declineReason",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub decline_reason: Option<Option<String>>,
    #[serde(rename = "phoneNumbers", skip_serializing_if = "Option::is_none")]
    pub phone_numbers: Option<Vec<String>>,
    #[serde(rename = "awaitingOtp", skip_serializing_if = "Option::is_none")]
    pub awaiting_otp: Option<bool>,
}

impl GetSmsRegistration200Response {
    pub fn new() -> GetSmsRegistration200Response {
        GetSmsRegistration200Response {
            id: None,
            registration_type: None,
            status: None,
            brand_status: None,
            campaign_status: None,
            decline_reason: None,
            phone_numbers: None,
            awaiting_otp: 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
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "approved")]
    Approved,
    #[serde(rename = "rejected")]
    Rejected,
}

impl Default for Status {
    fn default() -> Status {
        Self::Pending
    }
}
