/*
 * 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 EnableSmsOnNumber200Response {
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    /// The SMS social account ID (present when enabled).
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
    pub phone_number: Option<String>,
    /// False for US numbers until their registration is approved.
    #[serde(rename = "isActive", skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
    pub country: Option<String>,
    /// Null when capability can't be read yet (still provisioning).
    #[serde(
        rename = "smsCapable",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub sms_capable: Option<Option<bool>>,
    #[serde(rename = "mmsCapable", skip_serializing_if = "Option::is_none")]
    pub mms_capable: Option<bool>,
    #[serde(rename = "domesticOnly", skip_serializing_if = "Option::is_none")]
    pub domestic_only: Option<bool>,
    /// Number is still provisioning at the carrier; retry shortly.
    #[serde(rename = "notReady", skip_serializing_if = "Option::is_none")]
    pub not_ready: Option<bool>,
    /// US only; a carrier registration is required before delivery.
    #[serde(rename = "needsRegistration", skip_serializing_if = "Option::is_none")]
    pub needs_registration: Option<bool>,
    /// A prior non-rejected registration already covers this number; no re-submit needed.
    #[serde(rename = "alreadyRegistered", skip_serializing_if = "Option::is_none")]
    pub already_registered: Option<bool>,
    #[serde(
        rename = "registrationStatus",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub registration_status: Option<Option<RegistrationStatus>>,
    #[serde(rename = "reusable", skip_serializing_if = "Option::is_none")]
    pub reusable: Option<Box<models::EnableSmsOnNumber200ResponseReusable>>,
    /// Human-readable explanation when `enabled` is false.
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
}

impl EnableSmsOnNumber200Response {
    pub fn new() -> EnableSmsOnNumber200Response {
        EnableSmsOnNumber200Response {
            enabled: None,
            id: None,
            phone_number: None,
            is_active: None,
            country: None,
            sms_capable: None,
            mms_capable: None,
            domestic_only: None,
            not_ready: None,
            needs_registration: None,
            already_registered: None,
            registration_status: None,
            reusable: None,
            message: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RegistrationStatus {
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "approved")]
    Approved,
    #[serde(rename = "rejected")]
    Rejected,
}

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