/*
 * 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 ListPhoneNumberPortIns200ResponseOrdersInner {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// Raw carrier status string.
    #[serde(
        rename = "telnyxStatusValue",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub telnyx_status_value: Option<Option<String>>,
    #[serde(rename = "phoneNumbers", skip_serializing_if = "Option::is_none")]
    pub phone_numbers: Option<Vec<String>>,
    #[serde(
        rename = "fastPortEligible",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub fast_port_eligible: Option<Option<bool>>,
    #[serde(
        rename = "focDatetimeRequested",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub foc_datetime_requested: Option<Option<String>>,
    #[serde(
        rename = "focDatetimeActual",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub foc_datetime_actual: 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 = "submittedAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub submitted_at: Option<Option<String>>,
    #[serde(
        rename = "portedAt",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub ported_at: Option<Option<String>>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
}

impl ListPhoneNumberPortIns200ResponseOrdersInner {
    pub fn new() -> ListPhoneNumberPortIns200ResponseOrdersInner {
        ListPhoneNumberPortIns200ResponseOrdersInner {
            id: None,
            status: None,
            telnyx_status_value: None,
            phone_numbers: None,
            fast_port_eligible: None,
            foc_datetime_requested: None,
            foc_datetime_actual: None,
            decline_reason: None,
            submitted_at: None,
            ported_at: None,
            created_at: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "draft")]
    Draft,
    #[serde(rename = "pending")]
    Pending,
    #[serde(rename = "foc_confirmed")]
    FocConfirmed,
    #[serde(rename = "ported")]
    Ported,
    #[serde(rename = "exception")]
    Exception,
    #[serde(rename = "cancelled")]
    Cancelled,
}

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