/*
* 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).
*
* 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};
/// RedditPlatformData : Posts are either link (with URL/media), native video (via nativeVideo), or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RedditPlatformData {
/// Target subreddit name (without \"r/\" prefix). Overrides the default. Use GET /v1/accounts/{id}/reddit-subreddits to list options.
#[serde(rename = "subreddit", skip_serializing_if = "Option::is_none")]
pub subreddit: Option<String>,
/// Post title. Defaults to the first line of content, truncated to 300 characters.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// URL for link posts. If provided (and forceSelf is not true), creates a link post instead of a text post.
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// When true, creates a text/self post even when a URL or media is provided.
#[serde(rename = "forceSelf", skip_serializing_if = "Option::is_none")]
pub force_self: Option<bool>,
/// Flair ID for the post. Required by some subreddits. Use GET /v1/accounts/{id}/reddit-flairs?subreddit=name to list flairs.
#[serde(rename = "flairId", skip_serializing_if = "Option::is_none")]
pub flair_id: Option<String>,
/// Custom flair text, for subreddits that allow free-text flair. Ignored when flairId is provided (flairId wins).
#[serde(rename = "flairText", skip_serializing_if = "Option::is_none")]
pub flair_text: Option<String>,
/// Mark the post as NSFW (Not Safe For Work / over 18).
#[serde(rename = "nsfw", skip_serializing_if = "Option::is_none")]
pub nsfw: Option<bool>,
/// Mark the post as a spoiler. The subreddit must have spoiler tagging enabled for this to take effect.
#[serde(rename = "spoiler", skip_serializing_if = "Option::is_none")]
pub spoiler: Option<bool>,
/// Whether to receive inbox replies for comments on this post. Set to false to opt out.
#[serde(rename = "sendreplies", skip_serializing_if = "Option::is_none")]
pub sendreplies: Option<bool>,
/// Controls Reddit's native video upload flow. When true (default for video mediaItems), the video is uploaded to Reddit's CDN and submitted with kind=video so it renders as an embedded Reddit video player. Reddit transcodes server-side (1080p/30fps cap). Set to false to fall back to a legacy link post. If the subreddit blocks video posts, the upload falls back to a link post automatically.
#[serde(rename = "nativeVideo", skip_serializing_if = "Option::is_none")]
pub native_video: Option<bool>,
/// When true (and nativeVideo is active), submits the video as a silent videogif (kind=videogif). Use for short looping clips without audio.
#[serde(rename = "videogif", skip_serializing_if = "Option::is_none")]
pub videogif: Option<bool>,
/// Optional poster/thumbnail image URL for native video posts. If omitted, the first frame of the video is extracted and used automatically.
#[serde(rename = "videoPosterUrl", skip_serializing_if = "Option::is_none")]
pub video_poster_url: Option<String>,
}
impl RedditPlatformData {
/// Posts are either link (with URL/media), native video (via nativeVideo), or self (text-only). Use forceSelf to override. Subreddit defaults to the account's configured one. Some subreddits require a flair.
pub fn new() -> RedditPlatformData {
RedditPlatformData {
subreddit: None,
title: None,
url: None,
force_self: None,
flair_id: None,
flair_text: None,
nsfw: None,
spoiler: None,
sendreplies: None,
native_video: None,
videogif: None,
video_poster_url: None,
}
}
}