/*
* 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). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.115.1
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// YouTubePlatformData : Videos under 3 min auto-detected as Shorts. Custom thumbnails for regular videos only. Scheduled videos are uploaded immediately with the specified visibility. There is no description field here: the video description comes from the post content, or from customContent on this platform target when set, and is truncated to 5000 characters.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct YouTubePlatformData {
/// Video title. Defaults to first line of content or \"Untitled Video\". Must be ≤ 100 characters.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// Video visibility: public (default, anyone can watch), unlisted (link only), private (invite only)
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<Visibility>,
/// COPPA compliance flag. Set true for child-directed content (restricts comments, notifications, ad targeting). Defaults to false. YouTube may block views if not explicitly set.
#[serde(rename = "madeForKids", skip_serializing_if = "Option::is_none")]
pub made_for_kids: Option<bool>,
/// Optional first comment to post immediately after video upload. Up to 10,000 characters (YouTube's comment limit).
#[serde(rename = "firstComment", skip_serializing_if = "Option::is_none")]
pub first_comment: Option<String>,
/// 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 video category ID. Defaults to 22 (People & Blogs). Common: 1 (Film), 2 (Autos), 10 (Music), 15 (Pets), 17 (Sports), 20 (Gaming), 23 (Comedy), 24 (Entertainment), 25 (News), 26 (Howto), 27 (Education), 28 (Science & Tech).
#[serde(rename = "categoryId", skip_serializing_if = "Option::is_none")]
pub category_id: Option<String>,
/// Optional YouTube playlist ID to add the video to after upload (e.g. 'PLxxxxxxxxxxxxx'). Use GET /v1/accounts/{id}/youtube-playlists to list available playlists. Works for both immediate and scheduled uploads. Quota cost: 50 YouTube API units per call.
#[serde(rename = "playlistId", skip_serializing_if = "Option::is_none")]
pub playlist_id: Option<String>,
}
impl YouTubePlatformData {
/// Videos under 3 min auto-detected as Shorts. Custom thumbnails for regular videos only. Scheduled videos are uploaded immediately with the specified visibility. There is no description field here: the video description comes from the post content, or from customContent on this platform target when set, and is truncated to 5000 characters.
pub fn new() -> YouTubePlatformData {
YouTubePlatformData {
title: None,
visibility: None,
made_for_kids: None,
first_comment: None,
contains_synthetic_media: None,
category_id: None,
playlist_id: None,
}
}
}
/// Video visibility: public (default, anyone can watch), unlisted (link only), private (invite only)
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Visibility {
#[serde(rename = "public")]
Public,
#[serde(rename = "private")]
Private,
#[serde(rename = "unlisted")]
Unlisted,
}
impl Default for Visibility {
fn default() -> Visibility {
Self::Public
}
}