windmill-api 1.727.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.727.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// UserDraftOverlay : Overlay fields added to every \"get by path\" response that accepts the `get_draft` query parameter. The deployed payload is sent untouched in the response body; the authed user's saved draft for this path — whatever shape the editor wrote — is attached as the sibling `draft` field when `get_draft=true` and a draft exists. The frontend pairs the two to present diff / reset / discard UI; the server never merges them.  When `no_deployed=true` there is no deployed row at this path — the response body is a best-effort stand-in synthesized from the draft, and only `draft` is canonical. Callers should disable \"diff vs deployed\" UI in that case. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserDraftOverlay {
    #[serde(rename = "is_draft")]
    pub is_draft: bool,
    #[serde(rename = "draft_saved_at", skip_serializing_if = "Option::is_none")]
    pub draft_saved_at: Option<String>,
    #[serde(rename = "no_deployed", skip_serializing_if = "Option::is_none")]
    pub no_deployed: Option<bool>,
    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
    pub draft: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// Other workspace users (and the legacy NULL-email row, if any) with a saved draft at the same path. Populated only on the authed user's \"get by path\" responses for kinds the editor surfaces a fork banner for (script, flow, app, raw_app). Empty / omitted for kinds without that UI. 
    #[serde(rename = "other_drafts_users", skip_serializing_if = "Option::is_none")]
    pub other_drafts_users: Option<Vec<models::UserDraftOverlayOtherDraftsUsersInner>>,
}

impl UserDraftOverlay {
    /// Overlay fields added to every \"get by path\" response that accepts the `get_draft` query parameter. The deployed payload is sent untouched in the response body; the authed user's saved draft for this path — whatever shape the editor wrote — is attached as the sibling `draft` field when `get_draft=true` and a draft exists. The frontend pairs the two to present diff / reset / discard UI; the server never merges them.  When `no_deployed=true` there is no deployed row at this path — the response body is a best-effort stand-in synthesized from the draft, and only `draft` is canonical. Callers should disable \"diff vs deployed\" UI in that case. 
    pub fn new(is_draft: bool) -> UserDraftOverlay {
        UserDraftOverlay {
            is_draft,
            draft_saved_at: None,
            no_deployed: None,
            draft: None,
            other_drafts_users: None,
        }
    }
}