/*
 * 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 GetInstagramStoryInsights200ResponseData {
    #[serde(rename = "source")]
    pub source: Source,
    #[serde(rename = "metrics")]
    pub metrics: Box<models::GetInstagramStoryInsights200ResponseDataMetrics>,
}

impl GetInstagramStoryInsights200ResponseData {
    pub fn new(
        source: Source,
        metrics: models::GetInstagramStoryInsights200ResponseDataMetrics,
    ) -> GetInstagramStoryInsights200ResponseData {
        GetInstagramStoryInsights200ResponseData {
            source,
            metrics: Box::new(metrics),
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Source {
    #[serde(rename = "live")]
    Live,
    #[serde(rename = "cached")]
    Cached,
    #[serde(rename = "unavailable")]
    Unavailable,
}

impl Default for Source {
    fn default() -> Source {
        Self::Live
    }
}
