/*
 * 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 GetWhatsAppPhoneNumbers200ResponseNumbersInner {
    #[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>,
    #[serde(rename = "country", skip_serializing_if = "Option::is_none")]
    pub country: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// For regulated numbers
    #[serde(rename = "registrantName", skip_serializing_if = "Option::is_none")]
    pub registrant_name: Option<String>,
    /// Present once the number order has been placed (i.e. the requirement group was approved). Absent while still in identity review.
    #[serde(rename = "telnyxOrderId", skip_serializing_if = "Option::is_none")]
    pub telnyx_order_id: Option<String>,
    /// Per-country monthly price in cents ($2..$25).
    #[serde(rename = "monthlyCents", skip_serializing_if = "Option::is_none")]
    pub monthly_cents: Option<i32>,
    #[serde(rename = "profileId", skip_serializing_if = "Option::is_none")]
    pub profile_id: Option<serde_json::Value>,
    #[serde(rename = "provisionedAt", skip_serializing_if = "Option::is_none")]
    pub provisioned_at: Option<String>,
    #[serde(rename = "metaPreverifiedId", skip_serializing_if = "Option::is_none")]
    pub meta_preverified_id: Option<String>,
    #[serde(
        rename = "metaVerificationStatus",
        skip_serializing_if = "Option::is_none"
    )]
    pub meta_verification_status: Option<String>,
    /// For regulated (Tier 3/4) numbers with an Onfido ID-verification step — the link to forward to the end user. Set once the order is placed; null otherwise. Poll this field after submitting KYC.
    #[serde(
        rename = "onfidoVerificationUrl",
        skip_serializing_if = "Option::is_none"
    )]
    pub onfido_verification_url: Option<String>,
    #[serde(rename = "endUserFirstName", skip_serializing_if = "Option::is_none")]
    pub end_user_first_name: Option<String>,
    #[serde(rename = "endUserLastName", skip_serializing_if = "Option::is_none")]
    pub end_user_last_name: Option<String>,
    /// Reviewer rejection reason when status is regulatory_declined.
    #[serde(
        rename = "regulatoryDeclineReason",
        skip_serializing_if = "Option::is_none"
    )]
    pub regulatory_decline_reason: Option<String>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
}

impl GetWhatsAppPhoneNumbers200ResponseNumbersInner {
    pub fn new() -> GetWhatsAppPhoneNumbers200ResponseNumbersInner {
        GetWhatsAppPhoneNumbers200ResponseNumbersInner {
            _id: None,
            phone_number: None,
            country: None,
            status: None,
            registrant_name: None,
            telnyx_order_id: None,
            monthly_cents: None,
            profile_id: None,
            provisioned_at: None,
            meta_preverified_id: None,
            meta_verification_status: None,
            onfido_verification_url: None,
            end_user_first_name: None,
            end_user_last_name: None,
            regulatory_decline_reason: None,
            created_at: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "pending_payment")]
    PendingPayment,
    #[serde(rename = "pending_regulatory")]
    PendingRegulatory,
    #[serde(rename = "regulatory_declined")]
    RegulatoryDeclined,
    #[serde(rename = "provisioning")]
    Provisioning,
    #[serde(rename = "verifying")]
    Verifying,
    #[serde(rename = "active")]
    Active,
    #[serde(rename = "suspended")]
    Suspended,
    #[serde(rename = "releasing")]
    Releasing,
    #[serde(rename = "released")]
    Released,
}

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