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

/// InstagramPlatformData : Feed aspect ratio 0.8-1.91, carousels up to 10 items, stories require media (no captions). User tag coordinates 0.0-1.0 from top-left. Images over 8 MB and videos over platform limits are auto-compressed.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InstagramPlatformData {
    /// Set to 'story' to publish as a Story. Default posts become Reels or feed depending on media.
    #[serde(rename = "contentType", skip_serializing_if = "Option::is_none")]
    pub content_type: Option<ContentType>,
    /// For Reels only. When true (default), the Reel appears on both the Reels tab and your main profile feed. Set to false to post to the Reels tab only.
    #[serde(rename = "shareToFeed", skip_serializing_if = "Option::is_none")]
    pub share_to_feed: Option<bool>,
    /// Up to 3 Instagram usernames to invite as collaborators (feed/Reels only)
    #[serde(rename = "collaborators", skip_serializing_if = "Option::is_none")]
    pub collaborators: Option<Vec<String>>,
    /// Optional first comment to add after the post is created (not applied to Stories)
    #[serde(rename = "firstComment", skip_serializing_if = "Option::is_none")]
    pub first_comment: Option<String>,
    #[serde(rename = "trialParams", skip_serializing_if = "Option::is_none")]
    pub trial_params: Option<Box<models::InstagramPlatformDataTrialParams>>,
    /// Tag Instagram users in photos by username and position. Not supported for stories or videos. For carousels, use mediaIndex to target specific slides (defaults to 0). Tags on video items are silently skipped.
    #[serde(rename = "userTags", skip_serializing_if = "Option::is_none")]
    pub user_tags: Option<Vec<models::InstagramPlatformDataUserTagsInner>>,
    /// Custom name for original audio in Reels. Replaces the default \"Original Audio\" label. Can only be set once.
    #[serde(rename = "audioName", skip_serializing_if = "Option::is_none")]
    pub audio_name: Option<String>,
    /// Millisecond offset from video start for the Reel cover frame. Ignored when instagramThumbnail or reelCover is provided. Defaults to 0.
    #[serde(rename = "thumbOffset", skip_serializing_if = "Option::is_none")]
    pub thumb_offset: Option<i32>,
    /// Custom cover image URL for Instagram Reels (JPG or PNG, publicly accessible). Overrides thumbOffset when provided. Also accepted as reelCover (alias).
    #[serde(rename = "instagramThumbnail", skip_serializing_if = "Option::is_none")]
    pub instagram_thumbnail: Option<String>,
    /// Alias for instagramThumbnail. If both are provided, instagramThumbnail takes priority.
    #[serde(rename = "reelCover", skip_serializing_if = "Option::is_none")]
    pub reel_cover: Option<String>,
    /// When true, the post is labeled by Instagram as containing AI-generated media. Per Meta, this self-disclosure label is for AI-generated media, not AI-written captions. Applies to feed posts, Reels, Stories, and carousels.
    #[serde(rename = "isAiGenerated", skip_serializing_if = "Option::is_none")]
    pub is_ai_generated: Option<bool>,
}

impl InstagramPlatformData {
    /// Feed aspect ratio 0.8-1.91, carousels up to 10 items, stories require media (no captions). User tag coordinates 0.0-1.0 from top-left. Images over 8 MB and videos over platform limits are auto-compressed.
    pub fn new() -> InstagramPlatformData {
        InstagramPlatformData {
            content_type: None,
            share_to_feed: None,
            collaborators: None,
            first_comment: None,
            trial_params: None,
            user_tags: None,
            audio_name: None,
            thumb_offset: None,
            instagram_thumbnail: None,
            reel_cover: None,
            is_ai_generated: None,
        }
    }
}
/// Set to 'story' to publish as a Story. Default posts become Reels or feed depending on media.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ContentType {
    #[serde(rename = "story")]
    Story,
}

impl Default for ContentType {
    fn default() -> ContentType {
        Self::Story
    }
}
