/*
 * 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 ListSmsRegistrations200ResponseRegistrationsInner {
    #[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 = "displayName",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub display_name: Option<Option<String>>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// Carrier-registry brand status (e.g. VERIFIED).
    #[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>,
    /// TCR brand id, useful when referencing the brand in carrier support threads.
    #[serde(
        rename = "brandId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub brand_id: Option<Option<String>>,
    /// TCR campaign id.
    #[serde(
        rename = "campaignId",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub campaign_id: Option<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>>,
    /// Sole-prop 10DLC only; the OTP step is still pending.
    #[serde(rename = "awaitingOtp", skip_serializing_if = "Option::is_none")]
    pub awaiting_otp: Option<bool>,
    /// Carrier-assigned brand trust score; drives throughput.
    #[serde(
        rename = "trustScore",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub trust_score: Option<Option<f64>>,
    #[serde(rename = "throughput", skip_serializing_if = "Option::is_none")]
    pub throughput:
        Option<Box<models::ListSmsRegistrations200ResponseRegistrationsInnerThroughput>>,
}

impl ListSmsRegistrations200ResponseRegistrationsInner {
    pub fn new() -> ListSmsRegistrations200ResponseRegistrationsInner {
        ListSmsRegistrations200ResponseRegistrationsInner {
            id: None,
            registration_type: None,
            display_name: None,
            status: None,
            brand_status: None,
            campaign_status: None,
            brand_id: None,
            campaign_id: None,
            decline_reason: None,
            phone_numbers: None,
            awaiting_otp: None,
            trust_score: None,
            throughput: 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
    }
}
