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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateDraftRequest {
    /// Draft content to save. `null` (or omitted) signals a delete — the row is removed under the same conflict rules.
    #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub value: Option<Option<serde_json::Value>>,
    /// Server timestamp of the client's last known sync for this draft. Omit on first save.
    #[serde(rename = "last_sync", skip_serializing_if = "Option::is_none")]
    pub last_sync: Option<String>,
    /// Skip the conflict check and overwrite the server copy.
    #[serde(rename = "force", skip_serializing_if = "Option::is_none")]
    pub force: Option<bool>,
    /// 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.
    #[serde(rename = "legacy", skip_serializing_if = "Option::is_none")]
    pub legacy: Option<bool>,
}

impl UpdateDraftRequest {
    pub fn new() -> UpdateDraftRequest {
        UpdateDraftRequest {
            value: None,
            last_sync: None,
            force: None,
            legacy: None,
        }
    }
}