/*
 * 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};

/// WebhookPayloadMessageMetadataReferral : WhatsApp only. Click-to-WhatsApp (CTWA) ad attribution. Present only on the FIRST inbound message after a user reaches the business via a CTWA ad. Forwarded verbatim from Meta's referral envelope so it can be replayed to the Conversions API for Business Messaging. Attribution window is 7 days from click.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadMessageMetadataReferral {
    /// Meta's GCLID-equivalent click identifier.
    #[serde(rename = "ctwa_clid", skip_serializing_if = "Option::is_none")]
    pub ctwa_clid: Option<String>,
    #[serde(rename = "source_id", skip_serializing_if = "Option::is_none")]
    pub source_id: Option<String>,
    #[serde(rename = "source_type", skip_serializing_if = "Option::is_none")]
    pub source_type: Option<String>,
    #[serde(rename = "source_url", skip_serializing_if = "Option::is_none")]
    pub source_url: Option<String>,
    #[serde(rename = "headline", skip_serializing_if = "Option::is_none")]
    pub headline: Option<String>,
    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
    pub body: Option<String>,
    #[serde(rename = "media_type", skip_serializing_if = "Option::is_none")]
    pub media_type: Option<String>,
    #[serde(rename = "image_url", skip_serializing_if = "Option::is_none")]
    pub image_url: Option<String>,
    #[serde(rename = "video_url", skip_serializing_if = "Option::is_none")]
    pub video_url: Option<String>,
    #[serde(rename = "thumbnail_url", skip_serializing_if = "Option::is_none")]
    pub thumbnail_url: Option<String>,
}

impl WebhookPayloadMessageMetadataReferral {
    /// WhatsApp only. Click-to-WhatsApp (CTWA) ad attribution. Present only on the FIRST inbound message after a user reaches the business via a CTWA ad. Forwarded verbatim from Meta's referral envelope so it can be replayed to the Conversions API for Business Messaging. Attribution window is 7 days from click.
    pub fn new() -> WebhookPayloadMessageMetadataReferral {
        WebhookPayloadMessageMetadataReferral {
            ctwa_clid: None,
            source_id: None,
            source_type: None,
            source_url: None,
            headline: None,
            body: None,
            media_type: None,
            image_url: None,
            video_url: None,
            thumbnail_url: None,
        }
    }
}
