one-msg-sdk 2.0.2

Official Rust SDK for the 1msg WhatsApp Business API
/*
 * 1MSG WhatsApp Business API (Public)
 *
 * Public client API for sending messages, managing groups, flows, and templates.  This is the API exposed to end customers via platform.1msg.io  **Authentication:** All requests require `token` query parameter with JWT or API key.  **Documentation:** https://help.1msg.io/platform-1msg/getting-start/quick-start **API Docs:** https://docs.1msg.io/ 
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: support@1msg.io
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// CallingSettingsCalling : Calling feature configuration for the business phone number
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CallingSettingsCalling {
    /// Enable or disable Calling API on this number
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    /// Controls call icon visibility in the WhatsApp client
    #[serde(rename = "call_icon_visibility", skip_serializing_if = "Option::is_none")]
    pub call_icon_visibility: Option<CallIconVisibility>,
    /// When ENABLED, a user who calls your business automatically grants call permission for business-initiated callbacks (subject to Meta rules). 
    #[serde(rename = "callback_permission_status", skip_serializing_if = "Option::is_none")]
    pub callback_permission_status: Option<CallbackPermissionStatus>,
    /// SRTP key exchange. DTLS is default/recommended. SDES is only valid when SIP signaling is enabled. 
    #[serde(rename = "srtp_key_exchange_protocol", skip_serializing_if = "Option::is_none")]
    pub srtp_key_exchange_protocol: Option<SrtpKeyExchangeProtocol>,
    #[serde(rename = "call_hours", skip_serializing_if = "Option::is_none")]
    pub call_hours: Option<models::CallingSettingsCallingCallHours>,
    #[serde(rename = "sip", skip_serializing_if = "Option::is_none")]
    pub sip: Option<models::CallingSettingsCallingSip>,
    #[serde(rename = "video", skip_serializing_if = "Option::is_none")]
    pub video: Option<models::CallingSettingsCallingVideo>,
    #[serde(rename = "audio", skip_serializing_if = "Option::is_none")]
    pub audio: Option<models::CallingSettingsCallingAudio>,
    /// Calling restrictions (response-only)
    #[serde(rename = "restrictions", skip_serializing_if = "Option::is_none")]
    pub restrictions: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// Meta media IP ranges (response-only)
    #[serde(rename = "ip_addresses", skip_serializing_if = "Option::is_none")]
    pub ip_addresses: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// Call icon country restrictions (response-only)
    #[serde(rename = "call_icons", skip_serializing_if = "Option::is_none")]
    pub call_icons: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl CallingSettingsCalling {
    /// Calling feature configuration for the business phone number
    pub fn new() -> CallingSettingsCalling {
        CallingSettingsCalling {
            status: None,
            call_icon_visibility: None,
            callback_permission_status: None,
            srtp_key_exchange_protocol: None,
            call_hours: None,
            sip: None,
            video: None,
            audio: None,
            restrictions: None,
            ip_addresses: None,
            call_icons: None,
        }
    }
}
/// Enable or disable Calling API on this number
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "ENABLED")]
    Enabled,
    #[serde(rename = "DISABLED")]
    Disabled,
}

impl Default for Status {
    fn default() -> Status {
        Self::Enabled
    }
}
/// Controls call icon visibility in the WhatsApp client
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CallIconVisibility {
    #[serde(rename = "DEFAULT")]
    Default,
    #[serde(rename = "DISABLE_ALL")]
    DisableAll,
}

impl Default for CallIconVisibility {
    fn default() -> CallIconVisibility {
        Self::Default
    }
}
/// When ENABLED, a user who calls your business automatically grants call permission for business-initiated callbacks (subject to Meta rules). 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CallbackPermissionStatus {
    #[serde(rename = "ENABLED")]
    Enabled,
    #[serde(rename = "DISABLED")]
    Disabled,
}

impl Default for CallbackPermissionStatus {
    fn default() -> CallbackPermissionStatus {
        Self::Enabled
    }
}
/// SRTP key exchange. DTLS is default/recommended. SDES is only valid when SIP signaling is enabled. 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SrtpKeyExchangeProtocol {
    #[serde(rename = "DTLS")]
    Dtls,
    #[serde(rename = "SDES")]
    Sdes,
}

impl Default for SrtpKeyExchangeProtocol {
    fn default() -> SrtpKeyExchangeProtocol {
        Self::Dtls
    }
}