/*
 * 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.4
 * 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 ListWhatsAppConversions200ResponseEventsInner {
    /// When the event was sent to Meta.
    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
    /// One of LeadSubmitted, Purchase, AddToCart, InitiateCheckout, ViewContent.
    #[serde(rename = "eventName", skip_serializing_if = "Option::is_none")]
    pub event_name: Option<String>,
    #[serde(rename = "conversationId", skip_serializing_if = "Option::is_none")]
    pub conversation_id: Option<String>,
    /// Number of events Meta accepted on this send (usually 1).
    #[serde(rename = "eventsReceived", skip_serializing_if = "Option::is_none")]
    pub events_received: Option<i32>,
    /// Number of events Meta rejected (usually 0).
    #[serde(rename = "eventsFailed", skip_serializing_if = "Option::is_none")]
    pub events_failed: Option<i32>,
    /// Meta fbtrace_id for cross-referencing in Events Manager.
    #[serde(rename = "traceId", skip_serializing_if = "Option::is_none")]
    pub trace_id: Option<String>,
    #[serde(rename = "durationMs", skip_serializing_if = "Option::is_none")]
    pub duration_ms: Option<i32>,
}

impl ListWhatsAppConversions200ResponseEventsInner {
    pub fn new() -> ListWhatsAppConversions200ResponseEventsInner {
        ListWhatsAppConversions200ResponseEventsInner {
            timestamp: None,
            event_name: None,
            conversation_id: None,
            events_received: None,
            events_failed: None,
            trace_id: None,
            duration_ms: None,
        }
    }
}
