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 RestCreateAgent {
    /// The ID of the external System the Agent was created from
    #[serde(rename = "sourceId", skip_serializing_if = "Option::is_none")]
    pub source_id: Option<String>,
    /// The Identifier for the external System the Agent was created from
    #[serde(rename = "agentSource", skip_serializing_if = "Option::is_none")]
    pub agent_source: Option<String>,
    /// The Agent Name
    #[serde(rename = "name")]
    pub name: String,
    /// The Agents Login
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// The Agents current active Telephone-Number
    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
    pub number: Option<String>,
    /// Whether the Agent is able to receive Calls via Queue or not
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
    pub state: Option<models::AgentLineStatus>,
    #[serde(rename = "presence", skip_serializing_if = "Option::is_none")]
    pub presence: Option<Box<models::AgentPresence>>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Box<models::AgentStatus>>,
    /// The agent's current activity.
    #[serde(rename = "activity", skip_serializing_if = "Option::is_none")]
    pub activity: Option<String>,
    /// Human-readable status label for display.
    #[serde(rename = "display_status", skip_serializing_if = "Option::is_none")]
    pub display_status: Option<String>,
    /// Whether the agent is currently available to take calls.
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
    /// A List of Tags describing an Object
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    #[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
    pub groups: Option<Vec<models::AgentGroupReference>>,
    /// Whether WebRTC is enabed for that Agent or not
    #[serde(rename = "webrtc", skip_serializing_if = "Option::is_none")]
    pub webrtc: Option<bool>,
    /// A List of features which are enabled for that particular Agent
    #[serde(rename = "features", skip_serializing_if = "Option::is_none")]
    pub features: Option<Vec<String>>,
}

impl RestCreateAgent {
    pub fn new(name: String) -> RestCreateAgent {
        RestCreateAgent {
            source_id: None,
            agent_source: None,
            name,
            email: None,
            number: None,
            enabled: None,
            state: None,
            presence: None,
            status: None,
            activity: None,
            display_status: None,
            available: None,
            tags: None,
            groups: None,
            webrtc: None,
            features: None,
        }
    }
}