/*
 * 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 SendWhatsAppConversion200Response {
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<Platform>,
    /// Events accepted by Meta.
    #[serde(rename = "eventsReceived", skip_serializing_if = "Option::is_none")]
    pub events_received: Option<i32>,
    /// Events rejected by Meta (see failures).
    #[serde(rename = "eventsFailed", skip_serializing_if = "Option::is_none")]
    pub events_failed: Option<i32>,
    /// Per-event failure detail. Empty when all events were accepted.
    #[serde(rename = "failures", skip_serializing_if = "Option::is_none")]
    pub failures: Option<Vec<models::SendConversions200ResponseFailuresInner>>,
    /// Meta `fbtrace_id` for debugging. Surface in support tickets.
    #[serde(rename = "traceId", skip_serializing_if = "Option::is_none")]
    pub trace_id: Option<String>,
}

impl SendWhatsAppConversion200Response {
    pub fn new() -> SendWhatsAppConversion200Response {
        SendWhatsAppConversion200Response {
            platform: None,
            events_received: None,
            events_failed: None,
            failures: None,
            trace_id: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
    #[serde(rename = "metaads")]
    Metaads,
}

impl Default for Platform {
    fn default() -> Platform {
        Self::Metaads
    }
}
