Skip to main content

windmill_api/models/
update_draft_200_response.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.816.0
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 UpdateDraft200Response {
16    #[serde(rename = "status")]
17    pub status: Status,
18    #[serde(rename = "current_timestamp")]
19    pub current_timestamp: String,
20    /// `saved` only, upsert or delete: where the write landed. Differs from the URL path when the item had moved away from it; the editor follows it there. Absent when a delete found nothing to remove and the caller cannot read the path it moved to.
21    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
22    pub path: Option<String>,
23}
24
25impl UpdateDraft200Response {
26    pub fn new(status: Status, current_timestamp: String) -> UpdateDraft200Response {
27        UpdateDraft200Response {
28            status,
29            current_timestamp,
30            path: None,
31        }
32    }
33}
34/// 
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum Status {
37    #[serde(rename = "saved")]
38    Saved,
39    #[serde(rename = "conflict")]
40    Conflict,
41}
42
43impl Default for Status {
44    fn default() -> Status {
45        Self::Saved
46    }
47}
48