Skip to main content

windmill_api/models/
update_draft_request.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.726.1
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct UpdateDraftRequest {
16    /// Draft content to save. `null` (or omitted) signals a delete — the row is removed under the same conflict rules.
17    #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub value: Option<Option<serde_json::Value>>,
19    /// Server timestamp of the client's last known sync for this draft. Omit on first save.
20    #[serde(rename = "last_sync", skip_serializing_if = "Option::is_none")]
21    pub last_sync: Option<String>,
22    /// Skip the conflict check and overwrite the server copy.
23    #[serde(rename = "force", skip_serializing_if = "Option::is_none")]
24    pub force: Option<bool>,
25    /// Delete-only. Target the legacy workspace-level row (email NULL) instead of the current user's row. Used to discard a legacy draft from the review page.
26    #[serde(rename = "legacy", skip_serializing_if = "Option::is_none")]
27    pub legacy: Option<bool>,
28}
29
30impl UpdateDraftRequest {
31    pub fn new() -> UpdateDraftRequest {
32        UpdateDraftRequest {
33            value: None,
34            last_sync: None,
35            force: None,
36            legacy: None,
37        }
38    }
39}
40