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 ListAiSessionBackups200Response {
    #[serde(rename = "enabled")]
    pub enabled: bool,
    /// names the storage answered from; sync state recorded against another one is void
    #[serde(rename = "storage_id", skip_serializing_if = "Option::is_none")]
    pub storage_id: Option<String>,
    /// bumped by every workspace key rotation; sync state recorded under another one is void
    #[serde(rename = "backup_generation", skip_serializing_if = "Option::is_none")]
    pub backup_generation: Option<i32>,
    /// the storage answered from is the instance object store, standing in for a workspace without storage of its own; a removal owed to it is retired by any answer from the workspace's own storage
    #[serde(rename = "fallback", skip_serializing_if = "Option::is_none")]
    pub fallback: Option<bool>,
    /// the newest 500 at most
    #[serde(rename = "sessions")]
    pub sessions: Vec<models::AiSessionBackupListing>,
    /// the user has more sessions than the answer names
    #[serde(rename = "truncated", skip_serializing_if = "Option::is_none")]
    pub truncated: Option<bool>,
}

impl ListAiSessionBackups200Response {
    pub fn new(enabled: bool, sessions: Vec<models::AiSessionBackupListing>) -> ListAiSessionBackups200Response {
        ListAiSessionBackups200Response {
            enabled,
            storage_id: None,
            backup_generation: None,
            fallback: None,
            sessions,
            truncated: None,
        }
    }
}