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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GlobalQueueSelection {
    /// The unique Identifier (UUID) of the object
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
    pub label: Option<String>,
    #[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
    pub priority: Option<i32>,
    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
    #[serde(
        rename = "queue",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub queue: Option<Option<Box<models::GlobalQueueSelectionQueue>>>,
    #[serde(
        rename = "trigger",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub trigger: Option<Option<Box<models::GlobalQueueSelectionTrigger>>>,
    /// Only present when includeMembers=true
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
    /// Only present when includeMembers=true
    #[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
    pub groups: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
    /// Only present when includeMembers=true
    #[serde(rename = "agents", skip_serializing_if = "Option::is_none")]
    pub agents: Option<Vec<std::collections::HashMap<String, serde_json::Value>>>,
}

impl GlobalQueueSelection {
    pub fn new(id: uuid::Uuid) -> GlobalQueueSelection {
        GlobalQueueSelection {
            id,
            label: None,
            priority: None,
            enabled: None,
            queue: None,
            trigger: None,
            tags: None,
            groups: None,
            agents: None,
        }
    }
}