babelforce-manager-sdk 0.42.1

Rust SDK for the babelforce manager APIs — auth, user & agent management, call reporting, metrics, and task automations.
Documentation
/*
 * Manager API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.0-dev
 * Contact: support@babelforce.com
 * Generated by: https://openapi-generator.tech
 */

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

/// AgentTotalStatus : An agent's total status (enabled, presence, line and outbound state)
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AgentTotalStatus {
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "outbound_status", skip_serializing_if = "Option::is_none")]
    pub outbound_status: Option<OutboundStatus>,
    #[serde(
        rename = "line_status",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub line_status: Option<Option<String>>,
    #[serde(rename = "presence", skip_serializing_if = "Option::is_none")]
    pub presence: Option<Box<models::AgentTotalStatusPresence>>,
    #[serde(
        rename = "activity",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub activity: Option<Option<serde_json::Value>>,
    #[serde(rename = "display_status", skip_serializing_if = "Option::is_none")]
    pub display_status: Option<String>,
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
}

impl AgentTotalStatus {
    /// An agent's total status (enabled, presence, line and outbound state)
    pub fn new() -> AgentTotalStatus {
        AgentTotalStatus {
            enabled: None,
            outbound_status: None,
            line_status: None,
            presence: None,
            activity: None,
            display_status: None,
            available: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum OutboundStatus {
    #[serde(rename = "offline")]
    Offline,
    #[serde(rename = "logging_in")]
    LoggingIn,
    #[serde(rename = "idle")]
    Idle,
    #[serde(rename = "in_progress")]
    InProgress,
    #[serde(rename = "disposition")]
    Disposition,
    #[serde(rename = "waiting")]
    Waiting,
}

impl Default for OutboundStatus {
    fn default() -> OutboundStatus {
        Self::Offline
    }
}