/*
 * 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.1
 * 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 UpdatePostMetadataRequest {
    /// The platform to update metadata on
    #[serde(rename = "platform")]
    pub platform: Platform,
    /// YouTube video ID (required for direct mode, ignored for post-based mode)
    #[serde(rename = "videoId", skip_serializing_if = "Option::is_none")]
    pub video_id: Option<String>,
    /// Zernio social account ID (required for direct mode, ignored for post-based mode)
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    /// New video title (max 100 characters for YouTube)
    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
    pub title: Option<String>,
    /// New video description
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// Array of keyword tags (max 500 characters combined for YouTube)
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    /// YouTube video category ID
    #[serde(rename = "categoryId", skip_serializing_if = "Option::is_none")]
    pub category_id: Option<String>,
    /// Video privacy setting
    #[serde(rename = "privacyStatus", skip_serializing_if = "Option::is_none")]
    pub privacy_status: Option<PrivacyStatus>,
    /// Public URL of a custom thumbnail image (JPEG, PNG, or GIF, max 2 MB, recommended 1280x720). Works on any video you own, including existing videos not published through Zernio. The channel must be verified (phone verification) to set custom thumbnails.
    #[serde(rename = "thumbnailUrl", skip_serializing_if = "Option::is_none")]
    pub thumbnail_url: Option<String>,
    /// COPPA compliance flag. Set true for child-directed content (restricts comments, notifications, ad targeting).
    #[serde(rename = "madeForKids", skip_serializing_if = "Option::is_none")]
    pub made_for_kids: Option<bool>,
    /// AI-generated content disclosure. Set true if the video contains synthetic content that could be mistaken for real. YouTube may add a label.
    #[serde(
        rename = "containsSyntheticMedia",
        skip_serializing_if = "Option::is_none"
    )]
    pub contains_synthetic_media: Option<bool>,
    /// YouTube playlist ID to add the video to (e.g. 'PLxxxxxxxxxxxxx'). Use GET /v1/accounts/{id}/youtube-playlists to list available playlists. Only playlists owned by the channel are supported.
    #[serde(rename = "playlistId", skip_serializing_if = "Option::is_none")]
    pub playlist_id: Option<String>,
}

impl UpdatePostMetadataRequest {
    pub fn new(platform: Platform) -> UpdatePostMetadataRequest {
        UpdatePostMetadataRequest {
            platform,
            video_id: None,
            account_id: None,
            title: None,
            description: None,
            tags: None,
            category_id: None,
            privacy_status: None,
            thumbnail_url: None,
            made_for_kids: None,
            contains_synthetic_media: None,
            playlist_id: None,
        }
    }
}
/// The platform to update metadata on
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
    #[serde(rename = "youtube")]
    Youtube,
}

impl Default for Platform {
    fn default() -> Platform {
        Self::Youtube
    }
}
/// Video privacy setting
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PrivacyStatus {
    #[serde(rename = "public")]
    Public,
    #[serde(rename = "private")]
    Private,
    #[serde(rename = "unlisted")]
    Unlisted,
}

impl Default for PrivacyStatus {
    fn default() -> PrivacyStatus {
        Self::Public
    }
}
