ElasticEmail 4.2.0

Official Rust SDK for the Elastic Email REST API v4
Documentation
/*
 * Elastic Email REST API
 *
 * This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach.    Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used.    The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request.    To start using this API, you will need your Access Token (available <a target='_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'>here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description.    Downloadable library clients can be found in our Github repository <a target='_blank' href='https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme'>here</a>
 *
 * The version of the OpenAPI document: 4.0.0
 * Contact: support@elasticemail.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EmailJobStatus {
    /// ID number of your attachment
    #[serde(rename = "ID", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Name of status: submitted, complete, in_progress
    #[serde(rename = "Status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    #[serde(rename = "RecipientsCount", skip_serializing_if = "Option::is_none")]
    pub recipients_count: Option<i32>,
    #[serde(rename = "Failed", skip_serializing_if = "Option::is_none")]
    pub failed: Option<Vec<models::EmailJobFailedStatus>>,
    /// Total emails failed.
    #[serde(rename = "FailedCount", skip_serializing_if = "Option::is_none")]
    pub failed_count: Option<i32>,
    #[serde(rename = "Sent", skip_serializing_if = "Option::is_none")]
    pub sent: Option<Vec<String>>,
    /// Total emails sent.
    #[serde(rename = "SentCount", skip_serializing_if = "Option::is_none")]
    pub sent_count: Option<i32>,
    /// Number of delivered messages
    #[serde(rename = "Delivered", skip_serializing_if = "Option::is_none")]
    pub delivered: Option<Vec<String>>,
    #[serde(rename = "DeliveredCount", skip_serializing_if = "Option::is_none")]
    pub delivered_count: Option<i32>,
    #[serde(rename = "Pending", skip_serializing_if = "Option::is_none")]
    pub pending: Option<Vec<String>>,
    #[serde(rename = "PendingCount", skip_serializing_if = "Option::is_none")]
    pub pending_count: Option<i32>,
    /// Number of opened messages
    #[serde(rename = "Opened", skip_serializing_if = "Option::is_none")]
    pub opened: Option<Vec<String>>,
    /// Total emails opened.
    #[serde(rename = "OpenedCount", skip_serializing_if = "Option::is_none")]
    pub opened_count: Option<i32>,
    /// Number of clicked messages
    #[serde(rename = "Clicked", skip_serializing_if = "Option::is_none")]
    pub clicked: Option<Vec<String>>,
    /// Total emails clicked
    #[serde(rename = "ClickedCount", skip_serializing_if = "Option::is_none")]
    pub clicked_count: Option<i32>,
    /// Number of unsubscribed messages
    #[serde(rename = "Unsubscribed", skip_serializing_if = "Option::is_none")]
    pub unsubscribed: Option<Vec<String>>,
    /// Total emails unsubscribed
    #[serde(rename = "UnsubscribedCount", skip_serializing_if = "Option::is_none")]
    pub unsubscribed_count: Option<i32>,
    #[serde(rename = "AbuseReports", skip_serializing_if = "Option::is_none")]
    pub abuse_reports: Option<Vec<String>>,
    #[serde(rename = "AbuseReportsCount", skip_serializing_if = "Option::is_none")]
    pub abuse_reports_count: Option<i32>,
    /// List of all MessageIDs for this job.
    #[serde(rename = "MessageIDs", skip_serializing_if = "Option::is_none")]
    pub message_ids: Option<Vec<String>>,
}

impl EmailJobStatus {
    pub fn new() -> EmailJobStatus {
        EmailJobStatus {
            id: None,
            status: None,
            recipients_count: None,
            failed: None,
            failed_count: None,
            sent: None,
            sent_count: None,
            delivered: None,
            delivered_count: None,
            pending: None,
            pending_count: None,
            opened: None,
            opened_count: None,
            clicked: None,
            clicked_count: None,
            unsubscribed: None,
            unsubscribed_count: None,
            abuse_reports: None,
            abuse_reports_count: None,
            message_ids: None,
        }
    }
}