/*
 * 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 CheckWhatsAppNumberAvailability200Response {
    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
    pub country: Option<String>,
    #[serde(rename = "numberType", skip_serializing_if = "Option::is_none")]
    pub number_type: Option<String>,
    /// Whether deliverable voice inventory exists right now.
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
    #[serde(rename = "addressConstraint", skip_serializing_if = "Option::is_none")]
    pub address_constraint: Option<AddressConstraint>,
    /// For `geo` only — the area(s) the registered address must be in.
    #[serde(rename = "areas", skip_serializing_if = "Option::is_none")]
    pub areas: Option<Vec<String>>,
}

impl CheckWhatsAppNumberAvailability200Response {
    pub fn new() -> CheckWhatsAppNumberAvailability200Response {
        CheckWhatsAppNumberAvailability200Response {
            country: None,
            number_type: None,
            available: None,
            address_constraint: None,
            areas: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum AddressConstraint {
    #[serde(rename = "geo")]
    Geo,
    #[serde(rename = "country")]
    Country,
    #[serde(rename = "none")]
    None,
}

impl Default for AddressConstraint {
    fn default() -> AddressConstraint {
        Self::Geo
    }
}
