/*
 * 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 ListPhoneNumberCountries200ResponseCountriesInner {
    /// ISO 3166-1 alpha-2
    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
    pub code: Option<String>,
    #[serde(rename = "tier", skip_serializing_if = "Option::is_none")]
    pub tier: Option<Tier>,
    #[serde(rename = "monthlyCents", skip_serializing_if = "Option::is_none")]
    pub monthly_cents: Option<i32>,
    #[serde(rename = "needsKyc", skip_serializing_if = "Option::is_none")]
    pub needs_kyc: Option<bool>,
    /// Regular phone (PSTN) calling on the number, inbound + outbound. Available on every offerable country.
    #[serde(rename = "callsAvailable", skip_serializing_if = "Option::is_none")]
    pub calls_available: Option<bool>,
    /// WhatsApp can be enabled on numbers from this country.
    #[serde(rename = "whatsappAvailable", skip_serializing_if = "Option::is_none")]
    pub whatsapp_available: Option<bool>,
    /// Whether this country's number type can do SMS. Use it to filter the picker when the buyer wants SMS (pair with `wantsSms` on purchase).
    #[serde(rename = "smsAvailable", skip_serializing_if = "Option::is_none")]
    pub sms_available: Option<bool>,
    /// WhatsApp Business Calling (BIC) outbound availability, a Meta feature blocked in some countries. NOT the PSTN Calls feature (`callsAvailable`).
    #[serde(
        rename = "outboundCallingAvailable",
        skip_serializing_if = "Option::is_none"
    )]
    pub outbound_calling_available: Option<bool>,
}

impl ListPhoneNumberCountries200ResponseCountriesInner {
    pub fn new() -> ListPhoneNumberCountries200ResponseCountriesInner {
        ListPhoneNumberCountries200ResponseCountriesInner {
            code: None,
            tier: None,
            monthly_cents: None,
            needs_kyc: None,
            calls_available: None,
            whatsapp_available: None,
            sms_available: None,
            outbound_calling_available: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Tier {
    #[serde(rename = "1")]
    Variant1,
    #[serde(rename = "2")]
    Variant2,
    #[serde(rename = "3")]
    Variant3,
    #[serde(rename = "4")]
    Variant4,
}

impl Default for Tier {
    fn default() -> Tier {
        Self::Variant1
    }
}
