windmill-api 1.816.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.816.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 AiSessionBackupPush {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "head", skip_serializing_if = "Option::is_none")]
    pub head: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "chats", skip_serializing_if = "Option::is_none")]
    pub chats: Option<Vec<models::AiSessionBackupChat>>,
    #[serde(rename = "images", skip_serializing_if = "Option::is_none")]
    pub images: Option<Vec<models::AiSessionBackupImage>>,
    #[serde(rename = "artifacts", skip_serializing_if = "Option::is_none")]
    pub artifacts: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(rename = "delete_chats", skip_serializing_if = "Option::is_none")]
    pub delete_chats: Option<Vec<String>>,
    #[serde(rename = "delete_images", skip_serializing_if = "Option::is_none")]
    pub delete_images: Option<Vec<models::AiSessionBackupPushDeleteImagesInner>>,
    /// more parts of this session follow, in this push or a later one; the session is not listed on this one. Such a part names its push (`push`), or it is refused
    #[serde(rename = "partial", skip_serializing_if = "Option::is_none")]
    pub partial: Option<bool>,
    /// a part of a push of the session whole; the head is on the part that opens it, which replaces whatever the storage holds of the session, and every piece the browser has is on one of them. An incremental part instead rides on a session the storage lists and is refused with needs_whole when it lists none
    #[serde(rename = "whole", skip_serializing_if = "Option::is_none")]
    pub whole: Option<bool>,
    /// a push split over several parts names itself on each with a token the browser draws; the part that opens it unlists the session and the last part lists it again, and a later part is written only while that token is the one there (refused with needs_whole otherwise)
    #[serde(rename = "push", skip_serializing_if = "Option::is_none")]
    pub push: Option<String>,
    /// this part opens the push named by `push`
    #[serde(rename = "opens", skip_serializing_if = "Option::is_none")]
    pub opens: Option<bool>,
    /// the session's move count (its record's `moves`), kept with the marker that lists the session; an incremental part rides on the marker of the same count
    #[serde(rename = "epoch", skip_serializing_if = "Option::is_none")]
    pub epoch: Option<i32>,
}

impl AiSessionBackupPush {
    pub fn new(id: String) -> AiSessionBackupPush {
        AiSessionBackupPush {
            id,
            head: None,
            chats: None,
            images: None,
            artifacts: None,
            delete_chats: None,
            delete_images: None,
            partial: None,
            whole: None,
            push: None,
            opens: None,
            epoch: None,
        }
    }
}