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

/// SnapshotWithContext : Snapshot of some content with required data to render



#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct SnapshotWithContext {
    /// Users involved in snapshot
    #[serde(rename = "_users")]
    pub _users: Vec<crate::models::User>,
    /// Channels involved in snapshot
    #[serde(rename = "_channels")]
    pub _channels: Vec<crate::models::Channel>,
    #[serde(rename = "_server", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub _server: Option<Option<Box<crate::models::SnapshotWithContextServer>>>,
    /// Unique Id
    #[serde(rename = "_id")]
    pub _id: String,
    /// Report parent Id
    #[serde(rename = "report_id")]
    pub report_id: String,
    #[serde(rename = "content")]
    pub content: Box<crate::models::SnapshotWithContextContent>,
}

impl SnapshotWithContext {
    /// Snapshot of some content with required data to render
    pub fn new(_users: Vec<crate::models::User>, _channels: Vec<crate::models::Channel>, _id: String, report_id: String, content: crate::models::SnapshotWithContextContent) -> SnapshotWithContext {
        SnapshotWithContext {
            _users,
            _channels,
            _server: None,
            _id,
            report_id,
            content: Box::new(content),
        }
    }
}