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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SwitchNodeApplication {
    /// The unique Identifier (UUID) of the object
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "friendlyName", skip_serializing_if = "Option::is_none")]
    pub friendly_name: Option<String>,
    #[serde(rename = "enabled")]
    pub enabled: bool,
    #[serde(rename = "dateCreated")]
    pub date_created: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "lastUpdated")]
    pub last_updated: chrono::DateTime<chrono::FixedOffset>,
    /// A List of Tags describing an Object
    #[serde(rename = "tags")]
    pub tags: Vec<String>,
    #[serde(rename = "routings")]
    pub routings: Vec<models::ApplicationRouting>,
    #[serde(rename = "settings")]
    pub settings: Box<models::SwitchNodeApplicationSettings>,
    #[serde(rename = "module")]
    pub module: Module,
}

impl SwitchNodeApplication {
    pub fn new(
        id: uuid::Uuid,
        name: String,
        enabled: bool,
        date_created: chrono::DateTime<chrono::FixedOffset>,
        last_updated: chrono::DateTime<chrono::FixedOffset>,
        tags: Vec<String>,
        routings: Vec<models::ApplicationRouting>,
        settings: models::SwitchNodeApplicationSettings,
        module: Module,
    ) -> SwitchNodeApplication {
        SwitchNodeApplication {
            id,
            name,
            friendly_name: None,
            enabled,
            date_created,
            last_updated,
            tags,
            routings,
            settings: Box::new(settings),
            module,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Module {
    #[serde(rename = "switchNode")]
    SwitchNode,
}

impl Default for Module {
    fn default() -> Module {
        Self::SwitchNode
    }
}