/*
 * 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 ListInstagramStories200ResponseDataInner {
    /// Instagram media ID of the story.
    #[serde(rename = "id")]
    pub id: String,
    /// IMAGE / VIDEO / CAROUSEL_ALBUM
    #[serde(
        rename = "mediaType",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub media_type: Option<Option<String>>,
    /// Always 'STORY' for this endpoint.
    #[serde(
        rename = "mediaProductType",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub media_product_type: Option<Option<String>>,
    /// Direct media URL. Null if Meta flagged the story for copyright. URL expires when the story expires.
    #[serde(
        rename = "mediaUrl",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub media_url: Option<Option<String>>,
    /// Public Instagram permalink to the story (only viewable while live).
    #[serde(
        rename = "permalink",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub permalink: Option<Option<String>>,
    /// Thumbnail URL for video stories.
    #[serde(
        rename = "thumbnailUrl",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub thumbnail_url: Option<Option<String>>,
    /// When the story was posted.
    #[serde(
        rename = "timestamp",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub timestamp: Option<Option<String>>,
}

impl ListInstagramStories200ResponseDataInner {
    pub fn new(id: String) -> ListInstagramStories200ResponseDataInner {
        ListInstagramStories200ResponseDataInner {
            id,
            media_type: None,
            media_product_type: None,
            media_url: None,
            permalink: None,
            thumbnail_url: None,
            timestamp: None,
        }
    }
}
