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
 */

/// ChannelUnread : Representation of the state of a channel from the perspective of a user



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ChannelUnread {
    #[serde(rename = "_id")]
    pub _id: Box<crate::models::ChannelUnreadId>,
    /// Id of the last message read in this channel by a user
    #[serde(rename = "last_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_id: Option<Option<String>>,
    /// Array of message ids that mention the user
    #[serde(rename = "mentions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub mentions: Option<Option<Vec<String>>>,
}

impl ChannelUnread {
    /// Representation of the state of a channel from the perspective of a user
    pub fn new(_id: crate::models::ChannelUnreadId) -> ChannelUnread {
        ChannelUnread {
            _id: Box::new(_id),
            last_id: None,
            mentions: None,
        }
    }
}