babelforce-manager-sdk 0.42.3

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 RestCreateSms {
    /// The unique Identifier (UUID) of the object
    #[serde(rename = "conversationId")]
    pub conversation_id: uuid::Uuid,
    /// The unique Identifier (UUID) of the object
    #[serde(rename = "agentId", skip_serializing_if = "Option::is_none")]
    pub agent_id: Option<uuid::Uuid>,
    #[serde(rename = "type")]
    pub r#type: models::SmsType,
    #[serde(rename = "from")]
    pub from: String,
    #[serde(rename = "to")]
    pub to: String,
    #[serde(rename = "state")]
    pub state: models::SmsState,
    #[serde(rename = "source")]
    pub source: models::SmsSource,
    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
}

impl RestCreateSms {
    pub fn new(
        conversation_id: uuid::Uuid,
        r#type: models::SmsType,
        from: String,
        to: String,
        state: models::SmsState,
        source: models::SmsSource,
    ) -> RestCreateSms {
        RestCreateSms {
            conversation_id,
            agent_id: None,
            r#type,
            from,
            to,
            state,
            source,
            text: None,
        }
    }
}