revolt_api 0.6.5

Open source user-first chat platform.
Documentation
/*
 * Revolt API
 *
 * Open source user-first chat platform.
 *
 * The version of the OpenAPI document: 0.6.5
 * Contact: contact@revolt.chat
 * Generated by: https://openapi-generator.tech
 */

/// SpecialOneOf2 : YouTube video



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct SpecialOneOf2 {
    #[serde(rename = "type")]
    pub r#type: RHashType,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "timestamp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<Option<String>>,
}

impl SpecialOneOf2 {
    /// YouTube video
    pub fn new(r#type: RHashType, id: String) -> SpecialOneOf2 {
        SpecialOneOf2 {
            r#type,
            id,
            timestamp: None,
        }
    }
}

/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RHashType {
    #[serde(rename = "YouTube")]
    YouTube,
}

impl Default for RHashType {
    fn default() -> RHashType {
        Self::YouTube
    }
}