windmill-api 1.816.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.816.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 UpdateDraft200Response {
    #[serde(rename = "status")]
    pub status: Status,
    #[serde(rename = "current_timestamp")]
    pub current_timestamp: String,
    /// `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.
    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    pub path: Option<String>,
}

impl UpdateDraft200Response {
    pub fn new(status: Status, current_timestamp: String) -> UpdateDraft200Response {
        UpdateDraft200Response {
            status,
            current_timestamp,
            path: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "saved")]
    Saved,
    #[serde(rename = "conflict")]
    Conflict,
}

impl Default for Status {
    fn default() -> Status {
        Self::Saved
    }
}