/*
* 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).
*
* 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};
/// AdEngagementCounts : The single `engagement` total split into the interactions behind it. Note that `engagement` is not the sum of these: Meta's own `post_engagement` and `page_engagement` totals already contain the individual interactions, and all of them are counted into `engagement`. Use these fields when you need a specific interaction, and `engagement` only as the coarse total it has always been. Populated for Meta and, since 2026-08, TikTok (`reactions` = paid likes, `comments`, `shares`; TikTok's `follow` count lives in `actions.follow`, not here). Other platforms leave these at 0. TikTok history note: paused TikTok ads are not re-synced, so campaigns that ended before the rollout keep 0s here.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AdEngagementCounts {
/// Meta's own post-engagement total (`post_engagement`). Meta-only.
#[serde(rename = "postEngagement", skip_serializing_if = "Option::is_none")]
pub post_engagement: Option<i32>,
/// Meta's own page-engagement total (`page_engagement`). Meta-only.
#[serde(rename = "pageEngagement", skip_serializing_if = "Option::is_none")]
pub page_engagement: Option<i32>,
/// Reactions on the ad's post (`post_reaction`). For TikTok these are its paid likes.
#[serde(rename = "reactions", skip_serializing_if = "Option::is_none")]
pub reactions: Option<i32>,
/// Comments on the ad's post.
#[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
pub comments: Option<i32>,
/// Shares of the ad's post. Meta reports these under the action type literally named `post`; TikTok under `share`.
#[serde(rename = "shares", skip_serializing_if = "Option::is_none")]
pub shares: Option<i32>,
/// Saves of the ad's post (`onsite_conversion.post_save`).
#[serde(rename = "saves", skip_serializing_if = "Option::is_none")]
pub saves: Option<i32>,
/// New Page likes attributed to the ad (`like`).
#[serde(rename = "pageLikes", skip_serializing_if = "Option::is_none")]
pub page_likes: Option<i32>,
/// 3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`.
#[serde(rename = "videoViews", skip_serializing_if = "Option::is_none")]
pub video_views: Option<i32>,
/// Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session count in the sibling `inlineLinkClicks` field.
#[serde(rename = "linkClicks", skip_serializing_if = "Option::is_none")]
pub link_clicks: Option<i32>,
}
impl AdEngagementCounts {
/// The single `engagement` total split into the interactions behind it. Note that `engagement` is not the sum of these: Meta's own `post_engagement` and `page_engagement` totals already contain the individual interactions, and all of them are counted into `engagement`. Use these fields when you need a specific interaction, and `engagement` only as the coarse total it has always been. Populated for Meta and, since 2026-08, TikTok (`reactions` = paid likes, `comments`, `shares`; TikTok's `follow` count lives in `actions.follow`, not here). Other platforms leave these at 0. TikTok history note: paused TikTok ads are not re-synced, so campaigns that ended before the rollout keep 0s here.
pub fn new() -> AdEngagementCounts {
AdEngagementCounts {
post_engagement: None,
page_engagement: None,
reactions: None,
comments: None,
shares: None,
saves: None,
page_likes: None,
video_views: None,
link_clicks: None,
}
}
}