late 0.0.887

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

/// AnalyticsDeltaEntryMetrics : Metrics a platform does not report are 0, not absent.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AnalyticsDeltaEntryMetrics {
    #[serde(rename = "impressions")]
    pub impressions: i32,
    #[serde(rename = "reach")]
    pub reach: i32,
    #[serde(rename = "likes")]
    pub likes: i32,
    #[serde(rename = "comments")]
    pub comments: i32,
    #[serde(rename = "shares")]
    pub shares: i32,
    #[serde(rename = "saves")]
    pub saves: i32,
    #[serde(rename = "sends")]
    pub sends: i32,
    #[serde(rename = "clicks")]
    pub clicks: i32,
    #[serde(rename = "views")]
    pub views: i32,
    /// Follows attributed to this post (Instagram)
    #[serde(rename = "follows")]
    pub follows: i32,
    /// Instagram Reels average watch time, in milliseconds
    #[serde(rename = "igReelsAvgWatchTime")]
    pub ig_reels_avg_watch_time: i32,
    /// Instagram Reels total watch time, in milliseconds
    #[serde(rename = "igReelsVideoViewTotalTime")]
    pub ig_reels_video_view_total_time: i32,
    #[serde(rename = "reposts")]
    pub reposts: i32,
    /// Instagram Reels skip rate, 0 to 1
    #[serde(rename = "reelsSkipRate")]
    pub reels_skip_rate: f64,
}

impl AnalyticsDeltaEntryMetrics {
    /// Metrics a platform does not report are 0, not absent.
    pub fn new(
        impressions: i32,
        reach: i32,
        likes: i32,
        comments: i32,
        shares: i32,
        saves: i32,
        sends: i32,
        clicks: i32,
        views: i32,
        follows: i32,
        ig_reels_avg_watch_time: i32,
        ig_reels_video_view_total_time: i32,
        reposts: i32,
        reels_skip_rate: f64,
    ) -> AnalyticsDeltaEntryMetrics {
        AnalyticsDeltaEntryMetrics {
            impressions,
            reach,
            likes,
            comments,
            shares,
            saves,
            sends,
            clicks,
            views,
            follows,
            ig_reels_avg_watch_time,
            ig_reels_video_view_total_time,
            reposts,
            reels_skip_rate,
        }
    }
}