/*
 * Late API
 *
 * API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
 *
 * The version of the OpenAPI document: 1.0.1
 * Contact: support@getlate.dev
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TwitterPlatformData {
    /// Controls who can reply to the tweet. \"following\" allows only people you follow, \"mentionedUsers\" allows only mentioned users, \"subscribers\" allows only subscribers. Omit for default (everyone can reply). For threads, applies to the first tweet only.
    #[serde(rename = "replySettings", skip_serializing_if = "Option::is_none")]
    pub reply_settings: Option<ReplySettings>,
    /// Sequence of tweets in a thread. First item is the root tweet.
    #[serde(rename = "threadItems", skip_serializing_if = "Option::is_none")]
    pub thread_items: Option<Vec<models::TwitterPlatformDataThreadItemsInner>>,
}

impl TwitterPlatformData {
    pub fn new() -> TwitterPlatformData {
        TwitterPlatformData {
            reply_settings: None,
            thread_items: None,
        }
    }
}
/// Controls who can reply to the tweet. \"following\" allows only people you follow, \"mentionedUsers\" allows only mentioned users, \"subscribers\" allows only subscribers. Omit for default (everyone can reply). For threads, applies to the first tweet only.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ReplySettings {
    #[serde(rename = "following")]
    Following,
    #[serde(rename = "mentionedUsers")]
    MentionedUsers,
    #[serde(rename = "subscribers")]
    Subscribers,
}

impl Default for ReplySettings {
    fn default() -> ReplySettings {
        Self::Following
    }
}
