use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AiSessionBackup {
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "head")]
pub head: std::collections::HashMap<String, serde_json::Value>,
#[serde(rename = "chats")]
pub chats: Vec<models::AiSessionBackupChat>,
#[serde(rename = "images")]
pub images: Vec<models::AiSessionBackupImage>,
#[serde(rename = "artifacts", skip_serializing_if = "Option::is_none")]
pub artifacts: Option<std::collections::HashMap<String, serde_json::Value>>,
#[serde(rename = "next", skip_serializing_if = "Option::is_none")]
pub next: Option<Box<models::AiSessionBackupCursor>>,
#[serde(rename = "listing")]
pub listing: String,
#[serde(rename = "moved", skip_serializing_if = "Option::is_none")]
pub moved: Option<bool>,
}
impl AiSessionBackup {
pub fn new(id: String, head: std::collections::HashMap<String, serde_json::Value>, chats: Vec<models::AiSessionBackupChat>, images: Vec<models::AiSessionBackupImage>, listing: String) -> AiSessionBackup {
AiSessionBackup {
id,
head,
chats,
images,
artifacts: None,
next: None,
listing,
moved: None,
}
}
}