babelforce-manager-sdk 0.46.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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AgentOutboundCallRequest {
    /// Destination number (the only required field)
    #[serde(rename = "to")]
    pub to: String,
    /// Caller-ID shown to the destination; defaults to the customer's default outbound number
    #[serde(rename = "displayAsTo", skip_serializing_if = "Option::is_none")]
    pub display_as_to: Option<String>,
    /// Caller-ID shown to the agent; defaults to the `to` value
    #[serde(rename = "displayAsFrom", skip_serializing_if = "Option::is_none")]
    pub display_as_from: Option<String>,
    /// Session variables to set on the call
    #[serde(rename = "session", skip_serializing_if = "Option::is_none")]
    pub session: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "autoRecord", skip_serializing_if = "Option::is_none")]
    pub auto_record: Option<bool>,
    #[serde(rename = "webrtc", skip_serializing_if = "Option::is_none")]
    pub webrtc: Option<bool>,
    /// The unique Identifier (UUID) of the object
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<uuid::Uuid>,
    /// The unique Identifier (UUID) of the object
    #[serde(rename = "otherId", skip_serializing_if = "Option::is_none")]
    pub other_id: Option<uuid::Uuid>,
}

impl AgentOutboundCallRequest {
    pub fn new(to: String) -> AgentOutboundCallRequest {
        AgentOutboundCallRequest {
            to,
            display_as_to: None,
            display_as_from: None,
            session: None,
            auto_record: None,
            webrtc: None,
            id: None,
            other_id: None,
        }
    }
}