late 0.0.1364

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.
Documentation
/*
 * 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.563.0
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// DiscordPlatformData : Discord message settings.  - Content: plain text (2,000 chars), rich embeds (up to 10), native polls, forum posts, threads, and announcement crossposts. - Media: images (JPEG, PNG, GIF, WebP), videos (MP4), and documents (up to 10 files, 25 MB each). - Webhook identity (username + avatar): customize per account via PATCH /v1/connect/discord, or per post via webhookUsername/webhookAvatarUrl.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DiscordPlatformData {
    /// Target channel snowflake ID. Determines which channel in the connected server receives the message.
    #[serde(rename = "channelId")]
    pub channel_id: String,
    /// Up to 10 Discord embed objects (combined max 6,000 characters across all embeds). Sent alongside or instead of plain-text content.
    #[serde(rename = "embeds", skip_serializing_if = "Option::is_none")]
    pub embeds: Option<Vec<models::DiscordPlatformDataEmbedsInner>>,
    #[serde(rename = "poll", skip_serializing_if = "Option::is_none")]
    pub poll: Option<Box<models::DiscordPlatformDataPoll>>,
    /// Auto-crosspost to every server following this announcement channel (type 5). No-op for regular text channels.
    #[serde(rename = "crosspost", skip_serializing_if = "Option::is_none")]
    pub crosspost: Option<bool>,
    /// Thread title for forum channel posts (type 15). Required when posting to a forum channel.
    #[serde(rename = "forumThreadName", skip_serializing_if = "Option::is_none")]
    pub forum_thread_name: Option<String>,
    /// Tag snowflake IDs to apply to forum posts. Max 5 tags.
    #[serde(rename = "forumAppliedTags", skip_serializing_if = "Option::is_none")]
    pub forum_applied_tags: Option<Vec<String>>,
    #[serde(rename = "threadFromMessage", skip_serializing_if = "Option::is_none")]
    pub thread_from_message: Option<Box<models::DiscordPlatformDataThreadFromMessage>>,
    /// Send as text-to-speech message. Discord reads the message aloud in the channel.
    #[serde(rename = "tts", skip_serializing_if = "Option::is_none")]
    pub tts: Option<bool>,
    /// Override the webhook display name for this post only (1-80 chars). Falls back to the account-level default set via PATCH /v1/connect/discord.
    #[serde(rename = "webhookUsername", skip_serializing_if = "Option::is_none")]
    pub webhook_username: Option<String>,
    /// Override the webhook avatar URL for this post only. Falls back to the account-level default.
    #[serde(rename = "webhookAvatarUrl", skip_serializing_if = "Option::is_none")]
    pub webhook_avatar_url: Option<String>,
}

impl DiscordPlatformData {
    /// Discord message settings.  - Content: plain text (2,000 chars), rich embeds (up to 10), native polls, forum posts, threads, and announcement crossposts. - Media: images (JPEG, PNG, GIF, WebP), videos (MP4), and documents (up to 10 files, 25 MB each). - Webhook identity (username + avatar): customize per account via PATCH /v1/connect/discord, or per post via webhookUsername/webhookAvatarUrl.
    pub fn new(channel_id: String) -> DiscordPlatformData {
        DiscordPlatformData {
            channel_id,
            embeds: None,
            poll: None,
            crosspost: None,
            forum_thread_name: None,
            forum_applied_tags: None,
            thread_from_message: None,
            tts: None,
            webhook_username: None,
            webhook_avatar_url: None,
        }
    }
}