zernio 0.0.76

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateWhatsAppBroadcastRequest {
    /// WhatsApp social account ID
    #[serde(rename = "accountId")]
    pub account_id: String,
    /// Broadcast name
    #[serde(rename = "name")]
    pub name: String,
    /// Broadcast description
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "template")]
    pub template: Box<models::SendWhatsAppBulkRequestTemplate>,
    /// Initial recipients (optional)
    #[serde(rename = "recipients", skip_serializing_if = "Option::is_none")]
    pub recipients: Option<Vec<models::CreateWhatsAppBroadcastRequestRecipientsInner>>,
}

impl CreateWhatsAppBroadcastRequest {
    pub fn new(
        account_id: String,
        name: String,
        template: models::SendWhatsAppBulkRequestTemplate,
    ) -> CreateWhatsAppBroadcastRequest {
        CreateWhatsAppBroadcastRequest {
            account_id,
            name,
            description: None,
            template: Box::new(template),
            recipients: None,
        }
    }
}