babelforce-manager-sdk 0.44.0

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};

/// QueuedCall : A call currently waiting in a queue
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct QueuedCall {
    /// The unique Identifier (UUID) of the object
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "dateCreated", skip_serializing_if = "Option::is_none")]
    pub date_created: Option<chrono::DateTime<chrono::FixedOffset>>,
    #[serde(rename = "lastUpdated", skip_serializing_if = "Option::is_none")]
    pub last_updated: Option<chrono::DateTime<chrono::FixedOffset>>,
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<String>,
    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
    pub from: Option<String>,
    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
    pub to: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
    pub duration: Option<i32>,
    #[serde(
        rename = "bridged",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub bridged: Option<Option<Box<models::QueuedCallBridged>>>,
}

impl QueuedCall {
    /// A call currently waiting in a queue
    pub fn new(id: uuid::Uuid) -> QueuedCall {
        QueuedCall {
            id,
            date_created: None,
            last_updated: None,
            state: None,
            from: None,
            to: None,
            r#type: None,
            duration: None,
            bridged: None,
        }
    }
}