revolt_api 0.5.5

Rust typings for the Revolt API.
Documentation
/*
 * Revolt API
 *
 * Open source user-first chat platform.
 *
 * The version of the OpenAPI document: 0.5.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 _type: Type,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
}

impl SpecialOneOf2 {
    /// YouTube video
    pub fn new(_type: Type, id: String) -> SpecialOneOf2 {
        SpecialOneOf2 {
            _type,
            id,
            timestamp: None,
        }
    }
}

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

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