windmill-api 1.815.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.815.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

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>>,
    /// a fingerprint of the session's listing; pages of one session whose fingerprints differ do not belong together
    #[serde(rename = "listing")]
    pub listing: String,
    /// the backup kept changing while this page was read, so it may mix two versions; the browser starts the session over
    #[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,
        }
    }
}