/*
* 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.15.0
* 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 ValidatePostRequestPlatformsInner {
#[serde(rename = "platform")]
pub platform: Platform,
/// Account to validate against. For twitter, resolves X Premium status to apply the 25000 character limit instead of 280.
#[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "customContent", skip_serializing_if = "Option::is_none")]
pub custom_content: Option<String>,
#[serde(
rename = "platformSpecificData",
skip_serializing_if = "Option::is_none"
)]
pub platform_specific_data: Option<serde_json::Value>,
#[serde(rename = "customMedia", skip_serializing_if = "Option::is_none")]
pub custom_media: Option<Vec<models::MediaItem>>,
}
impl ValidatePostRequestPlatformsInner {
pub fn new(platform: Platform) -> ValidatePostRequestPlatformsInner {
ValidatePostRequestPlatformsInner {
platform,
account_id: None,
custom_content: None,
platform_specific_data: None,
custom_media: None,
}
}
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
#[serde(rename = "twitter")]
Twitter,
#[serde(rename = "instagram")]
Instagram,
#[serde(rename = "tiktok")]
Tiktok,
#[serde(rename = "youtube")]
Youtube,
#[serde(rename = "facebook")]
Facebook,
#[serde(rename = "linkedin")]
Linkedin,
#[serde(rename = "bluesky")]
Bluesky,
#[serde(rename = "threads")]
Threads,
#[serde(rename = "reddit")]
Reddit,
#[serde(rename = "pinterest")]
Pinterest,
#[serde(rename = "telegram")]
Telegram,
#[serde(rename = "snapchat")]
Snapchat,
#[serde(rename = "googlebusiness")]
Googlebusiness,
#[serde(rename = "discord")]
Discord,
#[serde(rename = "slack")]
Slack,
}
impl Default for Platform {
fn default() -> Platform {
Self::Twitter
}
}