late 0.0.1055

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api  Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal.  Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).  Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
 *
 * The version of the OpenAPI document: 1.104.0
 * 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 GetWhatsAppCalling200Response {
    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
    pub phone_number: Option<String>,
    #[serde(rename = "callingEnabled", skip_serializing_if = "Option::is_none")]
    pub calling_enabled: Option<bool>,
    /// Public calling deep link (https://wa.me/call/<number>). Null while calling is disabled.
    #[serde(
        rename = "callDeepLink",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub call_deep_link: Option<Option<String>>,
    /// tel:+E164 / sip:... / wss://... destination
    #[serde(
        rename = "forwardTo",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub forward_to: Option<Option<String>>,
    #[serde(rename = "recordingEnabled", skip_serializing_if = "Option::is_none")]
    pub recording_enabled: Option<bool>,
    #[serde(
        rename = "sipAuthUsername",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub sip_auth_username: Option<Option<String>>,
    /// True when a SIP digest password is stored. The plaintext is never returned.
    #[serde(
        rename = "sipAuthPasswordConfigured",
        skip_serializing_if = "Option::is_none"
    )]
    pub sip_auth_password_configured: Option<bool>,
    #[serde(
        rename = "callIconCountries",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub call_icon_countries: Option<Option<Vec<String>>>,
    /// True when the number's country blocks business-initiated (outbound) WhatsApp calling; inbound still works.
    #[serde(rename = "outboundDisabled", skip_serializing_if = "Option::is_none")]
    pub outbound_disabled: Option<bool>,
    /// Caller ID the forward-leg callee sees on tel: forwards. business = this WhatsApp number; platform = a Zernio number (used when the number was brought by the customer and its caller ID is not verified for PSTN origination).
    #[serde(rename = "callerIdMode", skip_serializing_if = "Option::is_none")]
    pub caller_id_mode: Option<CallerIdMode>,
    /// True once the number completed caller-ID verification, making tel: forwards display the business number itself.
    #[serde(rename = "callerIdVerified", skip_serializing_if = "Option::is_none")]
    pub caller_id_verified: Option<bool>,
    /// Hard cap (seconds) on forwarded calls; null = no cap.
    #[serde(
        rename = "maxCallDurationSeconds",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub max_call_duration_seconds: Option<Option<i32>>,
    #[serde(rename = "forwardCallerId", skip_serializing_if = "Option::is_none")]
    pub forward_caller_id: Option<ForwardCallerId>,
}

impl GetWhatsAppCalling200Response {
    pub fn new() -> GetWhatsAppCalling200Response {
        GetWhatsAppCalling200Response {
            phone_number: None,
            calling_enabled: None,
            call_deep_link: None,
            forward_to: None,
            recording_enabled: None,
            sip_auth_username: None,
            sip_auth_password_configured: None,
            call_icon_countries: None,
            outbound_disabled: None,
            caller_id_mode: None,
            caller_id_verified: None,
            max_call_duration_seconds: None,
            forward_caller_id: None,
        }
    }
}
/// Caller ID the forward-leg callee sees on tel: forwards. business = this WhatsApp number; platform = a Zernio number (used when the number was brought by the customer and its caller ID is not verified for PSTN origination).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CallerIdMode {
    #[serde(rename = "business")]
    Business,
    #[serde(rename = "platform")]
    Platform,
}

impl Default for CallerIdMode {
    fn default() -> CallerIdMode {
        Self::Business
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ForwardCallerId {
    #[serde(rename = "business")]
    Business,
    #[serde(rename = "caller")]
    Caller,
}

impl Default for ForwardCallerId {
    fn default() -> ForwardCallerId {
        Self::Business
    }
}