/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.115.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// WebhookPayloadReferralReferral : Meta's referral object, forwarded verbatim. Same shape as `metadata.referral` on `message.received`: `ref` + `source` for ig.me / m.me links, `ad_id` + `ads_context_data` for returning Messenger ad clicks.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadReferralReferral {
/// The `ref` parameter of the clicked ig.me / m.me link or ad.
#[serde(rename = "ref", skip_serializing_if = "Option::is_none")]
pub r#ref: Option<String>,
/// Meta-supplied source (`SHORTLINK`, `SHORTLINKS`, `IGME-SOURCE-LINK`, `ADS` - treat as opaque).
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
/// Meta-supplied referral type (e.g. `OPEN_THREAD`).
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<String>,
/// URI of the originating site, when Meta supplies one. Facebook Messenger only.
#[serde(rename = "referer_uri", skip_serializing_if = "Option::is_none")]
pub referer_uri: Option<String>,
/// The Meta ad ID, on returning ad clicks. Facebook Messenger only.
#[serde(rename = "ad_id", skip_serializing_if = "Option::is_none")]
pub ad_id: Option<String>,
#[serde(rename = "ads_context_data", skip_serializing_if = "Option::is_none")]
pub ads_context_data: Option<Box<models::WebhookPayloadReferralReferralAdsContextData>>,
}
impl WebhookPayloadReferralReferral {
/// Meta's referral object, forwarded verbatim. Same shape as `metadata.referral` on `message.received`: `ref` + `source` for ig.me / m.me links, `ad_id` + `ads_context_data` for returning Messenger ad clicks.
pub fn new() -> WebhookPayloadReferralReferral {
WebhookPayloadReferralReferral {
r#ref: None,
source: None,
r#type: None,
referer_uri: None,
ad_id: None,
ads_context_data: None,
}
}
}