/*
 * 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 GetBroadcast200ResponseBroadcast {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<String>,
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<Box<models::GetBroadcast200ResponseBroadcastMessage>>,
    #[serde(rename = "template", skip_serializing_if = "Option::is_none")]
    pub template: Option<Box<models::GetBroadcast200ResponseBroadcastTemplate>>,
    #[serde(rename = "segmentFilters", skip_serializing_if = "Option::is_none")]
    pub segment_filters: Option<Box<models::ListContacts200ResponseFilters>>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<Status>,
    #[serde(rename = "scheduledAt", skip_serializing_if = "Option::is_none")]
    pub scheduled_at: Option<String>,
    #[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")]
    pub started_at: Option<String>,
    #[serde(rename = "completedAt", skip_serializing_if = "Option::is_none")]
    pub completed_at: Option<String>,
    #[serde(rename = "recipientCount", skip_serializing_if = "Option::is_none")]
    pub recipient_count: Option<i32>,
    #[serde(rename = "sentCount", skip_serializing_if = "Option::is_none")]
    pub sent_count: Option<i32>,
    #[serde(rename = "deliveredCount", skip_serializing_if = "Option::is_none")]
    pub delivered_count: Option<i32>,
    #[serde(rename = "readCount", skip_serializing_if = "Option::is_none")]
    pub read_count: Option<i32>,
    #[serde(rename = "failedCount", skip_serializing_if = "Option::is_none")]
    pub failed_count: Option<i32>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
}

impl GetBroadcast200ResponseBroadcast {
    pub fn new() -> GetBroadcast200ResponseBroadcast {
        GetBroadcast200ResponseBroadcast {
            id: None,
            name: None,
            description: None,
            platform: None,
            account_id: None,
            message: None,
            template: None,
            segment_filters: None,
            status: None,
            scheduled_at: None,
            started_at: None,
            completed_at: None,
            recipient_count: None,
            sent_count: None,
            delivered_count: None,
            read_count: None,
            failed_count: None,
            created_at: None,
            updated_at: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "draft")]
    Draft,
    #[serde(rename = "scheduled")]
    Scheduled,
    #[serde(rename = "sending")]
    Sending,
    #[serde(rename = "completed")]
    Completed,
    #[serde(rename = "failed")]
    Failed,
    #[serde(rename = "cancelled")]
    Cancelled,
}

impl Default for Status {
    fn default() -> Status {
        Self::Draft
    }
}
